Package net.sf.rej.gui.editor.iteration

Examples of net.sf.rej.gui.editor.iteration.RefactoringIterator


    SystemFacade.getInstance().search(iterator);
  }

  public void refactorClassName(String oldClassName, String newClassName) {
    RefactoringAdvisor advisor = new RefactorClassNameAdvisor(oldClassName, newClassName);
    AbstractIteratorAgent iterator = new RefactoringIterator(advisor, false);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
        ProjectIterator.iterate(this.openProject, iterator);
  }
View Full Code Here


        ProjectIterator.iterate(this.openProject, iterator);
  }

  public void refactorMethodName(String className, Descriptor desc, String oldMethodName, String newMethodName) {
    RefactoringAdvisor advisor = new RefactorMethodNameAdvisor(className, desc, oldMethodName, newMethodName);
    AbstractIteratorAgent iterator = new RefactoringIterator(advisor, false);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
        ProjectIterator.iterate(this.openProject, iterator);
  }
View Full Code Here

        ProjectIterator.iterate(this.openProject, iterator);
  }

  public void refactorFieldName(String className, Descriptor desc, String oldFieldName, String newFieldName) {
    RefactoringAdvisor advisor = new RefactorFieldNameAdvisor(className, desc, oldFieldName, newFieldName);
    AbstractIteratorAgent iterator = new RefactoringIterator(advisor, false);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
        ProjectIterator.iterate(this.openProject, iterator);
  }
View Full Code Here

            });
        }
       
        if (this.renameClassesCheck.isSelected()) {
          ClassNameObfuscatingAdvisor nameObfuscatorAdvisor = new ClassNameObfuscatingAdvisor(classNames);
          AbstractIteratorAgent agent = new RefactoringIterator(nameObfuscatorAdvisor, batch) {
            @Override
                public void processException(Exception ex) {
                    SystemFacade.getInstance().handleException(ex);
                }
               
                @Override
                public void postProcessFile(IterationContext ic) {
                  super.postProcessFile(ic);
                    if (batch) {
                      save(ic);
                    }
                }
          };
          obfuscators.add(agent);
        }

        /*
        if (this.renameFieldsCheck.isSelected()) {
          List<String> classNames = SystemFacade.getInstance().getClassIndex().getClassNames(project.getFileSet());
          FieldNameObfuscatingAdvisor nameObfuscatorAdvisor = new FieldNameObfuscatingAdvisor(classNames);
          AbstractIteratorAgent agent = new RefactoringIterator(nameObfuscatorAdvisor);
          obfuscators.add(agent);
        }*/

        if (this.legalizeClassesCheck.isSelected()) {
          ClassNameLegalizingAdvisor nameLegalizingAdvisor = new ClassNameLegalizingAdvisor(classNames);
          AbstractIteratorAgent agent = new RefactoringIterator(nameLegalizingAdvisor, batch) {
            @Override
                public void processException(Exception ex) {
                    SystemFacade.getInstance().handleException(ex);
                }
               
                @Override
                public void postProcessFile(IterationContext ic) {
                  super.postProcessFile(ic);
                    if (batch) {
                      save(ic);
                    }
                }

          };
          obfuscators.add(agent);
        }

        if (this.legalizeMethodsCheck.isSelected()) {
          MethodNameLegalizingAdvisor nameLegalizingAdvisor = new MethodNameLegalizingAdvisor(classNames);
          AbstractIteratorAgent agent = new RefactoringIterator(nameLegalizingAdvisor, batch) {
            @Override
                public void processException(Exception ex) {
                    SystemFacade.getInstance().handleException(ex);
                }
               
                @Override
                public void postProcessFile(IterationContext ic) {
                  super.postProcessFile(ic);
                    if (batch) {
                      save(ic);
                    }
                }
          };
          obfuscators.add(agent);
        }

        if (this.legalizeFieldsCheck.isSelected()) {
          FieldNameLegalizingAdvisor nameLegalizingAdvisor = new FieldNameLegalizingAdvisor(classNames);
          AbstractIteratorAgent agent = new RefactoringIterator(nameLegalizingAdvisor, batch) {
            @Override
                public void processException(Exception ex) {
                    SystemFacade.getInstance().handleException(ex);
                }
               
View Full Code Here

TOP

Related Classes of net.sf.rej.gui.editor.iteration.RefactoringIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.