Package org.eclipse.ltk.core.refactoring

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


   
    Iterator<RefactoringInfo> infos = _refactoringInformations.iterator();
    while (infos.hasNext()) {
      RefactoringInfo info = infos.next();
      try {
       Change change = RefactoringManager.createChange(info);
        
         if(change != null){
           boolean ok =true;
          Object[] objs = change.getAffectedObjects();
          if(objs !=null){
            for(Object obj : objs){
              if(obj instanceof IResource){
                IResource currentResource = (IResource)obj;
                if(deltaFactory.getDelta().findMember(currentResource.getFullPath())!=null){
View Full Code Here


  @Override
  public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
    pm.beginTask(RefactoringCoreMessages.RenameRefactoring_checking, 1);

    try {
      Change result = new DynamicValidationRefactoringChange(createRefactoringDescriptor(), getProcessorName(), changeManager.getAllChanges());
      pm.worked(1);

      return result;
    } finally {
      changeManager.clear();
View Full Code Here

        pm.beginTask("Creating changes", changedFiles.size() + 1);
        final CompositeChange change = new CompositeChange(getName());
        pm.internalWorked(1);

        try {
            Change c;
            for (final ChangedFile e : changedFiles) {
                c = e.createChanges();
                if (c != null) {
                    change.add(c);
                    pm.internalWorked(1);
View Full Code Here

            if (newName == null || newName.length() == 0)
            {
                return null;
            }
            HaxeRenameProcessor processor = getAppropriateProcessor(node, newName);
            Change change = processor.createChange(null);
            IProgressMonitor monitor = new NullProgressMonitor();
            if (processor.checkFinalConditions(monitor, null).isOK())
            {
                change.perform(monitor);               
            }
        }
        catch (ClassCastException  e)
        {
            System.out.println(e.getMessage());
View Full Code Here

        }
      }
    }

    //unless there are actually new changes return null
    Change result = null;
    if(multiChange.getChildren().length > 0) {
      result = multiChange;
    }
   
    return result;
View Full Code Here

        multiChange.addAll(changes);
      }
    }

    //unless there are actually new changes return null
    Change result = null;
    if(multiChange.getChildren().length > 0) {
      result = multiChange;
    }
   
    return result;
View Full Code Here

   *
   * @return a {@link JSPRenameUndoChange} to undo this performed {@link Change}
   * @see org.eclipse.ltk.core.refactoring.TextChange#perform(org.eclipse.core.runtime.IProgressMonitor)
   */
  public Change perform(IProgressMonitor pm) throws CoreException {
    Change undoChange = null;
    try {
      //apply edit
      undoChange = super.perform(pm);
      undoChange = new JSPRenameUndoChange(this, undoChange);
     
View Full Code Here

   * @see JSPRenameUndoChange
   * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameChange#perform(org.eclipse.core.runtime.IProgressMonitor)
   */
  public Change perform(IProgressMonitor pm) throws CoreException {
    //apply edit
    Change redoChange = fUndoChange.perform(pm);
    redoChange = new JSPRenameUndoChange(this, redoChange);
   
    //save the file
    saveJSPFile(this.fJSPFile, this.getJSPDoc());
   
View Full Code Here

      MultiTextEdit javaEdit = (MultiTextEdit)fSearchDocPath2JavaEditMap.get(searchDocPath);
      delegate = support.getSearchDocument(searchDocPath);
     
      if(delegate != null && delegate instanceof JavaSearchDocumentDelegate) {
        JavaSearchDocumentDelegate javaDelegate = (JavaSearchDocumentDelegate)delegate;
        Change change = createChange(javaDelegate, javaDelegate.getJspTranslation().getJspEdit(javaEdit), participant);
        changes.add(change);
      }
    }
    return (Change[])changes.toArray(new Change[changes.size()]);
  }
View Full Code Here

        }
      }
    }

    //unless there are actually new changes return null
    Change result = null;
    if(multiChange.getChildren().length > 0) {
      result = multiChange;
    }
   
    return result;
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.