Package org.eclipse.ltk.core.refactoring

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


            _changes .add(change);
          }
         }
       
      } catch (Exception e) {
        _refactoringStatus.addEntry(new RefactoringStatusEntry(RefactoringStatus.WARNING, "Unable to create change for '" + info.getDescription() + "'. See log for details."));
        WGADesignerPlugin.getDefault().logError("Unable to create change for '" + info.getDescription() + "'.", e);
      }
    }
   
    return _refactoringStatus;
View Full Code Here


    if (element instanceof IContainer) {
      IContainer container = (IContainer) element;
      try {
        _refactoringInformations  = RefactoringManager.getAffectedResources(container, getArguments());
      } catch (Exception e) {
        _refactoringStatus.addEntry(new  RefactoringStatusEntry(RefactoringStatus.ERROR,"Unable to gather refactoring information. See error log for details. Essential refactoring operations will be skipped. Workspace structure might get invalid."));
        WGADesignerPlugin.getDefault().logError("Unable to gather refactoring information.", e);         
      }
     
    }
    return !_refactoringInformations.isEmpty();
View Full Code Here

    while (infos.hasNext()) {
      RefactoringInfo info = infos.next();
      try {
        _changes .add(RefactoringManager.createChange(info));
      } catch (Exception e) {
        _refactoringStatus.addEntry(new RefactoringStatusEntry(RefactoringStatus.WARNING, "Unable to create change for '" + info.getDescription() + "'. See log for details."));
        WGADesignerPlugin.getDefault().logError("Unable to create change for '" + info.getDescription() + "'. ", e);
      }
    }
   
    return _refactoringStatus;
View Full Code Here

    if (element instanceof IContainer) {
      IContainer container = (IContainer) element;
      try {
        _refactoringInformations = RefactoringManager.getAffectedResources(container, getArguments());
      } catch (Exception e) {
        _refactoringStatus .addEntry(new  RefactoringStatusEntry(RefactoringStatus.ERROR,"Unable to gather refactoring information. See error log for details. Essential refactoring operations will be skipped. Workspace structure might get invalid."));
        WGADesignerPlugin.getDefault().logError("Unable to gather refactoring information.", e);         
      }
      return !_refactoringInformations.isEmpty();
    } else {
      return false;
View Full Code Here

    while (infos.hasNext()) {
      RefactoringInfo info = infos.next();
      try {
        _changes.add(RefactoringManager.createChange(info));
      } catch (Exception e) {
        _refactoringStatus.addEntry(new RefactoringStatusEntry(RefactoringStatus.WARNING, "Unable to create change for '" + info.getDescription() + "'. See log for details."));
        WGADesignerPlugin.getDefault().logError("Unable to create change for '" + info.getDescription() + "'.", e);
      }
    }
   
    return _refactoringStatus;
View Full Code Here

    if (element instanceof IContainer) {
      IContainer container = (IContainer) element;
      try {
        _refactoringInformations  = RefactoringManager.getAffectedResources(container, getArguments());
      } catch (Exception e) {
        _refactoringStatus.addEntry(new  RefactoringStatusEntry(RefactoringStatus.ERROR,"Unable to gather refactoring information. See error log for details. Essential refactoring operations will be skipped. Workspace structure might get invalid."));
        WGADesignerPlugin.getDefault().logError("Unable to gather refactoring information.", e);         
      }
     
    }
    return !_refactoringInformations.isEmpty();
View Full Code Here

                logger.error(message);
                entries.add(createFatalRefactoringStatusEntry(message));
            }

            // further inspect change - destination folder, et al
            RefactoringStatusEntry entry = validateChangeComponent(component, changeCandidate, monitor);
            if (entry != null) {
                entries.add(entry);
            }
        }
View Full Code Here

        } else if (ContainerDelegate.getInstance().getServiceLocator().getProjectService().isComponentFolder(changeFolder)
                && ContainerDelegate.getInstance().getServiceLocator().getProjectService().isSourceFolder(getRefactorModel().getDestinationResource())) {

            // evaluate folders against object type permissions
            RefactoringStatusEntry entry = evaluateComponentTypeEnablementForComponentFolder(changeFolder, monitor);
            if (entry != null) {
                entries.add(entry);
            }

            // everything looks good!
View Full Code Here

            status = new ChangeRefactoringStatusContext((ChangeRefactorModel) refactorModel, message);
        } else {
            status = new ResourceRefactoringStatusContext(refactorModel, message);
        }

        return new RefactoringStatusEntry(severity, message, status, ForceIdeUIPlugin.getPluginId(),
                RefactoringStatusEntry.NO_CODE, null);
    }
View Full Code Here

            change.perform(nullProgressMonitor);
        }
    }

    protected void checkStatus(RefactoringStatus status, boolean expectError) {
        RefactoringStatusEntry err = status.getEntryMatchingSeverity(RefactoringStatus.ERROR);
        RefactoringStatusEntry fatal = status.getEntryMatchingSeverity(RefactoringStatus.FATAL);

        if (!expectError) {
            assertNull(err != null ? err.getMessage() : "", err);
            assertNull(fatal != null ? fatal.getMessage() : "", fatal);
        } else {
            assertNotNull(err);
            assertNotNull(fatal);
        }
    }
View Full Code Here

TOP

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

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.