Examples of PerProjectInfo


Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

   */
  protected void executeOperation() throws JavaModelException {
    checkCanceled();
    try {
      // set raw classpath and null out resolved info
      PerProjectInfo perProjectInfo = this.project.getPerProjectInfo();
      ClasspathChange classpathChange = perProjectInfo.setRawClasspath(this.newRawClasspath, this.referencedEntries, this.newOutputLocation, JavaModelStatus.VERIFIED_OK/*format is ok*/);

      // if needed, generate delta, update project ref, create markers, ...
      classpathChanged(classpathChange, true/*refresh if external linked folder already exists*/);

      // write .classpath file
      if (this.canChangeResources && perProjectInfo.writeAndCacheClasspath(this.project, this.newRawClasspath, this.newOutputLocation))
        setAttribute(HAS_MODIFIED_RESOURCE_ATTR, TRUE);
    } finally {
      done();
    }
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

}
/*
* @see IJavaElement#getAttachedJavadoc(IProgressMonitor)
*/
public String getAttachedJavadoc(IProgressMonitor monitor) throws JavaModelException {
  PerProjectInfo projectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfoCheckExistence(getJavaProject().getProject());
  String cachedJavadoc = null;
  synchronized (projectInfo.javadocCache) {
    cachedJavadoc = (String) projectInfo.javadocCache.get(this);
  }
  if (cachedJavadoc != null) {
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

    if ((modifiers & ClassFileConstants.AccSynthetic) != 0) {
      return this.parameterNames = getRawParameterNames(paramCount);
    }
    JavadocContents javadocContents = null;
    IType declaringType = getDeclaringType();
    PerProjectInfo projectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfoCheckExistence(getJavaProject().getProject());
    synchronized (projectInfo.javadocCache) {
      javadocContents = (JavadocContents) projectInfo.javadocCache.get(declaringType);
      if (javadocContents == null) {
        projectInfo.javadocCache.put(declaringType, BinaryType.EMPTY_JAVADOC);
      }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

   * @return IClasspathEntry
   * @throws JavaModelException
   */
  public IClasspathEntry getClasspathEntryFor(IPath path) throws JavaModelException {
    getResolvedClasspath(); // force resolution
    PerProjectInfo perProjectInfo = getPerProjectInfo();
    if (perProjectInfo == null)
      return null;
    Map rootPathToResolvedEntries = perProjectInfo.rootPathToResolvedEntries;
    if (rootPathToResolvedEntries == null)
      return null;
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

    return projectPrerequisites(getResolvedClasspath());
  }

  public IClasspathEntry[] getResolvedClasspath() throws JavaModelException {
    PerProjectInfo perProjectInfo = getPerProjectInfo();
    IClasspathEntry[] resolvedClasspath = perProjectInfo.getResolvedClasspath();
    if (resolvedClasspath == null) {
      resolveClasspath(perProjectInfo, false/*don't use previous session values*/, true/*add classpath change*/);
      resolvedClasspath = perProjectInfo.getResolvedClasspath();
      if (resolvedClasspath == null) {
        // another thread reset the resolved classpath, use a temporary PerProjectInfo
        PerProjectInfo temporaryInfo = newTemporaryInfo();
        resolveClasspath(temporaryInfo, false/*don't use previous session values*/, true/*add classpath change*/);
        resolvedClasspath = temporaryInfo.getResolvedClasspath();
      }
    }
    return resolvedClasspath;
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

    if  (JavaModelManager.getJavaModelManager().isClasspathBeingResolved(this)) {
      if (JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED)
        verbose_reentering_classpath_resolution();
        return RESOLUTION_IN_PROGRESS;
    }
    PerProjectInfo perProjectInfo = getPerProjectInfo();

    // use synchronized block to ensure consistency
    IClasspathEntry[] resolvedClasspath;
    IJavaModelStatus unresolvedEntryStatus;
    synchronized (perProjectInfo) {
      resolvedClasspath = perProjectInfo.getResolvedClasspath();
      unresolvedEntryStatus = perProjectInfo.unresolvedEntryStatus;
    }

    if (resolvedClasspath == null
        || (unresolvedEntryStatus != null && !unresolvedEntryStatus.isOK())) { // force resolution to ensure initializers are run again
      resolveClasspath(perProjectInfo, false/*don't use previous session values*/, true/*add classpath change*/);
      synchronized (perProjectInfo) {
        resolvedClasspath = perProjectInfo.getResolvedClasspath();
        unresolvedEntryStatus = perProjectInfo.unresolvedEntryStatus;
      }
      if (resolvedClasspath == null) {
        // another thread reset the resolved classpath, use a temporary PerProjectInfo
        PerProjectInfo temporaryInfo = newTemporaryInfo();
        resolveClasspath(temporaryInfo, false/*don't use previous session values*/, true/*add classpath change*/);
        resolvedClasspath = temporaryInfo.getResolvedClasspath();
        unresolvedEntryStatus = temporaryInfo.unresolvedEntryStatus;
      }
    }
    if (!ignoreUnresolvedEntry && unresolvedEntryStatus != null && !unresolvedEntryStatus.isOK())
      throw new JavaModelException(unresolvedEntryStatus);
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

   * Returns a PerProjectInfo that doesn't register classpath change
   * and that should be used as a temporary info.
   */
  public PerProjectInfo newTemporaryInfo() {
    return
      new PerProjectInfo(this.project.getProject()) {
        protected ClasspathChange addClasspathChange() {
          return null;
        }
    };
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

    for (int i = 0, length = projects.length; i < length; i++) {
      JavaProject project = (JavaProject) projects[i];
      IClasspathEntry[] classpath;
      try {
        if (usePreviousSession) {
          PerProjectInfo perProjectInfo = project.getPerProjectInfo();
          project.resolveClasspath(perProjectInfo, true/*use previous session values*/, false/*don't add classpath change*/);
          classpath = perProjectInfo.resolvedClasspath;
        } else {
          classpath = project.getResolvedClasspath();
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

   * @return IClasspathEntry
   * @throws JavaModelException
   */
  public IClasspathEntry getClasspathEntryFor(IPath path) throws JavaModelException {
    getResolvedClasspath(); // force resolution
    PerProjectInfo perProjectInfo = getPerProjectInfo();
    if (perProjectInfo == null)
      return null;
    Map rootPathToResolvedEntries = perProjectInfo.rootPathToResolvedEntries;
    if (rootPathToResolvedEntries == null)
      return null;
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo

    return projectPrerequisites(getResolvedClasspath());
  }

  public IClasspathEntry[] getResolvedClasspath() throws JavaModelException {
    PerProjectInfo perProjectInfo = getPerProjectInfo();
    IClasspathEntry[] resolvedClasspath = perProjectInfo.getResolvedClasspath();
    if (resolvedClasspath == null) {
      resolveClasspath(perProjectInfo, false/*don't use previous session values*/, true/*add classpath change*/);
      resolvedClasspath = perProjectInfo.getResolvedClasspath();
      if (resolvedClasspath == null) {
        // another thread reset the resolved classpath, use a temporary PerProjectInfo
        PerProjectInfo temporaryInfo = newTemporaryInfo();
        resolveClasspath(temporaryInfo, false/*don't use previous session values*/, true/*add classpath change*/);
        resolvedClasspath = temporaryInfo.getResolvedClasspath();
      }
    }
    return resolvedClasspath;
  }
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.