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

Draft
wants to merge 422 commits into
base: dom-with-javac
Choose a base branch
from

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]>
datho7561 and others added 17 commits July 26, 2024 00:05
Fixes some problem ids, which should in turn fix some quickfixes in the
jdtls suite.

Signed-off-by: David Thompson <[email protected]>
Small fix to generic error range fixer as well:
length should always be at least one so that the error is visible
somewhere.

Signed-off-by: David Thompson <[email protected]>
Should fix 3 tests

Signed-off-by: David Thompson <[email protected]>
…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.

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