Search in sources :

Example 6 with IRefactorRenameProcess

use of com.python.pydev.analysis.refactoring.wizards.IRefactorRenameProcess in project Pydev by fabioz.

the class RefactoringRenameTestBase method checkProcessors.

/**
 * Checks if the refactor processes are all of the type we're testing here.
 */
protected void checkProcessors() {
    if (lastProcessorUsed != null) {
        List<IRefactorRenameProcess> processes = lastProcessorUsed.getAllProcesses();
        assertEquals(1, processes.size());
        Class processUnderTest = getProcessUnderTest();
        if (processUnderTest != null) {
            for (IRefactorRenameProcess p : processes) {
                assertTrue(StringUtils.format("Expected %s. Received:%s", processUnderTest, p.getClass()), // we should only activate the rename class process in this test case
                processUnderTest.isInstance(p));
            }
        }
    }
}
Also used : IRefactorRenameProcess(com.python.pydev.analysis.refactoring.wizards.IRefactorRenameProcess)

Aggregations

IRefactorRenameProcess (com.python.pydev.analysis.refactoring.wizards.IRefactorRenameProcess)6 HashMap (java.util.HashMap)3 HashSet (java.util.HashSet)3 Tuple (org.python.pydev.shared_core.structure.Tuple)3 Map (java.util.Map)2 RefactoringStatus (org.eclipse.ltk.core.refactoring.RefactoringStatus)2 IModule (org.python.pydev.core.IModule)2 ASTEntry (org.python.pydev.parser.visitors.scope.ASTEntry)2 PyRenameResourceChange (com.python.pydev.analysis.refactoring.changes.PyRenameResourceChange)1 File (java.io.File)1 IContainer (org.eclipse.core.resources.IContainer)1 IFile (org.eclipse.core.resources.IFile)1 IResource (org.eclipse.core.resources.IResource)1 IPath (org.eclipse.core.runtime.IPath)1 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)1 SubProgressMonitor (org.eclipse.core.runtime.SubProgressMonitor)1 IDocument (org.eclipse.jface.text.IDocument)1 TextChange (org.eclipse.ltk.core.refactoring.TextChange)1 TextFileChange (org.eclipse.ltk.core.refactoring.TextFileChange)1 MultiTextEdit (org.eclipse.text.edits.MultiTextEdit)1