Examples of PerProjectInfo


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

    DeltaProcessor deltaProcessor = state.getDeltaProcessor();
    IClasspathEntry[] newResolvedClasspath = null;
    IPath newOutputLocation = null;
    int result = NO_DELTA;
    try {
      PerProjectInfo perProjectInfo = this.project.getPerProjectInfo();

      // get new info
      this.project.resolveClasspath(perProjectInfo, false/*don't use previous session values*/, addClasspathChange);
      IClasspathEntry[] newRawClasspath;

      // use synchronized block to ensure consistency
      synchronized (perProjectInfo) {
        newRawClasspath = perProjectInfo.rawClasspath;
        newResolvedClasspath = perProjectInfo.getResolvedClasspath();
        newOutputLocation = perProjectInfo.outputLocation;
      }

      if (newResolvedClasspath == null) {
        // another thread reset the resolved classpath, use a temporary PerProjectInfo
        PerProjectInfo temporaryInfo = this.project.newTemporaryInfo();
        this.project.resolveClasspath(temporaryInfo, false/*don't use previous session values*/, addClasspathChange);
        newRawClasspath = temporaryInfo.rawClasspath;
        newResolvedClasspath = temporaryInfo.getResolvedClasspath();
        newOutputLocation = temporaryInfo.outputLocation;
      }

      // check if raw classpath has changed
      if (this.oldRawClasspath != null && !JavaProject.areClasspathsEqual(this.oldRawClasspath, newRawClasspath, this.oldOutputLocation, newOutputLocation)) {
View Full Code Here

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

  }

  private void readRawClasspath(JavaProject javaProject) {
    // force to (re)read the .classpath file
    try {
      PerProjectInfo perProjectInfo = javaProject.getPerProjectInfo();
      if (!perProjectInfo.writtingRawClasspath) // to avoid deadlock, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=221680
        perProjectInfo.readAndCacheClasspath(javaProject);
    } catch (JavaModelException e) {
      if (VERBOSE) {
        e.printStackTrace();
      }
    }
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

    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

  JavadocContents javadocContents = getJavadocContents(monitor);
  if (javadocContents == null) return null;
  return javadocContents.getTypeDoc();
}
public JavadocContents getJavadocContents(IProgressMonitor monitor) throws JavaModelException {
  PerProjectInfo projectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfoCheckExistence(getJavaProject().getProject());
  JavadocContents cachedJavadoc = null;
  synchronized (projectInfo.javadocCache) {
    cachedJavadoc = (JavadocContents) projectInfo.javadocCache.get(this);
  }
 
View Full Code Here

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

  }

  private void readRawClasspath(JavaProject javaProject) {
    // force to (re)read the .classpath file
    try {
      PerProjectInfo perProjectInfo = javaProject.getPerProjectInfo();
      if (!perProjectInfo.writtingRawClasspath) // to avoid deadlock, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=221680
        perProjectInfo.readAndCacheClasspath(javaProject);
    } catch (JavaModelException e) {
      if (VERBOSE) {
        e.printStackTrace();
      }
    }
View Full Code Here

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
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.