Skip to content

Commit

Permalink
[24] Add AST level 24 to AST view
Browse files Browse the repository at this point in the history
Fixes #1696
  • Loading branch information
noopur2507 committed Dec 5, 2024
1 parent a177cfe commit fa8511d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
*
* SPDX-License-Identifier: EPL-2.0
*
* This is an implementation of an early-draft specification developed under the Java
* Community Process (JCP) and is made available for testing and evaluation purposes
* only. The code is not compatible with any specification of the JCP.
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
Expand Down Expand Up @@ -138,6 +142,7 @@
public class ASTView extends ViewPart implements IShowInSource, IShowInTargetList {

static final int JLS_LATEST= AST.getJLSLatest();
private static final int JLS24= ASTHelper.JLS24;
private static final int JLS23= ASTHelper.JLS23;
private static final int JLS22= ASTHelper.JLS22;
private static final int JLS21= ASTHelper.JLS21;
Expand Down Expand Up @@ -524,6 +529,7 @@ public ASTView() {
case JLS21:
case JLS22:
case JLS23:
case JLS24:
fCurrentASTLevel= level;
}
} catch (NumberFormatException e) {
Expand Down Expand Up @@ -1153,6 +1159,7 @@ public void run() {
new ASTLevelToggle("AST Level 2&1 (21)", JLS21), //$NON-NLS-1$
new ASTLevelToggle("AST Level 2&2 (22)", JLS22), //$NON-NLS-1$
new ASTLevelToggle("AST Level 2&3 (23)", JLS23), //$NON-NLS-1$
new ASTLevelToggle("AST Level 2&4 (24)", JLS24), //$NON-NLS-1$
};

fAddToTrayAction= new Action() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
*
* SPDX-License-Identifier: EPL-2.0
*
* This is an implementation of an early-draft specification developed under the Java
* Community Process (JCP) and is made available for testing and evaluation purposes
* only. The code is not compatible with any specification of the JCP.
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
Expand Down Expand Up @@ -39,6 +43,7 @@ public class ASTHelper {
public static final int JLS21 = AST.JLS21;
public static final int JLS22 = AST.JLS22;
public static final int JLS23 = AST.JLS23;
public static final int JLS24 = AST.JLS24;

private static boolean isNodeTypeSupportedInAST(AST ast, int nodeType) {
switch (nodeType) {
Expand Down

0 comments on commit fa8511d

Please sign in to comment.