[WIP] Rework slightly how we current ignore match type#1459
Draft
mickaelistria wants to merge 1137 commits intoeclipse-jdtls:dom-with-javacfrom
Draft
[WIP] Rework slightly how we current ignore match type#1459mickaelistria wants to merge 1137 commits intoeclipse-jdtls:dom-with-javacfrom
mickaelistria wants to merge 1137 commits intoeclipse-jdtls:dom-with-javacfrom
Conversation
Fix condition
Signed-off-by: Rob Stryker <stryker@redhat.com>
Signed-off-by: Rob Stryker <stryker@redhat.com>
Signed-off-by: Rob Stryker <stryker@redhat.com>
It used to insert `System.System.out`, but now it properly inserts `System.out`. This change causes no regressions, and no new test passes. I don't know what the code I deleted was supposed to do; I'll figure that out before merging. Signed-off-by: David Thompson <davthomp@redhat.com>
eg.
```java
public class Main {
public class Member {
}
public void method() {
Main.Mem|
}
}
```
Also handles:
```java
import java.util.Map;
public class Main implements Map.En| {
}
```
Signed-off-by: David Thompson <davthomp@redhat.com>
… children Signed-off-by: Rob Stryker <stryker@redhat.com>
…hod mouseover popup box Signed-off-by: Rob Stryker <stryker@redhat.com> Also-By: Mickael Istria <mistria@redhat.com>
- suggest types in more cases (do not shut off type name completion if there are no expected types) - do not suggest types when completing type arguments for a non-generic type (or if there are eg. 2 params and 3 args) - do not suggest types from the default package in classes not in the default package - do not suggest private inner classes - only suggest package private classes when in the same package - only suggest protected inner classes when the class the cursor is in inherits from the class containing the protected inner class Signed-off-by: David Thompson <davthomp@redhat.com>
Fixes eclipse-jdt#1202 Signed-off-by: David Thompson <davthomp@redhat.com>
Should fix 6 cases without regressions, because one of the projects used to test completion has two classes called `SuperClass` in the default package. Signed-off-by: David Thompson <davthomp@redhat.com>
eg.
```java
public class MyClass extends MyOtherClass {
public MyClass() {
sup|
}
}
class MyOtherClass {
public MyOtherClass(int i) {}
protected MyOtherClass(Object i) {}
MyOtherClass(boolean b) {}
private MyOtherClass(String s) {}
}
```
Requires eclipse-jdt#1206 in order to work properly if you have substring matching
enabled in your IDE.
Fixes eclipse-jdt#1205
Signed-off-by: David Thompson <davthomp@redhat.com>
- Do prefix filtering first; string comparison should be fast compared to more involved operations - Fix bad implementation of `protected` member classes; `getParent()` wasn't the right method to get the parent class of a member class - Impossible classes filtering was wrong, it was checking methods instead Signed-off-by: David Thompson <davthomp@redhat.com>
Fixes: `ASTConverterTest.test0113` `ASTConverterTest.test0114` `ASTConverterTest.test0115` as well as tests for other Java versions Note: we only need to accomodate Java >= 8 in the AST conversion process, since that's what upstream does now. Signed-off-by: David Thompson <davthomp@redhat.com>
Should fix 17 test cases Signed-off-by: David Thompson <davthomp@redhat.com>
eg. `MyType\u005b] myTypeArray = null;` Fixes 4 tests: `ASTConverterTest.test0266` and the versions for other Java compliances Signed-off-by: David Thompson <davthomp@redhat.com>
`ThisExpression` is it's own node, which we will need to handle differently. Should fix 2 test cases. Signed-off-by: David Thompson <davthomp@redhat.com>
AST no longer supports it thus no need for Javac converter to be complicated for nothing.
It's now taken into account for members of a qualified type being completed. Signed-off-by: David Thompson <davthomp@redhat.com>
Failback to type of declaration from Search if not resolved
Not needed as neither Javac nor ECJ nor JDT makes use of anything pre Java 8 nowadays. VariableDeclaration.extraArrayDeclarataion is not supported in Java 8+ but was used without guards which shouldn't have happened.
Fixes eclipse-jdt#1224 Signed-off-by: David Thompson <davthomp@redhat.com>
- Fix the number part of IVariableBinding's key
- This means that the bindings for different variables with the same
name in the same method can be distinguished eg. `rob` and `i` can
be distinguished:
```java
public class Main {
public void myMethod() {
for (int i = 0; i < 10; i++) {
int rob = 12;
}
for (String i = "asdf"; "hjkl".equals(i); i = "hjkl") {
String rob = "rob";
}
}
}
```
- As a result, completion works deterministically in these cases
(eg. before you just had to hope that the correct binding was cached
in order to get the right results)
Signed-off-by: David Thompson <davthomp@redhat.com>
…atterns should not return matches with non-field java elements Signed-off-by: Rob Stryker <stryker@redhat.com>
* Compare JavaElements directly * Improve getJavaElement() for JavacTypeBinding to skip working copy * Fix 1 test
… field p…" This reverts commit 57a461f.
Signed-off-by: Rob Stryker <stryker@redhat.com>
Instead of hardcoding it in upstream classes, we set the property to ignore match types in the Javac test code.
Author
|
This is currently not working and low priority |
73d28b4 to
aa8f401
Compare
4082278 to
ebc593c
Compare
11c94f4 to
99440ba
Compare
6dc0d95 to
25a5a08
Compare
b1b4e0e to
309f390
Compare
685330d to
959d707
Compare
2dbfcc7 to
6e1fd32
Compare
0b01689 to
87ead9e
Compare
6d23874 to
c8f8d92
Compare
055e846 to
18452eb
Compare
411dfec to
ac3eb19
Compare
5738537 to
9962d57
Compare
284e150 to
4bae1aa
Compare
4bae1aa to
c00ff74
Compare
dd7aa18 to
fbe5e1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of hardcoding it in upstream classes, we set the property to ignore match types in the Javac test code.