Examples of IJavaModelStatus


Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

*  <li>INVALID_CONTENTS - The source is <code>null</code> or has serious syntax errors.
  *  <li>NAME_COLLISION - A name collision occurred in the destination
* </ul>
*/
public IJavaModelStatus verify() {
  IJavaModelStatus status = super.verify();
  if (!status.isOK()) {
    return status;
  }
  if (this.source == null) {
    return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CONTENTS);
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

    }
    PerProjectInfo perProjectInfo = getPerProjectInfo();

    // use synchronized block to ensure consistency
    IClasspathEntry[] resolvedClasspath;
    IJavaModelStatus unresolvedEntryStatus;
    synchronized (perProjectInfo) {
      resolvedClasspath = perProjectInfo.resolvedClasspath;
      unresolvedEntryStatus = perProjectInfo.unresolvedEntryStatus;
    }
   
    if (resolvedClasspath == null
        || (unresolvedEntryStatus != null && !unresolvedEntryStatus.isOK())) { // force resolution to ensure initializers are run again
      resolveClasspath(perProjectInfo);
      synchronized (perProjectInfo) {
        resolvedClasspath = perProjectInfo.resolvedClasspath;
        unresolvedEntryStatus = perProjectInfo.unresolvedEntryStatus;
      }
    }
    if (!ignoreUnresolvedEntry && unresolvedEntryStatus != null && !unresolvedEntryStatus.isOK())
      throw new JavaModelException(unresolvedEntryStatus);
    return resolvedClasspath;
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

      manager.setClasspathBeingResolved(this, true);
     
      // get raw info inside a synchronized block to ensure that it is consistent
      IClasspathEntry[] rawClasspath;
      IPath outputLocation;
      IJavaModelStatus rawClasspathStatus;
      synchronized (perProjectInfo) {
        rawClasspath= perProjectInfo.rawClasspath;
        if (rawClasspath == null)
          rawClasspath = perProjectInfo.readAndCacheClasspath(this);
        outputLocation = perProjectInfo.outputLocation;
        rawClasspathStatus = perProjectInfo.rawClasspathStatus;
      }
            
      IJavaModelStatus unresolvedEntryStatus = JavaModelStatus.VERIFIED_OK;
      HashMap rawReverseMap = new HashMap();
      Map rootPathToResolvedEntries = new HashMap();
     
      ArrayList resolvedEntries = new ArrayList();
      int length = rawClasspath.length;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

                    String description = container.getDescription();
                    if (description == null) description = path.makeRelative().toString();
                    return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CP_CONTAINER_ENTRY, project, path);
                }
                if (recurseInContainers) {
                  IJavaModelStatus containerEntryStatus = validateClasspathEntry(project, containerEntry, checkSourceAttachment, recurseInContainers);
                  if (!containerEntryStatus.isOK()){
                    return containerEntryStatus;
                  }
                }
              }
            }
          } catch(JavaModelException e){
            return new JavaModelStatus(e);
          }
        } else {
          return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CLASSPATH, Messages.bind(Messages.classpath_illegalContainerPath, new String[] {entryPathMsg, projectName}));
        }
        break;

      // variable entry check
      case IClasspathEntry.CPE_VARIABLE :
        if (path.segmentCount() >= 1){
          try {
            entry = JavaCore.getResolvedClasspathEntry(entry);
          } catch (AssertionFailedException e) {
            // Catch the assertion failure and throw java model exception instead
            // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=55992
            return new JavaModelStatus(IJavaModelStatusConstants.INVALID_PATH, e.getMessage());
          }
          if (entry == null){
            return new JavaModelStatus(IJavaModelStatusConstants.CP_VARIABLE_PATH_UNBOUND, project, path);
          }

          // get validation status
          IJavaModelStatus status = validateClasspathEntry(project, entry, checkSourceAttachment, recurseInContainers);
          if (!status.isOK()) return status;

          // return deprecation status if any
          String variableName = path.segment(0);
          String deprecatedMessage = JavaCore.getClasspathVariableDeprecationMessage(variableName);
          if (deprecatedMessage != null) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

* </ul>
* @see IJavaModelStatus
* @see JavaConventions
*/
public IJavaModelStatus verify() {
  IJavaModelStatus status = super.verify();
  if (!status.isOK()) {
    return status;
  }
  IJavaProject project = getParentElement().getJavaProject();
  if (JavaConventions.validateImportDeclaration(this.importName, project.getOption(JavaCore.COMPILER_SOURCE, true), project.getOption(JavaCore.COMPILER_COMPLIANCE, true)).getSeverity() == IStatus.ERROR) {
    return new JavaModelStatus(IJavaModelStatusConstants.INVALID_NAME, this.importName);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

}
/**
* @see MultiOperation
*/
protected IJavaModelStatus verify() {
  IJavaModelStatus status = super.verify();
  if (! status.isOK())
    return status;
  if (this.renamingsList == null || this.renamingsList.length == 0)
    return new JavaModelStatus(IJavaModelStatusConstants.NULL_NAME);
  return JavaModelStatus.VERIFIED_OK;
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

    }
   
    // use synchronized block to ensure consistency
    IClasspathEntry[] rawClasspath;
    IPath outputLocation;
    IJavaModelStatus status;
    synchronized (perProjectInfo) {
      rawClasspath = perProjectInfo.rawClasspath;
      outputLocation = perProjectInfo.outputLocation;
      status = perProjectInfo.rawClasspathStatus; // status has been set during POST_CHANGE
    }
   
    // update classpath format problems
    this.project.flushClasspathProblemMarkers(false/*cycle*/, true/*format*/);
    if (!status.isOK())
      this.project.createClasspathProblemMarker(status)
   
    // update resolved classpath problems
    this.project.flushClasspathProblemMarkers(false/*cycle*/, false/*format*/);
   
    if (rawClasspath != JavaProject.INVALID_CLASSPATH && outputLocation != null) {
       for (int i = 0; i < rawClasspath.length; i++) {
        status = ClasspathEntry.validateClasspathEntry(this.project, rawClasspath[i], false/*src attach*/, true /*recurse in container*/);
        if (!status.isOK()) {
          if (status.getCode() == IJavaModelStatusConstants.INVALID_CLASSPATH && ((ClasspathEntry) rawClasspath[i]).isOptional())
            continue; // ignore this entry
          this.project.createClasspathProblemMarker(status)
        }
       }
      status = ClasspathEntry.validateClasspath(this.project, rawClasspath, outputLocation);
      if (!status.isOK())
        this.project.createClasspathProblemMarker(status);
     }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

* </ul>
* @see IJavaModelStatus
* @see JavaConventions
*/
public IJavaModelStatus verify() {
  IJavaModelStatus status = super.verify();
  if (!status.isOK()) {
    return status;
  }
  IJavaProject project = getParentElement().getJavaProject();
  if (JavaConventions.validatePackageName(this.name, project.getOption(JavaCore.COMPILER_SOURCE, true), project.getOption(JavaCore.COMPILER_COMPLIANCE, true)).getSeverity() == IStatus.ERROR) {
    return new JavaModelStatus(IJavaModelStatusConstants.INVALID_NAME, this.name);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

    buffer.append(this.newOutputLocation.toString());
    return buffer.toString();
  }

  public IJavaModelStatus verify() {
    IJavaModelStatus status = super.verify();
    if (!status.isOK())
      return status;
    return ClasspathEntry.validateClasspaththis.project, this.newRawClasspath, this.newOutputLocation);
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IJavaModelStatus

*  <li>INDEX_OUT_OF_BOUNDS - the number of renamings supplied to the operation
*    does not match the number of elements that were supplied.
* </ul>
*/
protected IJavaModelStatus verify() {
  IJavaModelStatus status = super.verify();
  if (!status.isOK()) {
    return status;
  }
  if (this.renamingsList != null && this.renamingsList.length != this.elementsToProcess.length) {
    return new JavaModelStatus(IJavaModelStatusConstants.INDEX_OUT_OF_BOUNDS);
  }
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.