protected Map<String, String> getSettings() { SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) return null; Hashtable<String, String> settings= new Hashtable<>(); settings.put(CleanUpConstants.SORT_MEMBERS, CleanUpOptions.TRUE); settings.put(CleanUpConstants.SORT_MEMBERS_ALL, !dialog.isNotSortingFieldsEnabled() ? CleanUpOptions.TRUE : CleanUpOptions.FALSE); return settings; }
protected Map<String, String> getSettings() { SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) return null; Hashtable<String, String> settings= new Hashtable<>(); settings.put(CleanUpConstants.SORT_MEMBERS, CleanUpOptions.TRUE); settings.put(CleanUpConstants.SORT_MEMBERS_ALL, !dialog.isNotSortingFieldsEnabled() ? CleanUpOptions.TRUE : CleanUpOptions.FALSE); return settings; }
/** * {@inheritDoc} */ protected ICleanUp[] createCleanUps(ICompilationUnit[] units) { try { if (!hasMembersToSort(units)) return null; } catch (JavaModelException e) { JavaPlugin.log(e); return null; } SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) return null; Hashtable settings= new Hashtable(); settings.put(CleanUpConstants.SORT_MEMBERS, CleanUpConstants.TRUE); settings.put(CleanUpConstants.SORT_MEMBERS_ALL, !dialog.isNotSortingFieldsEnabled() ? CleanUpConstants.TRUE : CleanUpConstants.FALSE); return new ICleanUp[] { new SortMembersCleanUp(settings) }; }
public void run(ITextSelection selection) { Shell shell= getShell(); IJavaElement input= SelectionConverter.getInput(fEditor); if (input instanceof ICompilationUnit) { if (!ActionUtil.isEditable(fEditor)) { return; } SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) { return; } if (!ElementValidator.check(input, getShell(), getDialogTitle(), true)) { return; } run(shell, (ICompilationUnit) input, fEditor, dialog.isNotSortingFieldsEnabled()); } else { MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.SortMembersAction_not_applicable); } }
@Override public void run(ITextSelection selection) { Shell shell= getShell(); IJavaElement input= SelectionConverter.getInput(fEditor); if (input instanceof ICompilationUnit) { if (!ActionUtil.isEditable(fEditor)) { return; } SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) { return; } if (!ElementValidator.check(input, getShell(), getDialogTitle(), true)) { return; } run(shell, (ICompilationUnit) input, fEditor, dialog.isNotSortingFieldsEnabled()); } else { MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.SortMembersAction_not_applicable); } }
@Override public void run(ITextSelection selection) { Shell shell= getShell(); IJavaElement input= SelectionConverter.getInput(fEditor); if (input instanceof ICompilationUnit) { if (!ActionUtil.isEditable(fEditor)) { return; } SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) { return; } if (!ElementValidator.check(input, getShell(), getDialogTitle(), true)) { return; } run(shell, (ICompilationUnit) input, fEditor, dialog.isNotSortingFieldsEnabled()); } else { MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.SortMembersAction_not_applicable); } }
SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) { return;
SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) { return;
SortMembersMessageDialog dialog= new SortMembersMessageDialog(getShell()); if (dialog.open() != Window.OK) { return;