JDK_1_5-Merge with HEAD: v_418
diff --git a/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
index 8559fbf..f09236b 100644
--- a/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -396,6 +396,7 @@
boolean didSpecifyTarget = false;
boolean didSpecifyDeprecation = false;
boolean didSpecifyWarnings = false;
+ boolean useEnableJavadoc = false;
String customEncoding = null;
String currentArg = ""; //$NON-NLS-1$
@@ -846,9 +847,11 @@
CompilerOptions.OPTION_ReportUnsafeTypeOperation,
isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
} else if (token.equals("javadoc")) {//$NON-NLS-1$
- this.options.put(
- CompilerOptions.OPTION_DocCommentSupport,
- isEnabling ? CompilerOptions.ENABLED: CompilerOptions.DISABLED);
+ if (!useEnableJavadoc) {
+ this.options.put(
+ CompilerOptions.OPTION_DocCommentSupport,
+ isEnabling ? CompilerOptions.ENABLED: CompilerOptions.DISABLED);
+ }
// if disabling then it's not necessary to set other javadoc options
if (isEnabling) {
this.options.put(
@@ -868,9 +871,11 @@
CompilerOptions.PRIVATE);
}
} else if (token.equals("allJavadoc")) { //$NON-NLS-1$
- this.options.put(
- CompilerOptions.OPTION_DocCommentSupport,
- isEnabling ? CompilerOptions.ENABLED: CompilerOptions.DISABLED);
+ if (!useEnableJavadoc) {
+ this.options.put(
+ CompilerOptions.OPTION_DocCommentSupport,
+ isEnabling ? CompilerOptions.ENABLED: CompilerOptions.DISABLED);
+ }
// if disabling then it's not necessary to set other javadoc options
if (isEnabling) {
this.options.put(
@@ -942,6 +947,13 @@
CompilerOptions.PRESERVE);
continue;
}
+ if (currentArg.equals("-enableJavadoc")) {//$NON-NLS-1$
+ this.options.put(
+ CompilerOptions.OPTION_DocCommentSupport,
+ CompilerOptions.ENABLED);
+ useEnableJavadoc = true;
+ continue;
+ }
if (mode == TargetSetting) {
didSpecifyTarget = true;
if (currentArg.equals("1.1")) { //$NON-NLS-1$
diff --git a/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
index 3761279..7d55406 100644
--- a/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
+++ b/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
@@ -12,7 +12,7 @@
### compiler
compiler.name = Eclipse Java Compiler
-compiler.version = 0.417
+compiler.version = 0.418
compiler.copyright = Copyright IBM Corp 2000, 2004. All rights reserved.
### scanning
@@ -159,6 +159,7 @@
\ -noExit do not call System.exit(n) at end of compilation (n==0 if no error)\n\
\ -repeat <n> repeat compilation process <n> times for perf analysis\n\
\ -inlineJSR inline JSR bytecode\n\
+\ -enableJavadoc consider references in javadoc\n\
\ \n\
\ -? -help print this help message\n\
\ -v -version print compiler version\n\
diff --git a/buildnotes_jdt-core.html b/buildnotes_jdt-core.html
index 52d1a50..447c463 100644
--- a/buildnotes_jdt-core.html
+++ b/buildnotes_jdt-core.html
@@ -89,6 +89,24 @@
ArrayStoreException in 1.5 parser
+<a name="v_418"></a>
+<p><hr><h1>
+Eclipse Platform Build Notes <br>
+Java Development Tooling Core</h1>
+Eclipse SDK 3.0M8 Build - 25th March 2004 - 3.0 MILESTONE-8
+<br>Project org.eclipse.jdt.core v_418
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_418">cvs</a>).
+<h2>
+What's new in this drop</h2>
+<ul>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=55930">55930</a>
+File encoding should be used on save
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=55478">55478</a>
+Unused import not reported in IDE
+
<a name="v_417"></a>
<p><hr><h1>
Eclipse Platform Build Notes <br>
@@ -98,7 +116,9 @@
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_417">cvs</a>).
<h2>
What's new in this drop</h2>
-<ul>
+<ul>
+<li>Removed failing tests re: encoding support.
+</li>
</ul>
<h3>Problem Reports Fixed</h3>
diff --git a/model/org/eclipse/jdt/internal/core/Buffer.java b/model/org/eclipse/jdt/internal/core/Buffer.java
index 4ca8641..aeb8e49 100644
--- a/model/org/eclipse/jdt/internal/core/Buffer.java
+++ b/model/org/eclipse/jdt/internal/core/Buffer.java
@@ -335,7 +335,7 @@
try {
String encoding = null;
try {
- this.file.getCharset();
+ encoding = this.file.getCharset();
}
catch (CoreException ce) {
// use no encoding
diff --git a/model/org/eclipse/jdt/internal/core/CommitWorkingCopyOperation.java b/model/org/eclipse/jdt/internal/core/CommitWorkingCopyOperation.java
index a387dda..2d98c3a 100644
--- a/model/org/eclipse/jdt/internal/core/CommitWorkingCopyOperation.java
+++ b/model/org/eclipse/jdt/internal/core/CommitWorkingCopyOperation.java
@@ -117,7 +117,7 @@
// working copy on cu outside classpath OR resource doesn't exist yet
String encoding = null;
try {
- resource.getCharset();
+ encoding = resource.getCharset();
}
catch (CoreException ce) {
// use no encoding