arusinha commented on a change in pull request #1124: [NETBEANS-1969]:Fixed reindentation issues for Switch Rule-Case and S… URL: https://github.com/apache/incubator-netbeans/pull/1124#discussion_r256705388
########## File path: java/java.source.base/src/org/netbeans/modules/java/source/TreeShims.java ########## @@ -50,6 +55,63 @@ public static Tree getBody(CaseTree node) { } } + public static List<? extends ExpressionTree> getExpressions(Tree node) { + List<? extends ExpressionTree> exprTrees = new ArrayList<>(); + + switch (node.getKind().toString()) { + case "CASE": + exprTrees = getExpressions((CaseTree) node); + break; + case "SWITCH_EXPRESSION": { + try { + Class swExprTreeClass = Class.forName("com.sun.source.tree.SwitchExpressionTree"); Review comment: TreeShims is planned to be removed in future , so i believe // NOI18N" is not required ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists