/** * Remember the info for the jar binary type * @param info instanceof IBinaryType or {@link JavaModelCache#NON_EXISTING_JAR_TYPE_INFO} */ protected synchronized void putJarTypeInfo(IJavaElement type, Object info) { this.cache.jarTypeCache.put(type, info); }
protected synchronized void putJarTypeInfo(IJavaElement type, Object info) { this.cache.jarTypeCache.put(type, info); }
protected synchronized void putJarTypeInfo(IJavaElement type, Object info) { this.cache.jarTypeCache.put(type, info); }
protected synchronized void putJarTypeInfo(IJavaElement type, Object info) { this.cache.jarTypeCache.put(type, info); }
protected synchronized void putJarTypeInfo(IJavaElement type, Object info) { this.cache.jarTypeCache.put(type, info); }
protected synchronized void putJarTypeInfo(IJavaElement type, Object info) { this.cache.jarTypeCache.put(type, info); }
private ClasspathAccessRule getFromCache(ClasspathAccessRule rule) { ClasspathAccessRule cachedRule = this.cache.accessRuleCache.get(rule); if (cachedRule != null) { return cachedRule; } this.cache.accessRuleCache.put(rule, rule); return rule; } }
if (contents == null) contents = ""; //$NON-NLS-1$ synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, contents);
if (contents == null) contents = ""; //$NON-NLS-1$ synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, contents);
if (contents == null) contents = ""; //$NON-NLS-1$ synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, contents);
if (contents == null) contents = ""; //$NON-NLS-1$ synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, contents);
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); } if (cachedJavadoc != null && cachedJavadoc != BinaryType.EMPTY_JAVADOC) { return cachedJavadoc; } URL baseLocation= getJavadocBaseLocation(); if (baseLocation == null) { return null; } StringBuffer pathBuffer = new StringBuffer(baseLocation.toExternalForm()); if (!(pathBuffer.charAt(pathBuffer.length() - 1) == '/')) { pathBuffer.append('/'); } pathBuffer.append(getElementName()).append(JavadocConstants.MODULE_FILE_SUFFIX); if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException(); String contents = getURLContents(baseLocation, String.valueOf(pathBuffer)); JavadocContents javadocContents = new JavadocContents(contents); synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, javadocContents); } return javadocContents; } @Override
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); } if (cachedJavadoc != null && cachedJavadoc != BinaryType.EMPTY_JAVADOC) { return cachedJavadoc; } URL baseLocation= getJavadocBaseLocation(); if (baseLocation == null) { return null; } StringBuffer pathBuffer = new StringBuffer(baseLocation.toExternalForm()); if (!(pathBuffer.charAt(pathBuffer.length() - 1) == '/')) { pathBuffer.append('/'); } pathBuffer.append(getElementName()).append(JavadocConstants.MODULE_FILE_SUFFIX); if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException(); String contents = getURLContents(baseLocation, String.valueOf(pathBuffer)); JavadocContents javadocContents = new JavadocContents(contents); synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, javadocContents); } return javadocContents; } public String toString(String lineDelimiter) {
if (contents == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this)); synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, contents);
if (contents == null) contents = ""; //$NON-NLS-1$ synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, contents);
JavadocContents javadocContents = new JavadocContents(this, contents); synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, javadocContents);
JavadocContents javadocContents = new JavadocContents(this, contents); synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, javadocContents);
JavadocContents javadocContents = new JavadocContents(this, contents); synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, javadocContents);
JavadocContents javadocContents = new JavadocContents(this, contents); synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, javadocContents);
JavadocContents javadocContents = new JavadocContents(this, contents); synchronized (projectInfo.javadocCache) { projectInfo.javadocCache.put(this, javadocContents);