Search in sources :

Example 11 with TextChangeManager

use of org.eclipse.jdt.internal.corext.refactoring.util.TextChangeManager in project che by eclipse.

the class MoveCuUpdateCreator method createChangeManager.

public TextChangeManager createChangeManager(IProgressMonitor pm, RefactoringStatus status) throws JavaModelException {
    //$NON-NLS-1$
    pm.beginTask("", 5);
    try {
        TextChangeManager changeManager = new TextChangeManager();
        addUpdates(changeManager, new SubProgressMonitor(pm, 4), status);
        addImportRewriteUpdates(changeManager);
        return changeManager;
    } catch (JavaModelException e) {
        throw e;
    } catch (CoreException e) {
        throw new JavaModelException(e);
    } finally {
        pm.done();
    }
}
Also used : JavaModelException(org.eclipse.jdt.core.JavaModelException) CoreException(org.eclipse.core.runtime.CoreException) SubProgressMonitor(org.eclipse.core.runtime.SubProgressMonitor) TextChangeManager(org.eclipse.jdt.internal.corext.refactoring.util.TextChangeManager)

Aggregations

TextChangeManager (org.eclipse.jdt.internal.corext.refactoring.util.TextChangeManager)11 SubProgressMonitor (org.eclipse.core.runtime.SubProgressMonitor)7 ICompilationUnit (org.eclipse.jdt.core.ICompilationUnit)6 RefactoringStatus (org.eclipse.ltk.core.refactoring.RefactoringStatus)6 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)5 IFile (org.eclipse.core.resources.IFile)3 ASTNode (org.eclipse.jdt.core.dom.ASTNode)3 CompilationUnit (org.eclipse.jdt.core.dom.CompilationUnit)3 ArrayList (java.util.ArrayList)2 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)2 IType (org.eclipse.jdt.core.IType)2 BodyDeclaration (org.eclipse.jdt.core.dom.BodyDeclaration)2 ImportRewrite (org.eclipse.jdt.core.dom.rewrite.ImportRewrite)2 CompilationUnitChange (org.eclipse.jdt.core.refactoring.CompilationUnitChange)2 SearchResultGroup (org.eclipse.jdt.internal.corext.refactoring.SearchResultGroup)2 ReferencesInBinaryContext (org.eclipse.jdt.internal.corext.refactoring.base.ReferencesInBinaryContext)2 TextChange (org.eclipse.ltk.core.refactoring.TextChange)2 MultiTextEdit (org.eclipse.text.edits.MultiTextEdit)2 TextEdit (org.eclipse.text.edits.TextEdit)2 TextEditGroup (org.eclipse.text.edits.TextEditGroup)2