Skip to content

Commit

Permalink
Merge pull request #6253 from dbalek/dbalek/jsva-cc-21
Browse files Browse the repository at this point in the history
Code completion modified to support JDK 21 features.
  • Loading branch information
dbalek authored Jul 27, 2023
2 parents 119e442 + 29a9e0d commit 1be485f
Show file tree
Hide file tree
Showing 51 changed files with 599 additions and 1,732 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,32 @@ private Env getEnvImpl(CompilationController controller, TreePath orig, TreePath
}
if (lastCase != null) {
stmts = lastCase.getStatements();
if (stmts == null || stmts.isEmpty()) {
Tree body = lastCase.getBody();
if (body != null) {
last = body;
} else {
Tree guard = lastCase.getGuard();
if (guard != null) {
last = guard;
}
}
}
}
break;
case CASE:
stmts = ((CaseTree) path.getLeaf()).getStatements();
if (stmts == null || stmts.isEmpty()) {
Tree body = ((CaseTree) path.getLeaf()).getBody();
if (body != null) {
last = body;
} else {
Tree guard = ((CaseTree) path.getLeaf()).getGuard();
if (guard != null) {
last = guard;
}
}
}
break;
case CONDITIONAL_AND: case CONDITIONAL_OR:
BinaryTree bt = (BinaryTree) last;
Expand Down Expand Up @@ -482,10 +504,32 @@ public Tree.Kind getKind() {
}
if (lastCase != null) {
stmts = lastCase.getStatements();
if (stmts == null || stmts.isEmpty()) {
Tree caseBody = lastCase.getBody();
if (caseBody != null) {
last = caseBody;
} else {
Tree guard = lastCase.getGuard();
if (guard != null) {
last = guard;
}
}
}
}
break;
case CASE:
stmts = ((CaseTree) path.getLeaf()).getStatements();
if (stmts == null || stmts.isEmpty()) {
Tree caseBody = ((CaseTree) path.getLeaf()).getBody();
if (caseBody != null) {
last = caseBody;
} else {
Tree guard = ((CaseTree) path.getLeaf()).getGuard();
if (guard != null) {
last = guard;
}
}
}
break;
}
if (stmts != null) {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
Integer j
Object obj
Number v
protected native Object clone()
public boolean equals(Object arg0)
protected void finalize()
public final native Class<?> getClass()
public native int hashCode()
public final native void notify()
public final native void notifyAll()
public void op(Object obj)
public String toString()
public final void wait()
public final native void wait(long arg0)
public final void wait(long arg0, int arg1)
assert
boolean
byte
char
class
do
double
final
float
for
if
int
long
new
record
return
short
strictfp
super
switch
synchronized
this
throw
try
var
void
while
yield
AbstractMethodError
Appendable
ArithmeticException
Expand All @@ -19,6 +62,7 @@ ClassNotFoundException
ClassValue
CloneNotSupportedException
Cloneable
Color
Comparable
Compiler
Deprecated
Expand Down Expand Up @@ -66,11 +110,11 @@ Object
OutOfMemoryError
Override
Package
Point
Process
ProcessBuilder
ProcessHandle
Readable
Record
ReflectiveOperationException
Runnable
Runtime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
default
null
AbstractMethodError
Appendable
Expand All @@ -21,6 +20,7 @@ ClassNotFoundException
ClassValue
CloneNotSupportedException
Cloneable
Color
Comparable
Compiler
Deprecated
Expand Down Expand Up @@ -64,6 +64,7 @@ Object
OutOfMemoryError
Override
Package
Point
Process
ProcessBuilder
Readable
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Point(Number x, Number y)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var
Byte
Double
Float
Integer
Long
Number
Short
com
java
javax
org
sun
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
n
number
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
public byte byteValue()
public abstract double doubleValue()
public boolean equals(Object arg0)
public abstract float floatValue()
public final native Class<?> getClass()
public native int hashCode()
public abstract int intValue()
public abstract long longValue()
public final native void notify()
public final native void notifyAll()
public short shortValue()
public String toString()
public final void wait()
public final native void wait(long arg0)
public final void wait(long arg0, int arg1)
Loading

0 comments on commit 1be485f

Please sign in to comment.