-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
101 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 0 additions & 61 deletions
61
...ython.pydev.refactoring/src/org/python/pydev/refactoring/ast/visitors/VisitorFactory.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,12 +14,12 @@ | |
* Contributors: | ||
* Fabio Zadrozny <[email protected]> - initial implementation | ||
******************************************************************************/ | ||
/* | ||
/* | ||
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler | ||
* Copyright (C) 2007 Reto Schuettel, Robin Stocker | ||
* | ||
* IFS Institute for Software, HSR Rapperswil, Switzerland | ||
* | ||
* | ||
*/ | ||
|
||
package org.python.pydev.refactoring.coderefactoring.extractmethod; | ||
|
@@ -32,9 +32,8 @@ | |
import org.eclipse.ltk.core.refactoring.RefactoringStatus; | ||
import org.python.pydev.ast.adapters.IClassDefAdapter; | ||
import org.python.pydev.ast.adapters.ModuleAdapter; | ||
import org.python.pydev.ast.adapters.visitors.selection.SelectionException; | ||
import org.python.pydev.core.log.Log; | ||
import org.python.pydev.refactoring.ast.visitors.VisitorFactory; | ||
import org.python.pydev.refactoring.ast.visitors.selection.SelectionException; | ||
import org.python.pydev.refactoring.core.base.AbstractPythonRefactoring; | ||
import org.python.pydev.refactoring.core.base.RefactoringInfo; | ||
import org.python.pydev.refactoring.core.base.RefactoringInfo.SelectionComputer; | ||
|
@@ -70,7 +69,8 @@ public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws Core | |
} | ||
|
||
try { | ||
VisitorFactory.validateSelection(selectionComputer.selectionModuleAdapter); | ||
org.python.pydev.ast.adapters.visitors.VisitorFactory | ||
.validateSelection(selectionComputer.selectionModuleAdapter); | ||
} catch (SelectionException e) { | ||
status.addFatalError(e.getMessage()); | ||
return status; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ | |
* Contributors: | ||
* Fabio Zadrozny <[email protected]> - initial implementation | ||
******************************************************************************/ | ||
/* | ||
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler | ||
/* | ||
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler | ||
*/ | ||
|
||
package org.python.pydev.refactoring.tests.adapter; | ||
|
@@ -24,7 +24,6 @@ | |
import org.python.pydev.ast.adapters.FunctionDefAdapter; | ||
import org.python.pydev.ast.adapters.IClassDefAdapter; | ||
import org.python.pydev.ast.adapters.ModuleAdapter; | ||
import org.python.pydev.refactoring.ast.visitors.VisitorFactory; | ||
import org.python.pydev.refactoring.tests.core.AbstractIOTestCase; | ||
|
||
public class FunctionDefAdapterTestCase extends AbstractIOTestCase { | ||
|
@@ -37,7 +36,8 @@ public FunctionDefAdapterTestCase(String name) { | |
@Override | ||
public void runTest() throws Throwable { | ||
StringBuffer buffer = new StringBuffer(); | ||
ModuleAdapter module = org.python.pydev.ast.adapters.visitors.VisitorFactory.createModuleAdapter(null, null, new Document(data.source), | ||
ModuleAdapter module = org.python.pydev.ast.adapters.visitors.VisitorFactory.createModuleAdapter(null, null, | ||
new Document(data.source), | ||
new PythonNatureStub(), createVersionProvider()); | ||
List<IClassDefAdapter> classes = module.getClasses(); | ||
assertTrue(classes.size() > 0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ | |
* Contributors: | ||
* Fabio Zadrozny <[email protected]> - initial implementation | ||
******************************************************************************/ | ||
/* | ||
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler | ||
/* | ||
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler | ||
*/ | ||
|
||
package org.python.pydev.refactoring.tests.codegenerator.generateproperties; | ||
|
@@ -30,7 +30,6 @@ | |
import org.python.pydev.ast.adapters.IClassDefAdapter; | ||
import org.python.pydev.ast.adapters.ModuleAdapter; | ||
import org.python.pydev.core.MisconfigurationException; | ||
import org.python.pydev.refactoring.ast.visitors.VisitorFactory; | ||
import org.python.pydev.refactoring.codegenerator.generateproperties.edit.DeleteMethodEdit; | ||
import org.python.pydev.refactoring.codegenerator.generateproperties.edit.GetterMethodEdit; | ||
import org.python.pydev.refactoring.codegenerator.generateproperties.edit.PropertyEdit; | ||
|
@@ -90,7 +89,8 @@ private IDocument applyGenerateProperties(MockupGeneratePropertiesRequestProcess | |
|
||
private MockupGeneratePropertiesRequestProcessor setupRequestProcessor(MockupGeneratePropertiesConfig config) | ||
throws Throwable { | ||
ModuleAdapter module = org.python.pydev.ast.adapters.visitors.VisitorFactory.createModuleAdapter(null, null, new Document(data.source), | ||
ModuleAdapter module = org.python.pydev.ast.adapters.visitors.VisitorFactory.createModuleAdapter(null, null, | ||
new Document(data.source), | ||
new PythonNatureStub(), createVersionProvider()); | ||
List<IClassDefAdapter> classes = module.getClasses(); | ||
assertTrue(classes.size() > 0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* Contributors: | ||
* Fabio Zadrozny <[email protected]> - initial implementation | ||
******************************************************************************/ | ||
/* | ||
/* | ||
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler | ||
* Copyright (C) 2007 Reto Schuettel, Robin Stocker | ||
*/ | ||
|
@@ -35,7 +35,6 @@ | |
import org.python.pydev.core.MisconfigurationException; | ||
import org.python.pydev.parser.jython.ParseException; | ||
import org.python.pydev.parser.jython.ast.Module; | ||
import org.python.pydev.refactoring.ast.visitors.VisitorFactory; | ||
import org.python.pydev.refactoring.coderefactoring.extractmethod.edit.ExtractCallEdit; | ||
import org.python.pydev.refactoring.coderefactoring.extractmethod.edit.ExtractMethodEdit; | ||
import org.python.pydev.refactoring.coderefactoring.extractmethod.edit.ParameterReturnDeduce; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ | |
* Contributors: | ||
* Fabio Zadrozny <[email protected]> - initial implementation | ||
******************************************************************************/ | ||
/* | ||
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler | ||
/* | ||
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler | ||
*/ | ||
|
||
package org.python.pydev.refactoring.tests.visitors; | ||
|
@@ -27,7 +27,6 @@ | |
import org.python.pydev.ast.adapters.context.ClassDefVisitor; | ||
import org.python.pydev.ast.adapters.context.GlobalAttributeVisitor; | ||
import org.python.pydev.ast.adapters.context.LocalAttributeVisitor; | ||
import org.python.pydev.refactoring.ast.visitors.VisitorFactory; | ||
import org.python.pydev.refactoring.tests.adapter.PythonNatureStub; | ||
import org.python.pydev.refactoring.tests.core.AbstractIOTestCase; | ||
|
||
|
@@ -40,16 +39,20 @@ public AttributeVisitorTestCase(String name) { | |
@Override | ||
public void runTest() throws Throwable { | ||
StringBuffer buffer = new StringBuffer(); | ||
ModuleAdapter module = org.python.pydev.ast.adapters.visitors.VisitorFactory.createModuleAdapter(null, null, new Document(data.source), | ||
ModuleAdapter module = org.python.pydev.ast.adapters.visitors.VisitorFactory.createModuleAdapter(null, null, | ||
new Document(data.source), | ||
new PythonNatureStub(), createVersionProvider()); | ||
GlobalAttributeVisitor globalVisitor = org.python.pydev.ast.adapters.visitors.VisitorFactory.createContextVisitor(GlobalAttributeVisitor.class, | ||
module.getASTNode(), module, module); | ||
ClassDefVisitor classVisitor = org.python.pydev.ast.adapters.visitors.VisitorFactory.createContextVisitor(ClassDefVisitor.class, module.getASTNode(), | ||
GlobalAttributeVisitor globalVisitor = org.python.pydev.ast.adapters.visitors.VisitorFactory | ||
.createContextVisitor(GlobalAttributeVisitor.class, | ||
module.getASTNode(), module, module); | ||
ClassDefVisitor classVisitor = org.python.pydev.ast.adapters.visitors.VisitorFactory.createContextVisitor( | ||
ClassDefVisitor.class, module.getASTNode(), | ||
module, module); | ||
assertTrue(classVisitor.getAll().size() > 0); | ||
|
||
ClassDefAdapter classDefAdapter = (ClassDefAdapter) classVisitor.getAll().get(0); | ||
LocalAttributeVisitor localVisitor = org.python.pydev.ast.adapters.visitors.VisitorFactory.createContextVisitor(LocalAttributeVisitor.class, | ||
LocalAttributeVisitor localVisitor = org.python.pydev.ast.adapters.visitors.VisitorFactory.createContextVisitor( | ||
LocalAttributeVisitor.class, | ||
classDefAdapter.getASTNode(), module, classDefAdapter); | ||
printAttributes(buffer, globalVisitor); | ||
printAttributes(buffer, localVisitor); | ||
|
Oops, something went wrong.