private static boolean getConvertIfElseToSwitchProposals(IInvocationContext context, ASTNode coveringNode, ArrayList<ICommandAccess> resultingCollections) { if (!(coveringNode instanceof IfStatement)) { return false; } // we could produce quick assist if (resultingCollections == null) { return true; } if(!getConvertIfElseToSwitchProposals(context, coveringNode, resultingCollections, true)) return false; return getConvertIfElseToSwitchProposals(context, coveringNode, resultingCollections, false); }
private static boolean getConvertIfElseToSwitchProposals(IInvocationContext context, ASTNode coveringNode, ArrayList<ICommandAccess> resultingCollections) { if (!(coveringNode instanceof IfStatement)) { return false; } // we could produce quick assist if (resultingCollections == null) { return true; } if(!getConvertIfElseToSwitchProposals(context, coveringNode, resultingCollections, true)) return false; return getConvertIfElseToSwitchProposals(context, coveringNode, resultingCollections, false); }
getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, resultingCollections); getConvertSwitchToIfProposals(context, coveringNode, resultingCollections); getConvertIfElseToSwitchProposals(context, coveringNode, resultingCollections); GetterSetterCorrectionSubProcessor.addGetterSetterProposal(context, coveringNode, locations, resultingCollections);
getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, resultingCollections); getConvertSwitchToIfProposals(context, coveringNode, resultingCollections); getConvertIfElseToSwitchProposals(context, coveringNode, resultingCollections); GetterSetterCorrectionSubProcessor.addGetterSetterProposal(context, coveringNode, locations, resultingCollections);
|| getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, null) || getConvertSwitchToIfProposals(context, coveringNode, null) || getConvertIfElseToSwitchProposals(context, coveringNode, null) || GetterSetterCorrectionSubProcessor.addGetterSetterProposal(context, coveringNode, null, null);
|| getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, null) || getConvertSwitchToIfProposals(context, coveringNode, null) || getConvertIfElseToSwitchProposals(context, coveringNode, null) || GetterSetterCorrectionSubProcessor.addGetterSetterProposal(context, coveringNode, null, null);