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

enable completion tests for DOMCompletionEngine #653

Closed

Conversation

gayanper
Copy link

  • tests.model.CompletionTests

mickaelistria and others added 30 commits July 26, 2024 00:05
- Set the source range of the parameter name

Fixes eclipse-jdt#379

Signed-off-by: David Thompson <[email protected]>
+ implement equals/hashCode

Fixes eclipse-jdtls#317
Signed-off-by: David Thompson <[email protected]>
Storing the diagnostics as they appear and adding them at the end in one
go so the top level CompilationUnit is already there.
- small fix for element type in typebindings
- implement `resolveWellKnownType`
- implement `resolveField`
- fix `getName` for array type bindings

Signed-off-by: David Thompson <[email protected]>
- run the javac test bundle properly
- report the findings so they can be seen in the Jenkins UI

Signed-off-by: David Thompson <[email protected]>
- fix resolveWellKnownType
- implement resolve constructor

Signed-off-by: David Thompson <[email protected]>
Errors from javadoc look out of place for now.
Maybe in the future if/when there are settings for each of them they can
be switched back to errors depending on settings.
Prevents from searching in index which index is being built.
methods that are not declared in current file.
…yield statement Part 1 and 2

Signed-off-by: Rob Stryker <[email protected]>
robstryker and others added 13 commits July 26, 2024 00:05
…e-jdt#621)

* Fix some bugs requiring == for multiple resolutions on a node

Signed-off-by: Rob Stryker <[email protected]>

* Cleanup

Signed-off-by: Rob Stryker <[email protected]>

---------

Signed-off-by: Rob Stryker <[email protected]>
Co-authored-by: Rob Stryker <[email protected]>
The main goal of this PR is to get the quick fix for the following case
working:

```java
public class MyClass extends java.util.List {

}
```

I needed to redo a lot of the type variable and method param/arg code in
order to accomplish this.

Signed-off-by: David Thompson <[email protected]>
* Report diagnostics for the unused imports & private members & local variables
- var in method without initializer (eg `var i;`)
- attempt to invoke `.toString()` on a method that returns `int`

Signed-off-by: David Thompson <[email protected]>
- Some additional problem id mappings encountered along the way

Signed-off-by: David Thompson <[email protected]>
Comment on lines +705 to +714
public ITypeBinding resolveBindings(IType type) {
ASTParser parser = ASTParser.newParser(AST.getJLSLatest());
parser.setSource(type.getTypeRoot());
parser.setBindingsRecovery(true);
parser.setResolveBindings(true);
parser.setStatementsRecovery(false);
CompilationUnit cu = (CompilationUnit) parser.createAST(null);
TypeDeclaration typeDecl = (TypeDeclaration) cu.findDeclaringNode(type.getKey());
return typeDecl.resolveBinding();
}

Choose a reason for hiding this comment

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

This would be a very expensive operation to reparse every compilation unit. Moreover, this wouldn't work with binary types. I don't think it's suitable here.

@mickaelistria mickaelistria force-pushed the dom-with-javac branch 2 times, most recently from 13a7ce9 to 911e4b3 Compare September 10, 2024 08:43
@mickaelistria mickaelistria force-pushed the dom-with-javac branch 3 times, most recently from 16bd705 to 9fb5696 Compare September 25, 2024 06:20
@mickaelistria mickaelistria force-pushed the dom-with-javac branch 2 times, most recently from 7f5c20a to 87832d6 Compare December 6, 2024 13:52
@mickaelistria
Copy link

Something similar (maybe even that particular patch, I don't recall) was merged in some months ago so we have on CI the result of completion tests when using Javac+DOM. So this PR can now be closed.
Thank you!

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.

8 participants