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

Compute problems #2052

Closed
wants to merge 26 commits into from
Closed

Conversation

mickaelistria
Copy link
Contributor

What it does

How to test

Author checklist

mickaelistria and others added 26 commits February 17, 2024 00:05
Having root unit set in the lookupEnvironment (when focusing on a single
unit) can be necessary for
further binding resolution.

Fixes eclipse-jdt#1915
Introduced 2 system property switches to control whether some IDE
operations are using ECJ parser (legacy/default) or whether to make
those operations powered by a full DOM.

* CompilationUnit.DOM_BASED_OPERATIONS will make codeSelect (hover, link
to definition...), buildStructure (JDT Project element model),
reconciler (code diagnostics feedback); this one seems currently working ✔
* CompilationUnit.codeComplete.DOM_BASED_OPERATIONS controls completion
(unlike other
operations, completion based on DOM is far from being complete or
straightforward) 🏗️
* SourceIndexer.DOM_BASED_INDEXER controls whether the indexation of a source
document should first build/use a full DOM. This one is currently incomplete 🏗️

The DOM-based operation can then allow to plug alternative compiler then
ECJ and still get JDT functionalities working.
Addresses NPE in JavaSearchTests.testEnum04

Signed-off-by: David Thompson <[email protected]>
Adds some steps on the relevant branches, so the necessary system
properties are set in tests to enable DOM-first and Javac.
[DOM to Model] Support default value, deprecated, and more

- Use modifiers instead of flags to populate `MemberElementInfo.flags`
  (the field and setter are misnamed, it contains the modifiers)
- Call code that searches for @deprecated annotation on all body
  declarations
- Cache calls to check for an imported class called `Deprecated` so that
  it doesn't happen multiple times

Signed-off-by: David Thompson <[email protected]>
…onUnitTests` (eclipse-jdt#21)

* Re-enable populating Enum constants

Signed-off-by: David Thompson <[email protected]>
- Fixes ASTModelBridgeTests.testFindElement05
- Fixes ASTModelBridgeTests.testLocalType
- Fixes ASTModelBridgeTests.testLocalType2

Signed-off-by: David Thompson <[email protected]>
- Fixes `ASTModelBridgeTests.testAnonymousType`
- Fixes `ASTModelBridgeTests.testAnonymousType2`

Signed-off-by: David Thompson <[email protected]>
+ Fix on-demand import name range
+ Fix TypeParameter name range
+ Fix some annotation name range
+ Fix some anonymous source range
Instead of directly calling the problemReporter, try first to add the
problems to ASTHolverCUInfo.problems when provided.
Enable resolution when problems are requested as well.
@mickaelistria
Copy link
Contributor Author

Wrong target repo, sorry.

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.

2 participants