-
Notifications
You must be signed in to change notification settings - Fork 93
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
Semantic Tokens ext point #1683
Semantic Tokens ext point #1683
Conversation
3e87ca0
to
9332408
Compare
After the initial discussion in #1594, this is the corresponding PR with the implementation. Would be extremely awesome if someone could have a look and provide feedback, so that we can get this merged whenever it makes sense. Interested @noopur2507, @iloveeclipse, @HannesWell ? |
Unfortunately I'm not a JDT committer and cannot say with certainty who would be the best person to review this. |
I'm not a committer on JDT either ( https://projects.eclipse.org/projects/eclipse.jdt/elections/election-mickael-istria-committer-eclipse-jdt-java-development-tools ). I've put some generic comments about documentation and API that needs to be polished. |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/SemanticTokensProvider.java
Outdated
Show resolved
Hide resolved
@mickaelistria @martinlippert updated the PR for Mickael's comments |
@BoykoAlex Thanks for incorporating the comments from @mickaelistria (and thanks a lot @mickaelistria for taking a look, much appreciated). Now looking for a JDT UI committer to pick this up and provide feedback, merge, or whatever makes sense to move this forward. |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/ISemanticTokensProvider.java
Show resolved
Hide resolved
...eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java
Outdated
Show resolved
Hide resolved
|
||
/** | ||
* XXX Hack for performance reasons (should loop over fJobSemanticHighlightings can call consumes(*)) | ||
* @since 3.5 | ||
*/ | ||
private Highlighting fJobDeprecatedMemberHighlighting; | ||
|
||
private Highlighting[] fEditorHighlightings; |
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.
does this duplicate a hack? better find a solution?
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.
No, I think this code needs to move up and be collocated with with the similar definition for semantic highlightings. There is one field for whatever came in from the viewer definition and one for whatever the current reconciling job can use. To be honest this comment relates more to fJobSemanticHighlightings
rather than fJobDeprecatedMemberHighlighting
... Reconciling job may have highlightings different from the reconciler if colour settings have changed while reconciling text chunk in the editor, hence I think this is okay.
This change is rather complex to review, fails the automated tests and does not come with junit testcases. |
43ebedf
to
336cf12
Compare
@jukzi thank you for the feedback. I have added an example extnesion point in the |
If you are are sure PluginsNotLoadedTest is unrelated (likely) then please create an issue for it and link it. i have not found an existing issue for it. |
I believe it is related, the test is not known as unstable. |
@iloveeclipse I don't think the test failure is related as other PRs such as:
All have the same test failure. Likely something has changed in the platform upstream. |
@jukzi the PR should be okay to review now. Could you please have another look at it when you get a chance? :-) |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingManager.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingManager.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingManager.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingManager.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingManager.java
Show resolved
Hide resolved
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingManager.java
Outdated
Show resolved
Hide resolved
...eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java
Outdated
Show resolved
Hide resolved
The test failures seem unrelated. I noticed the same number of failed tests in the recently created PRs... |
a148cd0
to
6617a4f
Compare
rebased to get rid of build errors |
...ext.tests/src/org/eclipse/jdt/text/tests/semantictokens/SampleSqlSemanticTokensProvider.java
Outdated
Show resolved
Hide resolved
...ext.tests/src/org/eclipse/jdt/text/tests/semantictokens/SampleSqlSemanticTokensProvider.java
Outdated
Show resolved
Hide resolved
...eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java
Show resolved
Hide resolved
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SyntaxColorHighlighting.java
Show resolved
Hide resolved
5db63af
to
c544c78
Compare
unrelated SmokeViewsTest.testOpenSourceView can be ignored #1843 |
let's give it a try |
So many thanks to @jukzi for reviewing and guiding us through this PR, so much appreciated. 1000 Thanks!!! |
Fixes #1594
Extension point to contribute semantic tokens into the JDT Java editor.