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

Adding annotation processing support #616

Merged
merged 1 commit into from
May 9, 2018

Conversation

fbricon
Copy link
Contributor

@fbricon fbricon commented Apr 6, 2018

  • adds m2e-apt to the server distro (requires CQ approval)
  • ignores derived resources from didOpen/didChange/didSave calls, effectively removing diagnostics for those, as, after the server generates those files, the client detects changes, so sends textedits to the server to re-modify them, causing weird errors.

Fixes #128

Signed-off-by: Fred Bricon [email protected]

@fbricon
Copy link
Contributor Author

fbricon commented Apr 6, 2018

I'm still torn whether to enable AP by default

@schmee
Copy link

schmee commented Apr 22, 2018

This is great! 🎉 I'm currently working on a some code which makes heavy use of annotations using Vim and YouCompleteMe with the Java completer, and the lack of annotation processing results in all kinds of weird errors.

@fbricon
Copy link
Contributor Author

fbricon commented Apr 25, 2018

I've enabled m2e-apt by default, as I think it provides better UX. We'll see how it behaves over time.

In the mean time, I opened CQ https://dev.eclipse.org/ipzilla/show_bug.cgi?id=16186

new DiagnosticsHandler(connection, unit).clearDiagnostics();
}
if (unit.equals(sharedASTProvider.getActiveJavaElement())) {
sharedASTProvider.disposeAST();
}
unit.discardWorkingCopy();
unit.getResource().refreshLocal(IResource.DEPTH_ZERO, null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a refresh before closing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should no longer be needed. IIRC, before derived resources where ignored, the client would mess with those compilation units after being modified server-side, and causing errors that would not be discarded after closing the derived file.

- adds m2e-apt to the server distro (requires CQ approval)
- ignores derived resources from didOpen/didChange/didSave calls, effectively removing diagnostics for those,
as, after the server generates those files, the client detects changes, so sends textedits to the server to
re-modify them, causing weird errors.

Signed-off-by: Fred Bricon <[email protected]>
@fbricon fbricon changed the title WIP Adding annotation processing support Adding annotation processing support Apr 26, 2018
@fbricon
Copy link
Contributor Author

fbricon commented Apr 26, 2018

Updated PR

@fbricon fbricon modified the milestone: Mid May 2018 May 1, 2018
@fbricon fbricon requested a review from snjeza May 8, 2018 20:34
@fbricon
Copy link
Contributor Author

fbricon commented May 8, 2018

CQ was approved by the IP team

@fbricon fbricon merged commit 0ed1bf2 into eclipse-jdtls:master May 9, 2018
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.

4 participants