Package org.eclipse.ltk.core.refactoring

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


   *
   * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(
   *   org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
   */
  public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) {
    return new RefactoringStatus();
  }
View Full Code Here


  protected boolean convertEntityBeansToPojos;
  protected boolean generateEntityManagerCode;
 
  public EJBMigrationRefactoring(IWorkspaceRoot workspaceRoot) {
    this.workspaceRoot = workspaceRoot;
    this.status = new RefactoringStatus();
  }
View Full Code Here

    this.status = new RefactoringStatus();
  }

  @Override
  public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {
    status = new RefactoringStatus();
   
    if (ejbJarXmlFile == null || ejbJarXmlFile.length() == 0) {
      status.addError(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.errorMsg.1")); //$NON-NLS-1$
    }
View Full Code Here

    return status;
  }

  @Override
  public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {
    return new RefactoringStatus();
  }
View Full Code Here

  }

  @Override
  public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
      throws CoreException, OperationCanceledException {
    return new RefactoringStatus();
  }
View Full Code Here

  }

  @Override
  public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
      throws CoreException, OperationCanceledException {
    RefactoringStatus result = super.checkInitialConditions(pm);
    pm.worked(50);
   
    //Check if Selection is a Production
    AtgAst atgAst = info.getAtgEditor().getAtgAstManager().getAtgAst();
    List<AbstractAtgAstNode> nodes =
      atgAst.getNodes(info.getOffset(), info.getOldName().length());
    boolean characterSetIdentFound = false;
    for (AbstractAtgAstNode node : nodes) {
      if (node instanceof IdentNode &&
        (((IdentNode) node).getKind() == IdentNode.Kind.PRODUCTION ||
         ((IdentNode) node).getKind() == IdentNode.Kind.COMPILER))
      {
        characterSetIdentFound = true;
      }     
    }
    if (!characterSetIdentFound)
      result.addFatalError( CoreTexts.renameProductionRefactor_noProduction );
   
    pm.done();
    return result;
  }
View Full Code Here

  }

  @Override
  public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
      throws CoreException, OperationCanceledException {
    RefactoringStatus result = new RefactoringStatus();
    pm.beginTask( CoreTexts.renameRefactor_checking, 100 );

    // nothing to be checked (yet)

    pm.done();
View Full Code Here

  }

  @Override
  public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
      throws CoreException, OperationCanceledException {
    RefactoringStatus result = super.checkInitialConditions(pm);
    pm.worked(50);
   
    //Check if Selection is a Token
    AtgAst atgAst = info.getAtgEditor().getAtgAstManager().getAtgAst();
    List<AbstractAtgAstNode> nodes =
      atgAst.getNodes(info.getOffset(), info.getOldName().length());
    boolean characterSetIdentFound = false;
    for (AbstractAtgAstNode node : nodes) {
      if (node instanceof IdentNode &&
        ((IdentNode) node).getKind() == IdentNode.Kind.TOKEN)
      {
        characterSetIdentFound = true;
      }     
    }
    if (!characterSetIdentFound)
      result.addFatalError( CoreTexts.renameTokenRefactor_noToken );
   
    pm.done();
    return result;
  }
View Full Code Here

  }

  @Override
  public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
      throws CoreException, OperationCanceledException {
    RefactoringStatus result = new RefactoringStatus();
    pm.beginTask( CoreTexts.renameRefactor_checking, 100 );

    // nothing to be checked (yet)

    pm.done();
View Full Code Here

  }

  @Override
  public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
      throws CoreException, OperationCanceledException {
    RefactoringStatus result = super.checkInitialConditions(pm);
    pm.worked(50);
   
    //Check if Selection is a CharacterSet
    AtgAst atgAst = info.getAtgEditor().getAtgAstManager().getAtgAst();
    List<AbstractAtgAstNode> nodes =
      atgAst.getNodes(info.getOffset(), info.getOldName().length());
    boolean characterSetIdentFound = false;
    for (AbstractAtgAstNode node : nodes) {
      if (node instanceof IdentNode &&
        ((IdentNode) node).getKind() == IdentNode.Kind.CHARACTER_SET)
      {
        characterSetIdentFound = true;
      }     
    }
    if (!characterSetIdentFound)
      result.addFatalError( CoreTexts.renameCharacterSetRefactor_noCharacter );
   
    pm.done();
    return result;
  }
View Full Code Here

TOP

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

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.