Skip to content

Commit

Permalink
[23] Add AST level 23 to AST view
Browse files Browse the repository at this point in the history
Fixes #1376
  • Loading branch information
noopur2507 committed May 9, 2024
1 parent 03e4d5e commit 7e1e78f
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 @@ -6,6 +6,10 @@
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/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.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
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 JLS23= ASTHelper.JLS23;
private static final int JLS22= ASTHelper.JLS22;
private static final int JLS21= ASTHelper.JLS21;
private static final int JLS20= ASTHelper.JLS20;
Expand Down Expand Up @@ -522,6 +527,7 @@ public ASTView() {
case JLS20:
case JLS21:
case JLS22:
case JLS23:
fCurrentASTLevel= level;
}
} catch (NumberFormatException e) {
Expand Down Expand Up @@ -1150,6 +1156,7 @@ public void run() {
new ASTLevelToggle("AST Level 2&0 (20)", JLS20), //$NON-NLS-1$
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$
};

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 @@ -38,6 +42,7 @@ public class ASTHelper {
public static final int JLS20 = AST.JLS20;
public static final int JLS21 = AST.JLS21;
public static final int JLS22 = AST.JLS22;
public static final int JLS23 = AST.JLS23;

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

0 comments on commit 7e1e78f

Please sign in to comment.