Package org.eclipse.ltk.core.refactoring

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


    protected void applyRenameRefactoring(RefactoringRequest request, boolean expectError) throws CoreException {
        PyRenameEntryPoint processor = new PyRenameEntryPoint(request);
        NullProgressMonitor nullProgressMonitor = new NullProgressMonitor();
        checkStatus(processor.checkInitialConditions(nullProgressMonitor), expectError);
        checkStatus(processor.checkFinalConditions(nullProgressMonitor, null), expectError);
        Change change = processor.createChange(nullProgressMonitor);
        if (!expectError) {
            //otherwise, if there is an error, the change may be null
            change.perform(nullProgressMonitor);
        }
    }
View Full Code Here


      // TODO: make sure I should be including all config files
      for (IBeansConfig config : configs) {
        IResource resource = config.getElementResource();
        if (resource.isAccessible() && resource instanceof IFile) {
          Change refsChange = BeansRefactoringChangeUtils.createRenameBeanRefsChange((IFile) resource,
              oldBeanId, newBeanId, monitor);
          compositeChange.add(refsChange);
        }
      }
      return compositeChange;
View Full Code Here

  @Override
  protected void addChange(CompositeChange result, IResource resource, IProgressMonitor pm) throws CoreException {

    if (resource.exists()) {
      Change change = BeansRefactoringChangeUtils.createRenameChange((IFile) resource, getAffectedElements(),
          getNewNames(), pm);
      if (change != null) {
        result.add(change);
      }
    }
View Full Code Here

          return new RefactoringChangeDescriptor(idRefactoringDescriptor);
        }

      };

      Change change = BeansRefactoringChangeUtils.createRenameBeanIdChange(file, type, oldBeanId,
          beanId, updateReferences, pm);
      if (change != null) {
        compositeChange.add(change);
      }
      if (updateReferences) {
View Full Code Here

      throws CoreException {
    if (!visitedResources.contains(beansConfig) && !beansConfig.isElementArchived()) {
      IResource res = beansConfig.getElementResource();
      if (res.isAccessible() && res instanceof IFile) {
        visitedResources.add(beansConfig);
        Change refsChange = BeansRefactoringChangeUtils
            .createRenameBeanRefsChange((IFile) beansConfig.getElementResource(),
                descriptor, oldBeanId, beanId, pm);
        if (refsChange != null) {
          compositeChange.add(refsChange);
        }
View Full Code Here

  }

  @Override
  protected void addChange(CompositeChange result, IResource resource, IProgressMonitor pm) throws CoreException {
    if (resource.exists()) {
      Change change = BeansRefactoringChangeUtils.createRenameChange((IFile) resource, getAffectedElements(),
          getNewNames(), pm);
      if (change != null)
        result.add(change);
    }
  }
View Full Code Here

  }

  protected void addChange(CompositeChange result, IResource resource,
      IProgressMonitor pm) throws CoreException {
    if (resource.exists()) {
      Change change = BeansRefactoringChangeUtils
          .createMethodRenameChange((IFile) resource,
              new IJavaElement[] {refactoredMethod}, new String[] {newName}, pm);
      if (change != null)
        result.add(change);
    }
View Full Code Here

  }

  protected void addChange(CompositeChange result, IResource resource,
      IProgressMonitor pm) throws CoreException {
    if (resource.exists()) {
      Change change = BeansRefactoringChangeUtils
          .createConstructorArgumentRenameChange((IFile) resource,
              refactoredVariable, newName, pm);
      if (change != null)
        result.add(change);
    }
View Full Code Here

  }

  @Override
  protected void addChange(CompositeChange result, IResource resource, IProgressMonitor pm) throws CoreException {
    if (resource.exists()) {
      Change change = BeansRefactoringChangeUtils.createMethodRenameChange((IFile) resource,
          getAffectedElements(), getNewNames(), pm);
      if (change != null)
        result.add(change);
    }
  }
View Full Code Here

TOP

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

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.