Package org.eclipse.ltk.core.refactoring

Examples of org.eclipse.ltk.core.refactoring.RefactoringStatus.addFatalError()


    @Override
    public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
        RefactoringStatus status = new RefactoringStatus();
        if (file==null || file.isReadOnly())
            status.addFatalError("File don't exists or is read only");
        return status;
    }

    @Override
    public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
View Full Code Here


                    cache.add(new SubprocessPresentation(subprocess, variableName, replacement));
                }
            }
        } catch (Exception e) {
            DesignerLogger.logErrorWithoutDialog(e.getMessage(), e);
            result.addFatalError(Messages.getString("UnhandledException"));
        }
        return result;
    }

    @Override
View Full Code Here

      {
        characterSetIdentFound = true;
      }     
    }
    if (!characterSetIdentFound)
      result.addFatalError( CoreTexts.renameProductionRefactor_noProduction );
   
    pm.done();
    return result;
  }
View Full Code Here

      {
        characterSetIdentFound = true;
      }     
    }
    if (!characterSetIdentFound)
      result.addFatalError( CoreTexts.renameTokenRefactor_noToken );
   
    pm.done();
    return result;
  }
View Full Code Here

      {
        characterSetIdentFound = true;
      }     
    }
    if (!characterSetIdentFound)
      result.addFatalError( CoreTexts.renameCharacterSetRefactor_noCharacter );
   
    pm.done();
    return result;
  }
View Full Code Here

    RefactoringStatus result = new RefactoringStatus();
   
    //Check if file exists
    IFile sourceFile = getFile(info.getAtgEditor());
    if( sourceFile == null || !sourceFile.exists() ) {
      result.addFatalError( CoreTexts.renameRefactor_noSourceFile );
    }
   
    //Check if file is .atg (case insensitive)
    if( !sourceFile.getFileExtension().toLowerCase().equals("atg")) {
      result.addFatalError( CoreTexts.renameRefactor_noAtgFile );
View Full Code Here

      result.addFatalError( CoreTexts.renameRefactor_noSourceFile );
    }
   
    //Check if file is .atg (case insensitive)
    if( !sourceFile.getFileExtension().toLowerCase().equals("atg")) {
      result.addFatalError( CoreTexts.renameRefactor_noAtgFile );
    }
   
    //Check if file is writeable
    if(sourceFile.isReadOnly() ) {
      result.addFatalError( CoreTexts.renameRefactor_roFile );
View Full Code Here

      result.addFatalError( CoreTexts.renameRefactor_noAtgFile );
    }
   
    //Check if file is writeable
    if(sourceFile.isReadOnly() ) {
      result.addFatalError( CoreTexts.renameRefactor_roFile );
    }
   
    //Check if file is free of Coco/R Errors
    if (checkATGErrors) {
      try {
View Full Code Here

        sourceFile.getProject().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, pm);
        IMarker[] markers = sourceFile.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);
       
        for (IMarker m : markers){
          if (m.getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO) == IMarker.SEVERITY_ERROR) {
            result.addFatalError( CoreTexts.renameRefactor_errorsInFile );                     
          }
        }
      } catch (CoreException e) {
        result.addFatalError( CoreTexts.renameRefactor_buildFailed );
      }
View Full Code Here

          if (m.getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO) == IMarker.SEVERITY_ERROR) {
            result.addFatalError( CoreTexts.renameRefactor_errorsInFile );                     
          }
        }
      } catch (CoreException e) {
        result.addFatalError( CoreTexts.renameRefactor_buildFailed );
      }
    }
    return result;
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.