private static boolean getConvertSwitchToIfProposals(IInvocationContext context, ASTNode covering, Collection<ICommandAccess> resultingCollections) { if (!(covering instanceof SwitchStatement)) { return false; } // we could produce quick assist (if all 'case' statements end with 'break') if (resultingCollections == null) { return true; } if (!getConvertSwitchToIfProposals(context, covering, resultingCollections, false)) return false; return getConvertSwitchToIfProposals(context, covering, resultingCollections, true); }
private static boolean getConvertSwitchToIfProposals(IInvocationContext context, ASTNode covering, Collection<ICommandAccess> resultingCollections) { if (!(covering instanceof SwitchStatement)) { return false; } // we could produce quick assist (if all 'case' statements end with 'break') if (resultingCollections == null) { return true; } if (!getConvertSwitchToIfProposals(context, covering, resultingCollections, false)) return false; return getConvertSwitchToIfProposals(context, covering, resultingCollections, true); }
getPullNegationUpProposals(context, coveringNode, coveredNodes, resultingCollections); getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, resultingCollections); getConvertSwitchToIfProposals(context, coveringNode, resultingCollections);
getPullNegationUpProposals(context, coveredNodes, resultingCollections); getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, resultingCollections); getConvertSwitchToIfProposals(context, coveringNode, resultingCollections); getConvertIfElseToSwitchProposals(context, coveringNode, resultingCollections); GetterSetterCorrectionSubProcessor.addGetterSetterProposal(context, coveringNode, locations, resultingCollections);
getPullNegationUpProposals(context, coveredNodes, resultingCollections); getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, resultingCollections); getConvertSwitchToIfProposals(context, coveringNode, resultingCollections); getConvertIfElseToSwitchProposals(context, coveringNode, resultingCollections); GetterSetterCorrectionSubProcessor.addGetterSetterProposal(context, coveringNode, locations, resultingCollections);
|| getPullNegationUpProposals(context, coveringNode, coveredNodes, null) || getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, null) || getConvertSwitchToIfProposals(context, coveringNode, null);
|| getPullNegationUpProposals(context, coveredNodes, null) || getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, null) || getConvertSwitchToIfProposals(context, coveringNode, null) || getConvertIfElseToSwitchProposals(context, coveringNode, null) || GetterSetterCorrectionSubProcessor.addGetterSetterProposal(context, coveringNode, null, null);
|| getPullNegationUpProposals(context, coveredNodes, null) || getJoinIfListInIfElseIfProposals(context, coveringNode, coveredNodes, null) || getConvertSwitchToIfProposals(context, coveringNode, null) || getConvertIfElseToSwitchProposals(context, coveringNode, null) || GetterSetterCorrectionSubProcessor.addGetterSetterProposal(context, coveringNode, null, null);