private String getSelectedCleanUpsInfo(ICleanUp[] cleanUps) { if (cleanUps.length == 0) return ""; //$NON-NLS-1$ StringBuilder buf= new StringBuilder(); boolean first= true; for (int i= 0; i < cleanUps.length; i++) { String[] descriptions= cleanUps[i].getStepDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (first) { first= false; } else { buf.append('\n'); } buf.append(descriptions[j]); } } } return buf.toString(); }
private String getSelectedCleanUpsInfo(ICleanUp[] cleanUps) { if (cleanUps.length == 0) return ""; //$NON-NLS-1$ StringBuffer buf= new StringBuffer(); boolean first= true; for (int i= 0; i < cleanUps.length; i++) { String[] descriptions= cleanUps[i].getStepDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (first) { first= false; } else { buf.append('\n'); } buf.append(descriptions[j]); } } } return buf.toString(); }
private void showSlowCleanUpsWarning(HashSet<ICleanUp> slowCleanUps) { final StringBuffer cleanUpNames= new StringBuffer(); for (Iterator<ICleanUp> iterator= slowCleanUps.iterator(); iterator.hasNext();) { ICleanUp cleanUp= iterator.next(); String[] descriptions= cleanUp.getStepDescriptions(); if (descriptions != null) { for (int i= 0; i < descriptions.length; i++) { if (cleanUpNames.length() > 0) cleanUpNames.append('\n'); cleanUpNames.append(descriptions[i]); } } } if (Display.getCurrent() != null) { showSlowCleanUpDialog(cleanUpNames); } else { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { showSlowCleanUpDialog(cleanUpNames); } }); } }
private void showSlowCleanUpsWarning(HashSet<ICleanUp> slowCleanUps) { final StringBuilder cleanUpNames= new StringBuilder(); for (Iterator<ICleanUp> iterator= slowCleanUps.iterator(); iterator.hasNext();) { ICleanUp cleanUp= iterator.next(); String[] descriptions= cleanUp.getStepDescriptions(); if (descriptions != null) { for (int i= 0; i < descriptions.length; i++) { if (cleanUpNames.length() > 0) cleanUpNames.append('\n'); cleanUpNames.append(descriptions[i]); } } } if (Display.getCurrent() != null) { showSlowCleanUpDialog(cleanUpNames); } else { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { showSlowCleanUpDialog(cleanUpNames); } }); } }
private String getSelectedCleanUpsText(CleanUpOptions options) { StringBuffer buf= new StringBuffer(); final ICleanUp[] cleanUps= JavaPlugin.getDefault().getCleanUpRegistry().createCleanUps(); for (int i= 0; i < cleanUps.length; i++) { cleanUps[i].setOptions(options); String[] descriptions= cleanUps[i].getStepDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (buf.length() > 0) { buf.append('\n'); } buf.append(descriptions[j]); } } } String string= buf.toString(); return string; }
private String getSelectedCleanUpsText(CleanUpOptions options) { StringBuilder buf= new StringBuilder(); final ICleanUp[] cleanUps= JavaPlugin.getDefault().getCleanUpRegistry().createCleanUps(); for (int i= 0; i < cleanUps.length; i++) { cleanUps[i].setOptions(options); String[] descriptions= cleanUps[i].getStepDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (buf.length() > 0) { buf.append('\n'); } buf.append(descriptions[j]); } } } String string= buf.toString(); return string; }
private void showCustomSettings(BulletListBlock bulletListBlock) { StringBuilder buf= new StringBuilder(); final ICleanUp[] cleanUps= JavaPlugin.getDefault().getCleanUpRegistry().createCleanUps(); CleanUpOptions options= new MapCleanUpOptions(fCustomSettings); for (int i= 0; i < cleanUps.length; i++) { cleanUps[i].setOptions(options); String[] descriptions= cleanUps[i].getStepDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (buf.length() > 0) { buf.append('\n'); } buf.append(descriptions[j]); } } } bulletListBlock.setText(buf.toString()); }
private void showCustomSettings(BulletListBlock bulletListBlock) { StringBuffer buf= new StringBuffer(); final ICleanUp[] cleanUps= JavaPlugin.getDefault().getCleanUpRegistry().createCleanUps(); CleanUpOptions options= new MapCleanUpOptions(fCustomSettings); for (int i= 0; i < cleanUps.length; i++) { cleanUps[i].setOptions(options); String[] descriptions= cleanUps[i].getStepDescriptions(); if (descriptions != null) { for (int j= 0; j < descriptions.length; j++) { if (buf.length() > 0) { buf.append('\n'); } buf.append(descriptions[j]); } } } bulletListBlock.setText(buf.toString()); }
String[] descriptions= fCleanUp.getStepDescriptions(); if (descriptions.length == 1) { changeName= descriptions[0];
String[] descriptions= fCleanUp.getStepDescriptions(); if (descriptions.length == 1) { changeName= descriptions[0];
@Override public void run() throws Exception { ICleanUp cleanUp= cleanUpDescriptor.createCleanUp(); if (cleanUp == null) disable[0]= true; else { cleanUp.setOptions(new CleanUpOptions()); String[] enbledSteps= cleanUp.getStepDescriptions(); if (enbledSteps != null && enbledSteps.length > 0) { JavaPlugin.logErrorMessage( Messages.format(FixMessages.CleanUpRegistry_cleanUpAlwaysEnabled_error, new String[] { cleanUpDescriptor.getId(), cleanUpDescriptor.fElement.getContributor().getName() })); disable[0]= true; } } } @Override
@Override public void run() throws Exception { ICleanUp cleanUp= cleanUpDescriptor.createCleanUp(); if (cleanUp == null) disable[0]= true; else { cleanUp.setOptions(new CleanUpOptions()); String[] enbledSteps= cleanUp.getStepDescriptions(); if (enbledSteps != null && enbledSteps.length > 0) { JavaPlugin.logErrorMessage( Messages.format(FixMessages.CleanUpRegistry_cleanUpAlwaysEnabled_error, new String[] { cleanUpDescriptor.getId(), cleanUpDescriptor.fElement.getContributor().getName() })); disable[0]= true; } } } @Override