Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Nov 26, 2024

No description provided.

@@ -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")) {
Copy link
Collaborator

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.

Copy link
Member

@rgrunber rgrunber Nov 27, 2024

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

Copy link
Contributor Author

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.

Copy link
Member

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

if('dom' === getJavaConfiguration().get('completion.engine')){
params.push('-DCompilationUnit.codeComplete.DOM_BASED_OPERATIONS=true');
};
so I meant we need a separate setting for it as well.

@rgrunber rgrunber added this to the End November 2024 milestone Nov 27, 2024
@rgrunber rgrunber linked an issue Nov 27, 2024 that may be closed by this pull request
@rgrunber rgrunber removed this from the End November 2024 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lombok agent doesn't need to be configured if javac is enabled
3 participants