-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lombok agent doesn't need to be configured if javac is enabled #3877
base: master
Are you sure you want to change the base?
Conversation
src/lombokSupport.ts
Outdated
@@ -91,6 +91,11 @@ export function addLombokParam(context: ExtensionContext, params: string[]) { | |||
for (let i = deleteIndex.length - 1; i >= 0; i--) { | |||
params.splice(deleteIndex[i], 1); | |||
} | |||
// https://github.com/redhat-developer/vscode-java/issues/3875 | |||
// Lombok agent doesn't need to be configured if java.jdt.ls.javac.enabled is on | |||
if ("on" === vscode.workspace.getConfiguration().get("java.jdt.ls.javac.enabled")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag "java.jdt.ls.javac.enabled"
only controls whether to delegate compilation and DOM AST to javac, which does not need an additional lombok agent. However, if code completion continues to rely on the ECJ-based engine, the Lombok agent will still be required.
Therefore, the lombok agent is not needed only when both "java.jdt.ls.javac.enabled"
and "java.completion.engine": "dom"
settings are enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about SourceIndexer.DOM_BASED_INDEXER
? Lombok is affect by source references right ?
Update: Could we just create a separate setting for the dom based indexing as well ? Then just update the instructions for the extra features : https://github.com/redhat-developer/vscode-java/wiki/Javac%E2%80%90based-compilation-support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Therefore, the lombok agent is not needed only when both "java.jdt.ls.javac.enabled" and "java.completion.engine": "dom" settings are enabled.
What about SourceIndexer.DOM_BASED_INDEXER ? Lombok is affect by source references right ?
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is we don't even set the dom based indexer at
vscode-java/src/javaServerStarter.ts
Lines 143 to 145 in 2f57115
if('dom' === getJavaConfiguration().get('completion.engine')){ | |
params.push('-DCompilationUnit.codeComplete.DOM_BASED_OPERATIONS=true'); | |
}; |
No description provided.