Package org.eclipse.ltk.core.refactoring

Examples of org.eclipse.ltk.core.refactoring.Refactoring


  /**
   * opens the rename wizard
   */
  private void openWizard() {
    Refactoring ref = getRefactoring();   
    RenameRefactorWizard wizard = new RenameRefactorWizard( ref, info );
    RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation( wizard );
    try {
      op.run( shell, "Rename Refactoring Wizard");
    } catch( final InterruptedException irex ) {
View Full Code Here


  /**
   * opens the reformat production wizard
   */
  private void openWizard() {
    Refactoring ref = new ReformatProductionRefactoring(info);   
    ReformatProductionWizard wizard = new ReformatProductionWizard( ref, info );
    RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation( wizard );
    try {
      op.run( shell, "Reformatting Wizard");
    } catch( final InterruptedException irex ) {
View Full Code Here

          }
          else {
            qualifiedName = newName;
          }
          p.setNewElementName(qualifiedName);
          Refactoring r = new RenameRefactoring(p);
          PerformRefactoringOperation op =
            new PerformRefactoringOperation(
                r,
                CheckConditionsOperation.FINAL_CONDITIONS
            );
View Full Code Here

        encapsulation.setVisibility(visiblityInt);
        encapsulation.setGetterName("get" + field.getElementName());
        encapsulation.setSetterName("set" + field.getElementName());
        // encapsulation.setGenerateJavadoc(true);
        // encapsulation.setConsiderVisibility(true);
        Refactoring r = encapsulation;
        PerformRefactoringOperation op =
          new PerformRefactoringOperation(
              r,
              CheckConditionsOperation.INITIAL_CONDITONS
          );
View Full Code Here

      if((javaElement!=null)&&(newName!=null)) {
        RenameFieldProcessor p;
        try {
          p = new RenameFieldProcessor(javaElement);
          p.setNewElementName(newName);
          Refactoring r = new RenameRefactoring(p);
          PerformRefactoringOperation op =
            new PerformRefactoringOperation(
                r,
                CheckConditionsOperation.FINAL_CONDITIONS
            );
View Full Code Here

    public void run(IProgressMonitor monitor)
    throws InvocationTargetException, InterruptedException {
      if((javaElement!=null)&&(newName!=null)) {
        // RenameFieldProcessor p = null;
        try {
          Refactoring r =
            null
            /*new ChangeTypeRefactoring(
                null,
                1,
                1,
View Full Code Here

            }
            else {
              p = new RenameTypeProcessor(javaElement);
            }
            p.setNewElementName(newName);
            Refactoring r = new RenameRefactoring(p);
            PerformRefactoringOperation op =
              new PerformRefactoringOperation(
                  r,
                  CheckConditionsOperation.FINAL_CONDITIONS
              );
View Full Code Here

              "rename.element.unable", element.getElementName()));
      }
    }

    JavaRenameProcessor processor = getProcessor(element, name, flags);
    Refactoring refactoring = new RenameRefactoring(processor);

    // create a more descriptive name than the default.
    String desc = refactoring.getName() +
      " (" + element.getElementName() + " -> " + name + ')';

    return new Refactor(desc, refactoring);
  }
View Full Code Here

    Shell shell = EclimPlugin.getShell();
    processor.setCreateTargetQueries(new CreateTargetQueries(shell));
    processor.setReorgQueries(new ReorgQueries(shell));

    Refactoring refactoring = new MoveRefactoring(processor);

    // create a more descriptive name than the default.
    String desc = refactoring.getName() +
      " (" + src.getElementName() + " -> " + pack.getElementName() + ')';

    return new Refactor(desc, refactoring);
  }
View Full Code Here

    }

    try{
      NullProgressMonitor monitor = new NullProgressMonitor();
      Refactor refactor = createRefactoring(commandLine);
      Refactoring refactoring = refactor.refactoring;

      RefactoringStatus status = refactoring.checkAllConditions(
          new SubProgressMonitor(monitor, 4));
      int stopSeverity = RefactoringCore.getConditionCheckingFailedSeverity();
      if (status.getSeverity() >= stopSeverity) {
        throw new RefactorException(status);
      }

      Change change = refactoring.createChange(new SubProgressMonitor(monitor, 2));
      change.initializeValidationData(new SubProgressMonitor(monitor, 1));

      // preview
      if (commandLine.hasOption(PREVIEW_OPTION)){
        // preview a specific file
View Full Code Here

TOP

Related Classes of org.eclipse.ltk.core.refactoring.Refactoring

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.