@Override protected ICleanUp[] getCleanUps(ICompilationUnit[] units) { Map<String, String> settings= new Hashtable<>(); settings.put(CleanUpConstants.ORGANIZE_IMPORTS, CleanUpOptions.TRUE); ImportsCleanUp importsCleanUp= new ImportsCleanUp(settings); return new ICleanUp[] { importsCleanUp }; }
/** * {@inheritDoc} */ public boolean requireAST(ICompilationUnit unit) throws CoreException { return isEnabled(CleanUpConstants.ORGANIZE_IMPORTS); }
@Override public String[] getStepDescriptions() { if (isEnabled(CleanUpConstants.ORGANIZE_IMPORTS)) return new String[] {MultiFixMessages.ImportsCleanUp_OrganizeImports_Description}; return null; }
@Override protected ICleanUp[] getCleanUps(ICompilationUnit[] units) { Map<String, String> settings= new Hashtable<>(); settings.put(CleanUpConstants.ORGANIZE_IMPORTS, CleanUpOptions.TRUE); ImportsCleanUp importsCleanUp= new ImportsCleanUp(settings); return new ICleanUp[] { importsCleanUp }; }
@Override public String[] getStepDescriptions() { if (isEnabled(CleanUpConstants.ORGANIZE_IMPORTS)) return new String[] {MultiFixMessages.ImportsCleanUp_OrganizeImports_Description}; return null; }
protected ICleanUp[] createCleanUps(ICompilationUnit[] units) { Map settings= new Hashtable(); settings.put(CleanUpConstants.ORGANIZE_IMPORTS, CleanUpConstants.TRUE); ImportsCleanUp importsCleanUp= new ImportsCleanUp(settings); return new ICleanUp[] { importsCleanUp }; }
/** * {@inheritDoc} */ public String[] getDescriptions() { if (isEnabled(CleanUpConstants.ORGANIZE_IMPORTS)) return new String[] {MultiFixMessages.ImportsCleanUp_OrganizeImports_Description}; return null; }
@Override protected AbstractCleanUp[] createPreviewCleanUps(Map<String, String> values) { return new AbstractCleanUp[] { new ImportsCleanUp(values), new CodeFormatCleanUp(values), new SortMembersCleanUp(values) }; }
@Override public String getPreview() { StringBuilder buf= new StringBuilder(); if (isEnabled(CleanUpConstants.ORGANIZE_IMPORTS)) { buf.append("import org.model.Engine;\n"); //$NON-NLS-1$ } else { buf.append("import org.model.*;\n"); //$NON-NLS-1$ } return buf.toString(); }
@Override protected AbstractCleanUp[] createPreviewCleanUps(Map<String, String> values) { return new AbstractCleanUp[] { new ImportsCleanUp(values), new CodeFormatCleanUp(values), new SortMembersCleanUp(values) }; }
@Override public String getPreview() { StringBuffer buf= new StringBuffer(); if (isEnabled(CleanUpConstants.ORGANIZE_IMPORTS)) { buf.append("import org.model.Engine;\n"); //$NON-NLS-1$ } else { buf.append("import org.model.*;\n"); //$NON-NLS-1$ } return buf.toString(); }
protected ICleanUp[] createPreviewCleanUps(Map values) { return new ICleanUp[] { new ImportsCleanUp(values), new CommentFormatCleanUp(values), new CodeFormatCleanUp(values), new SortMembersCleanUp(values) }; }
/** * {@inheritDoc} */ public String getPreview() { StringBuffer buf= new StringBuffer(); if (isEnabled(CleanUpConstants.ORGANIZE_IMPORTS)) { buf.append("import org.model.Engine;\n"); //$NON-NLS-1$ } else { buf.append("import org.model.*;\n"); //$NON-NLS-1$ } return buf.toString(); }
public static ICleanUp[] createCleanUps() { return new ICleanUp[] { new CodeStyleCleanUp(), new ControlStatementsCleanUp(), new ConvertLoopCleanUp(), new VariableDeclarationCleanUp(), new ExpressionsCleanUp(), new UnusedCodeCleanUp(), new Java50CleanUp(), new PotentialProgrammingProblemsCleanUp(), new UnnecessaryCodeCleanUp(), new StringCleanUp(), new SortMembersCleanUp(), new ImportsCleanUp(), new CodeFormatCleanUp(), new CommentFormatCleanUp()}; }
@Override public CleanUpRequirements getRequirements() { boolean isOrganizeImports= isEnabled(CleanUpConstants.ORGANIZE_IMPORTS); return new CleanUpRequirements(isOrganizeImports, isOrganizeImports, false, null); }
public static ICleanUp[] createCleanUps(Map settings) { return new ICleanUp[] { new CodeStyleCleanUp(settings), new ControlStatementsCleanUp(settings), new ConvertLoopCleanUp(settings), new VariableDeclarationCleanUp(settings), new ExpressionsCleanUp(settings), new UnusedCodeCleanUp(settings), new Java50CleanUp(settings), new PotentialProgrammingProblemsCleanUp(settings), new UnnecessaryCodeCleanUp(settings), new StringCleanUp(settings), new SortMembersCleanUp(settings), new ImportsCleanUp(settings), new CodeFormatCleanUp(settings), new CommentFormatCleanUp(settings)}; } }
/** * {@inheritDoc} */ public IFix createFix(final CompilationUnit compilationUnit) throws CoreException { return ImportsFix.createCleanUp(compilationUnit, fCodeGeneratorSettings, isEnabled(CleanUpConstants.ORGANIZE_IMPORTS), fStatus); }
/** * {@inheritDoc} */ public boolean needsFreshAST(CompilationUnit compilationUnit) { if (isEnabled(CleanUpConstants.ORGANIZE_IMPORTS)) return true; return super.needsFreshAST(compilationUnit); }
@Override public CleanUpRequirements getRequirements() { boolean isOrganizeImports= isEnabled(CleanUpConstants.ORGANIZE_IMPORTS); return new CleanUpRequirements(isOrganizeImports, isOrganizeImports, false, null); }
@Override public ICleanUpFix createFix(CleanUpContext context) throws CoreException { CompilationUnit compilationUnit= context.getAST(); if (compilationUnit == null) return null; return ImportsFix.createCleanUp(compilationUnit, fCodeGeneratorSettings, isEnabled(CleanUpConstants.ORGANIZE_IMPORTS), fStatus); }