Package net.sf.rej

Examples of net.sf.rej.AbstractIteratorAgent


  }

  public void findMethodRefs(String className, String methodName,
      Descriptor desc) {
    MainWindow.getInstance().getSearchTab().clear();
    AbstractIteratorAgent iterator = new FindMethodRefs(className, methodName, desc);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
    MainWindow.getInstance().setTab(Tab.SEARCH);
    SystemFacade.getInstance().search(iterator);
  }
View Full Code Here


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

  public void findFieldRefs(String className, String fieldName, Descriptor desc) {
    MainWindow.getInstance().getSearchTab().clear();
    AbstractIteratorAgent iterator = new FindFieldRefs(className, fieldName, desc);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
    MainWindow.getInstance().setTab(Tab.SEARCH);
    SystemFacade.getInstance().search(iterator);
  }
View Full Code Here

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

  public void findClassRefs(String className) {
    MainWindow.getInstance().getSearchTab().clear();
    AbstractIteratorAgent iterator = new FindClassRefs(className);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
    MainWindow.getInstance().setTab(Tab.SEARCH);
    SystemFacade.getInstance().search(iterator);
  }
View Full Code Here

  }

  public void findMethodDefinition(String className,
      String methodName, Descriptor desc) {
    MainWindow.getInstance().getSearchTab().clear();
    AbstractIteratorAgent iterator = new FindMethodDefinition(className, methodName, desc);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
    MainWindow.getInstance().setTab(Tab.SEARCH);
    SystemFacade.getInstance().search(iterator);
  }
View Full Code Here

  }

  public void findFieldDefinition(String className,
      String fieldName, Descriptor desc) {
    MainWindow.getInstance().getSearchTab().clear();
    AbstractIteratorAgent iterator = new FindFieldDefinition(className, fieldName, desc);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
    MainWindow.getInstance().setTab(Tab.SEARCH);
    SystemFacade.getInstance().search(iterator);
  }
View Full Code Here

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

  public void findClassDefinition(String className) {
    MainWindow.getInstance().getSearchTab().clear();
    AbstractIteratorAgent iterator = new FindClassDefinition(className);
    iterator.setProgressMonitor(SystemFacade.getInstance()
        .getProgressMonitor());
    MainWindow.getInstance().setTab(Tab.SEARCH);
    SystemFacade.getInstance().search(iterator);
  }
View Full Code Here

    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);
                }
               
                @Override
                public void postProcessFile(IterationContext ic) {
                  super.postProcessFile(ic);
                    if (batch) {
                      save(ic);
                    }
                }
          };
          obfuscators.add(agent);
        }

        for (int i = 0; i < obfuscators.size(); i++) {
            AbstractIteratorAgent obf = (AbstractIteratorAgent)obfuscators.get(i);
            obf.setProgressMonitor(SystemFacade.getInstance().
                                   getProgressMonitor());
        }
        ProjectIterator.iterate(project, obfuscators, new IterationNotificationListener() {

      public void finished() {
View Full Code Here

TOP

Related Classes of net.sf.rej.AbstractIteratorAgent

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.