/** * Creates a compilation unit change based on the events recorded by this compilation unit rewrite. * @param name the name of the change to create * @param generateGroups <code>true</code> to generate text edit groups, <code>false</code> otherwise * @param monitor the progress monitor or <code>null</code> * @return a {@link CompilationUnitChange}, or <code>null</code> for an empty change * @throws CoreException when text buffer acquisition or import rewrite text edit creation fails * @throws IllegalArgumentException when the AST rewrite encounters problems */ public CompilationUnitChange createChange(String name, boolean generateGroups, IProgressMonitor monitor) throws CoreException { CompilationUnitChange cuChange= new CompilationUnitChange(name, fCu); MultiTextEdit multiEdit= new MultiTextEdit(); cuChange.setEdit(multiEdit); return attachChange(cuChange, generateGroups, monitor); }
/** * Creates a compilation unit change based on the events recorded by this compilation unit rewrite. * @param name the name of the change to create * @param generateGroups <code>true</code> to generate text edit groups, <code>false</code> otherwise * @param monitor the progress monitor or <code>null</code> * @return a {@link CompilationUnitChange}, or <code>null</code> for an empty change * @throws CoreException when text buffer acquisition or import rewrite text edit creation fails * @throws IllegalArgumentException when the AST rewrite encounters problems */ public CompilationUnitChange createChange(String name, boolean generateGroups, IProgressMonitor monitor) throws CoreException { CompilationUnitChange cuChange= new CompilationUnitChange(name, fCu); MultiTextEdit multiEdit= new MultiTextEdit(); cuChange.setEdit(multiEdit); return attachChange(cuChange, generateGroups, monitor); }
/** * Creates a compilation unit change based on the events recorded by this compilation unit rewrite. * @param name the name of the change to create * @param generateGroups <code>true</code> to generate text edit groups, <code>false</code> otherwise * @param monitor the progress monitor or <code>null</code> * @return a {@link CompilationUnitChange}, or <code>null</code> for an empty change * @throws CoreException when text buffer acquisition or import rewrite text edit creation fails * @throws IllegalArgumentException when the AST rewrite encounters problems */ public CompilationUnitChange createChange(String name, boolean generateGroups, IProgressMonitor monitor) throws CoreException { CompilationUnitChange cuChange= new CompilationUnitChange(name, fCu); MultiTextEdit multiEdit= new MultiTextEdit(); cuChange.setEdit(multiEdit); return attachChange(cuChange, generateGroups, monitor); }
rewrites.put(whoToAdjust.getCompilationUnit(), rewrite); status.merge(rewriteVisibility(adjustments, rewrites, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL))); rewrite.attachChange((CompilationUnitChange) fTextChangeManager.get(whoToAdjust.getCompilationUnit()), true, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
rewrites.put(whoToAdjust.getCompilationUnit(), rewrite); status.merge(rewriteVisibility(adjustments, rewrites, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL))); rewrite.attachChange((CompilationUnitChange) fTextChangeManager.get(whoToAdjust.getCompilationUnit()), true, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
rewrites.put(whoToAdjust.getCompilationUnit(), rewrite); status.merge(rewriteVisibility(adjustments, rewrites, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL))); rewrite.attachChange((CompilationUnitChange) fTextChangeManager.get(whoToAdjust.getCompilationUnit()), true, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));