Skip to content

Commit ac31b4f

Browse files
committed
Update flags for jdt-javac
Update the flags to match https://github.com/eclipse-jdtls/eclipse-jdt-core-incubator/blob/dom-with-javac/org.eclipse.jdt.core.javac/META-INF/p2.inf This opens a bunch of jdk internals that the jdt-javac work uses, and also sets the flags to enable the javac-based search. Signed-off-by: David Thompson <[email protected]>
1 parent 0511638 commit ac31b4f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/javaServerStarter.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,22 +144,29 @@ function prepareParams(requirements: RequirementsData, workspacePath, context: E
144144
'--add-opens',
145145
'jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.taglets=ALL-UNNAMED',
146146
'--add-opens',
147+
'jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
148+
'--add-opens',
149+
'jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED',
150+
'--add-opens',
151+
'jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED',
152+
'--add-opens',
147153
'jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED',
148154
'--add-opens',
149155
'jdk.compiler/com.sun.tools.javac.resources=ALL-UNNAMED',
150156
'--add-opens',
151-
'jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED',
157+
'java.base/sun.nio.ch=ALL-UNNAMED',
152158
'--add-opens',
153159
'jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED',
154160
'--add-opens',
155161
'java.compiler/javax.tools=ALL-UNNAMED',
156162
'--add-opens',
157163
'java.base/java.nio.channels=ALL-UNNAMED',
158-
'--add-opens',
159-
'java.base/sun.nio.ch=ALL-UNNAMED',
160164
'-DICompilationUnitResolver=org.eclipse.jdt.core.dom.JavacCompilationUnitResolver',
165+
'-DAbstractImageBuilder.compilerFactory=org.eclipse.jdt.internal.javac.JavacCompilerFactory',
161166
'-DCompilationUnit.DOM_BASED_OPERATIONS=true',
162-
'-DAbstractImageBuilder.compilerFactory=org.eclipse.jdt.internal.javac.JavacCompilerFactory'
167+
'-DSourceIndexer.DOM_BASED_INDEXER=true',
168+
'-DMatchLocator.DOM_BASED_MATCH=true',
169+
'-DIJavaSearchDelegate=org.eclipse.jdt.internal.core.search.DOMJavaSearchDelegate',
163170
);
164171

165172
if('dom' === getJavaConfiguration().get('completion.engine')){

0 commit comments

Comments
 (0)