ClassFileReader
specific for this IClassFile, based
Index: model/org/eclipse/jdt/internal/core/PackageFragment.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java,v
retrieving revision 1.73
diff -u -r1.73 PackageFragment.java
--- model/org/eclipse/jdt/internal/core/PackageFragment.java 5 Dec 2005 19:10:44 -0000 1.73
+++ model/org/eclipse/jdt/internal/core/PackageFragment.java 3 Jan 2006 18:43:27 -0000
@@ -439,7 +439,7 @@
/*
* @see IJavaElement#getAttachedJavadoc(IProgressMonitor)
*/
-public String getAttachedJavadoc(IProgressMonitor monitor, String defaultEncoding) throws JavaModelException {
+public String getAttachedJavadoc(IProgressMonitor monitor) throws JavaModelException {
PerProjectInfo projectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfoCheckExistence(this.getJavaProject().getProject());
String cachedJavadoc = null;
synchronized (projectInfo.javadocCache) {
@@ -461,7 +461,7 @@
pathBuffer.append(packPath).append('/').append(JavadocConstants.PACKAGE_FILE_NAME);
if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException();
- final String contents = getURLContents(String.valueOf(pathBuffer), defaultEncoding);
+ final String contents = getURLContents(String.valueOf(pathBuffer));
if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException();
if (contents == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
synchronized (projectInfo.javadocCache) {
Index: model/org/eclipse/jdt/internal/core/BinaryMethod.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryMethod.java,v
retrieving revision 1.82
diff -u -r1.82 BinaryMethod.java
--- model/org/eclipse/jdt/internal/core/BinaryMethod.java 14 Dec 2005 03:45:29 -0000 1.82
+++ model/org/eclipse/jdt/internal/core/BinaryMethod.java 3 Jan 2006 18:43:26 -0000
@@ -205,7 +205,7 @@
public void run() {
try {
// this call has a side-effect on the per project info cache
- nameCollector.setJavadoc(BinaryMethod.this.getAttachedJavadoc(null, "UTF-8")); //$NON-NLS-1$
+ nameCollector.setJavadoc(BinaryMethod.this.getAttachedJavadoc(null));
} catch (JavaModelException e) {
// ignore
}
@@ -455,10 +455,10 @@
buffer.append(this.occurrenceCount);
}
}
-public String getAttachedJavadoc(IProgressMonitor monitor, String defaultEncoding) throws JavaModelException {
+public String getAttachedJavadoc(IProgressMonitor monitor) throws JavaModelException {
IType declaringType = this.getDeclaringType();
- String contents = ((BinaryType) declaringType).getJavadocContents(monitor, defaultEncoding);
+ String contents = ((BinaryType) declaringType).getJavadocContents(monitor);
return extractJavadoc(declaringType, contents);
}
private String extractJavadoc(IType declaringType, String contents) throws JavaModelException {
Index: model/org/eclipse/jdt/internal/core/BinaryType.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryType.java,v
retrieving revision 1.135
diff -u -r1.135 BinaryType.java
--- model/org/eclipse/jdt/internal/core/BinaryType.java 17 Dec 2005 03:57:49 -0000 1.135
+++ model/org/eclipse/jdt/internal/core/BinaryType.java 3 Jan 2006 18:43:26 -0000
@@ -986,8 +986,8 @@
else
buffer.append("Returns the Javadoc as an html source if this element has an attached javadoc, * null otherwise.
- *This should be used only for binary elements. Source elements will always return null. - * The encoding used to read the javadoc is the one defined by the content type of the - * file. If none is defined, then the specified encoding will be used as the default encoding.
+ *This should be used only for binary elements. Source elements will always return null.
+ *The encoding used to read the javadoc is the one defined by the content type of the + * file. If none is defined, then the project's encoding of this java element is used. If the project's + * encoding cannot be retrieved, then the platform encoding is used.
*In case of the javadoc doesn't exist for this element, null is returned.
* *The html is extracted from the attached javadoc and provided as is. No * transformation or validation is done.
* - *If the default encoding is set to null, the default encoding of the project is used. If - * the default encoding of the project is not supported, then the platform encoding is used.
- * *NOTE: This API is subject to change before the 3.2 release.
* * @param monitor the given progress monitor - * @param defaultEncoding the given default encoding * @exception JavaModelException if: