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

Code completion modified to support JDK 21 features. #6253

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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