Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome lanneluc2004-02-17 10:05:41 +0000
committerJerome lanneluc2004-02-17 10:05:41 +0000
commit1833e406b85a2faf488f148c67d28fd390a0fed3 (patch)
treefb24935d2365b229051c5f5d9804db3cc32290b2
parent8ffc146a32b7b18eafcaab816894315f510b1e7b (diff)
downloadeclipse.jdt.core-THAW_402.tar.gz
eclipse.jdt.core-THAW_402.tar.xz
eclipse.jdt.core-THAW_402.zip
THAW_402 - Merge with HEADv_408a_thaw_402THAW_402
-rw-r--r--org.eclipse.jdt.core.tests.builder/.classpath10
-rw-r--r--org.eclipse.jdt.core.tests.builder/.project2
-rw-r--r--org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/AbstractMethodTests.java4
-rw-r--r--org.eclipse.jdt.core.tests.compiler/.classpath13
-rw-r--r--org.eclipse.jdt.core.tests.compiler/.project3
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java4
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java4
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java8
-rw-r--r--org.eclipse.jdt.core.tests.model/.classpath13
-rw-r--r--org.eclipse.jdt.core.tests.model/.project2
-rw-r--r--org.eclipse.jdt.core/.classpath8
-rw-r--r--org.eclipse.jdt.core/.project15
-rw-r--r--org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties2
-rw-r--r--org.eclipse.jdt.core/buildnotes_jdt-core.html16
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java24
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IConstants.java11
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IGenericMethod.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java3
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java7
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties30
-rw-r--r--org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java5
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java8
-rw-r--r--org.eclipse.jdt.core/plugin.properties3
-rw-r--r--org.eclipse.jdt.core/plugin.xml8
-rw-r--r--org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java1
27 files changed, 127 insertions, 99 deletions
diff --git a/org.eclipse.jdt.core.tests.builder/.classpath b/org.eclipse.jdt.core.tests.builder/.classpath
index 7a5c7f31ee..065ac06e19 100644
--- a/org.eclipse.jdt.core.tests.builder/.classpath
+++ b/org.eclipse.jdt.core.tests.builder/.classpath
@@ -1,13 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="/org.junit"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.core"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.core.tests.compiler"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime.compatibility"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core.tests.builder/.project b/org.eclipse.jdt.core.tests.builder/.project
index 6ce528532f..ab2e5ed74e 100644
--- a/org.eclipse.jdt.core.tests.builder/.project
+++ b/org.eclipse.jdt.core.tests.builder/.project
@@ -3,9 +3,7 @@
<name>org.eclipse.jdt.core.tests.builder</name>
<comment></comment>
<projects>
- <project>org.eclipse.core.boot</project>
<project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
<project>org.eclipse.core.runtime.compatibility</project>
<project>org.eclipse.jdt.core</project>
<project>org.eclipse.jdt.core.tests.compiler</project>
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/AbstractMethodTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/AbstractMethodTests.java
index 24a369eb0d..c77cf1b6f0 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/AbstractMethodTests.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/AbstractMethodTests.java
@@ -95,7 +95,7 @@ public class AbstractMethodTests extends Tests {
);
incrementalBuild();
- expectingOnlySpecificProblemFor(classX, new Problem("X.foo(I__X)", "I__X cannot be resolved (or is not a valid type) for the argument x of the method foo", classX)); //$NON-NLS-1$ //$NON-NLS-2$
+ expectingOnlySpecificProblemFor(classX, new Problem("X.foo(I__X)", "I__X cannot be resolved (or is not a valid type) for the parameter x of the method foo", classX)); //$NON-NLS-1$ //$NON-NLS-2$
expectingOnlySpecificProblemFor(classY, new Problem("Y", "Class must implement the inherited abstract method IX.foo(IX)", classY)); //$NON-NLS-1$ //$NON-NLS-2$
//----------------------------
@@ -182,7 +182,7 @@ public class AbstractMethodTests extends Tests {
);
incrementalBuild();
- expectingOnlySpecificProblemFor(classX, new Problem("X.foo(I__X)", "I__X cannot be resolved (or is not a valid type) for the argument x of the method foo", classX)); //$NON-NLS-1$ //$NON-NLS-2$
+ expectingOnlySpecificProblemFor(classX, new Problem("X.foo(I__X)", "I__X cannot be resolved (or is not a valid type) for the parameter x of the method foo", classX)); //$NON-NLS-1$ //$NON-NLS-2$
expectingOnlySpecificProblemFor(classY, new Problem("Y", "Class must implement the inherited abstract method X.foo(IX)", classY)); //$NON-NLS-1$ //$NON-NLS-2$
//----------------------------
diff --git a/org.eclipse.jdt.core.tests.compiler/.classpath b/org.eclipse.jdt.core.tests.compiler/.classpath
index bdf4ac5db7..065ac06e19 100644
--- a/org.eclipse.jdt.core.tests.compiler/.classpath
+++ b/org.eclipse.jdt.core.tests.compiler/.classpath
@@ -1,12 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="/org.junit"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.debug"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.apache.ant"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core.tests.compiler/.project b/org.eclipse.jdt.core.tests.compiler/.project
index ed19d65c03..f51f3af686 100644
--- a/org.eclipse.jdt.core.tests.compiler/.project
+++ b/org.eclipse.jdt.core.tests.compiler/.project
@@ -4,8 +4,7 @@
<comment></comment>
<projects>
<project>org.apache.ant</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.runtime</project>
+ <project>org.eclipse.core.runtime.compatibility</project>
<project>org.eclipse.jdt.core</project>
<project>org.eclipse.jdt.debug</project>
<project>org.junit</project>
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java
index 20e8b4bfe5..6388f7a987 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java
@@ -1976,12 +1976,12 @@ public void test055() {
"1. WARNING in p\\X.java (at line 11)\n" +
" void foo(int a);\n" +
" ^\n" +
- "The argument a is hiding a field from type X.I1\n" +
+ "The parameter a is hiding a field from type X.I1\n" +
"----------\n" +
"2. WARNING in p\\X.java (at line 14)\n" +
" public void foo(int a) {\n" +
" ^\n" +
- "The argument a is hiding a field from type X.I1\n" +
+ "The parameter a is hiding a field from type X.I1\n" +
"----------\n" +
"3. ERROR in p\\X.java (at line 17)\n" +
" System.out.println(\"X$1::foo-\" + a);\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java
index f9c8d83cff..813346deeb 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java
@@ -1977,12 +1977,12 @@ public void test055() {
"1. WARNING in p\\X.java (at line 11)\n" +
" void foo(int a);\n" +
" ^\n" +
- "The argument a is hiding a field from type X.I1\n" +
+ "The parameter a is hiding a field from type X.I1\n" +
"----------\n" +
"2. WARNING in p\\X.java (at line 14)\n" +
" public void foo(int a) {\n" +
" ^\n" +
- "The argument a is hiding a field from type X.I1\n" +
+ "The parameter a is hiding a field from type X.I1\n" +
"----------\n"
);
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
index d4631b0997..b8cac3e03e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
@@ -949,7 +949,7 @@ public class JavadocTestForMethod extends JavadocTest {
+ "1. ERROR in X.java (at line 8)\n"
+ " public void p_foo(inr a, int b, int c) {\n"
+ " ^^^\n"
- + "inr cannot be resolved (or is not a valid type) for the argument a of the method p_foo\n"
+ + "inr cannot be resolved (or is not a valid type) for the parameter a of the method p_foo\n"
+ "----------\n");
}
@@ -971,17 +971,17 @@ public class JavadocTestForMethod extends JavadocTest {
+ "1. ERROR in X.java (at line 8)\n"
+ " public void p_foo(inr a, inx b, inq c) {\n"
+ " ^^^\n"
- + "inr cannot be resolved (or is not a valid type) for the argument a of the method p_foo\n"
+ + "inr cannot be resolved (or is not a valid type) for the parameter a of the method p_foo\n"
+ "----------\n"
+ "2. ERROR in X.java (at line 8)\n"
+ " public void p_foo(inr a, inx b, inq c) {\n"
+ " ^^^\n"
- + "inx cannot be resolved (or is not a valid type) for the argument b of the method p_foo\n"
+ + "inx cannot be resolved (or is not a valid type) for the parameter b of the method p_foo\n"
+ "----------\n"
+ "3. ERROR in X.java (at line 8)\n"
+ " public void p_foo(inr a, inx b, inq c) {\n"
+ " ^^^\n"
- + "inq cannot be resolved (or is not a valid type) for the argument c of the method p_foo\n"
+ + "inq cannot be resolved (or is not a valid type) for the parameter c of the method p_foo\n"
+ "----------\n");
}
diff --git a/org.eclipse.jdt.core.tests.model/.classpath b/org.eclipse.jdt.core.tests.model/.classpath
index d8653f9ff7..065ac06e19 100644
--- a/org.eclipse.jdt.core.tests.model/.classpath
+++ b/org.eclipse.jdt.core.tests.model/.classpath
@@ -1,16 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.debug"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.core"/>
- <classpathentry kind="src" path="/org.junit"/>
- <classpathentry kind="src" path="/org.eclipse.jdt.core.tests.compiler"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.eclipse.text"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime.compatibility"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/.project b/org.eclipse.jdt.core.tests.model/.project
index 5b71ccc279..bf5491e5d0 100644
--- a/org.eclipse.jdt.core.tests.model/.project
+++ b/org.eclipse.jdt.core.tests.model/.project
@@ -3,9 +3,7 @@
<name>org.eclipse.jdt.core.tests.model</name>
<comment></comment>
<projects>
- <project>org.eclipse.core.boot</project>
<project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
<project>org.eclipse.core.runtime.compatibility</project>
<project>org.eclipse.jdt.core</project>
<project>org.eclipse.jdt.core.tests.compiler</project>
diff --git a/org.eclipse.jdt.core/.classpath b/org.eclipse.jdt.core/.classpath
index ca033a45a0..fed27a0c92 100644
--- a/org.eclipse.jdt.core/.classpath
+++ b/org.eclipse.jdt.core/.classpath
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry output="antbin" kind="src" path="antadapter"/>
<classpathentry kind="src" path="batch"/>
<classpathentry kind="src" path="codeassist"/>
@@ -10,10 +9,7 @@
<classpathentry kind="src" path="formatter"/>
<classpathentry kind="src" path="model"/>
<classpathentry kind="src" path="search"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.text"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.apache.ant"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime.compatibility"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core/.project b/org.eclipse.jdt.core/.project
index d1eabac0ee..098de8c45e 100644
--- a/org.eclipse.jdt.core/.project
+++ b/org.eclipse.jdt.core/.project
@@ -3,10 +3,10 @@
<name>org.eclipse.jdt.core</name>
<comment></comment>
<projects>
- <project>org.apache.ant</project>
+ <project>org.eclipse.ant.core</project>
<project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
<project>org.eclipse.core.runtime.compatibility</project>
+ <project>org.eclipse.team.core</project>
<project>org.eclipse.text</project>
</projects>
<buildSpec>
@@ -15,8 +15,19 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
index 2458be92a2..bcdcbaebd9 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
@@ -12,7 +12,7 @@
### compiler
compiler.name = Eclipse Java Compiler
-compiler.version = 0.408
+compiler.version = 0.409
compiler.copyright = Copyright IBM Corp 2000, 2004. All rights reserved.
### scanning
diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html
index d5d4d59e68..bd05ac4aa8 100644
--- a/org.eclipse.jdt.core/buildnotes_jdt-core.html
+++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html
@@ -33,13 +33,13 @@
</tr>
</table>
-<a name="v_40?"></a>
+<a name="v_409"></a>
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M8 Build - ?th February 2004
-<br>Project org.eclipse.jdt.core v_40?
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_40?">cvs</a>).
+<br>Project org.eclipse.jdt.core v_409
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_409">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
@@ -49,7 +49,15 @@ What's new in this drop</h2>
</ul>
<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=49879">49879</a>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=51990">51990</a>
+'parameter' vs 'argument' in compiler errors/settings
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=52012">52012</a>
+Special 'serialPersistentFields' marked as 'never used locally'
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=51353">51353</a>
+The type AbstractStringBuilder is not visible
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=49259">49259</a>
+Task tags starting with TODO don't correctly display their priority in Tasks View
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=49879">49879</a>
java.lang.ClassCastException (SourceTypeBinding to a BinaryTypeBinding) in 30M6 within jdt.core.dom.TypeBinding.getKey(TypeBinding.java:411)
<a name="v_408"></a>
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index 087940a418..27ec684303 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -68,7 +68,8 @@ public class ClassFile
public static final int INNER_CLASSES_SIZE = 5;
public CodeStream codeStream;
protected int problemLine; // used to create line number attributes for problem methods
-
+ public long targetJDK;
+
/**
* INTERNAL USE-ONLY
* This methods creates a new instance of the receiver.
@@ -89,6 +90,7 @@ public class ClassFile
SourceTypeBinding aType,
ClassFile enclosingClassFile,
boolean creatingProblemType) {
+
referenceBinding = aType;
header = new byte[INITIAL_HEADER_SIZE];
// generate the magic numbers inside the header
@@ -97,13 +99,11 @@ public class ClassFile
header[headerOffset++] = (byte) (0xCAFEBABEL >> 8);
header[headerOffset++] = (byte) (0xCAFEBABEL >> 0);
- long targetJDK = referenceBinding.scope.environment().options.targetJDK;
- // TODO[1.5] until a 1.5 VM is released (accepting 49.0 files), will instead generate 1.4 (48.0) classfiles
- if (targetJDK == ClassFileConstants.JDK1_5) targetJDK = ClassFileConstants.JDK1_4;
- header[headerOffset++] = (byte) (targetJDK >> 8); // minor high
- header[headerOffset++] = (byte) (targetJDK >> 0); // minor low
- header[headerOffset++] = (byte) (targetJDK >> 24); // major high
- header[headerOffset++] = (byte) (targetJDK >> 16); // major low
+ this.targetJDK = referenceBinding.scope.environment().options.targetJDK;
+ header[headerOffset++] = (byte) (this.targetJDK >> 8); // minor high
+ header[headerOffset++] = (byte) (this.targetJDK >> 0); // minor low
+ header[headerOffset++] = (byte) (this.targetJDK >> 24); // major high
+ header[headerOffset++] = (byte) (this.targetJDK >> 16); // major low
constantPoolOffset = headerOffset;
headerOffset += 2;
@@ -2501,6 +2501,7 @@ public class ClassFile
// Deprecated attribute
// Check that there is enough space to write the deprecated attribute
if (contentsOffset + 6 >= (contentsLength = contents.length)) {
+ // TODO (olivier) why isn't space check inside the condition #isDeprecated ?
System.arraycopy(
contents,
0,
@@ -2524,6 +2525,7 @@ public class ClassFile
// Synthetic attribute
// Check that there is enough space to write the deprecated attribute
if (contentsOffset + 6 >= (contentsLength = contents.length)) {
+ // TODO (olivier) why isn't space check inside the condition #isSynthetic ?
System.arraycopy(
contents,
0,
@@ -2531,7 +2533,7 @@ public class ClassFile
0,
contentsLength);
}
- if (methodBinding.isSynthetic()) {
+ if (this.targetJDK < ClassFileConstants.JDK1_5 && methodBinding.isSynthetic()) {
int syntheticAttributeNameIndex =
constantPool.literalIndex(AttributeNamesConstants.SyntheticName);
contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8);
@@ -2571,6 +2573,10 @@ public class ClassFile
contentsLength);
}
int accessFlags = methodBinding.getAccessFlags();
+ if (targetJDK < ClassFileConstants.JDK1_5) {
+ // pre 1.5, synthetic was an attribute, not a modifier
+ accessFlags &= ~AccSynthetic;
+ }
if (methodBinding.isRequiredToClearPrivateModifier()) {
accessFlags &= ~AccPrivate;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IConstants.java
index f94d0a804d..4f3bfa15a6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IConstants.java
@@ -17,7 +17,7 @@ public interface IConstants {
int AccDefault = 0;
- /*
+ /**
* Modifiers
*/
int AccPublic = 0x0001;
@@ -27,20 +27,23 @@ public interface IConstants {
int AccFinal = 0x0010;
int AccSynchronized = 0x0020;
int AccVolatile = 0x0040;
+ int AccBridge = 0x0040;
int AccTransient = 0x0080;
+ int AccVarargs = 0x0080;
int AccNative = 0x0100;
int AccInterface = 0x0200;
int AccAbstract = 0x0400;
int AccStrictfp = 0x0800;
+ int AccSynthetic = 0x1000;
- /*
+ /**
* Other VM flags.
*/
int AccSuper = 0x0020;
/**
- * Extra flags for types and members.
+ * Extra flags for types and members attributes.
*/
- int AccSynthetic = 0x20000;
int AccDeprecated = 0x100000;
+
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IGenericMethod.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IGenericMethod.java
index dbce9280c7..c742d2d9b1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IGenericMethod.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IGenericMethod.java
@@ -15,7 +15,7 @@ public interface IGenericMethod {
* Answer an int whose bits are set according the access constants
* defined by the VM spec.
*/
-// We have added AccDeprecated & AccSynthetic.
+// We have added AccDeprecated
int getModifiers();
/**
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
index 58517b80b3..e3da31f44d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
@@ -233,6 +233,12 @@ public final boolean isAbstract() {
return (modifiers & AccAbstract) != 0;
}
+/* Answer true if the receiver is a bridge method
+*/
+public final boolean isBridge() {
+ return (modifiers & AccBridge) != 0;
+}
+
/* Answer true if the receiver is a constructor
*/
public final boolean isConstructor() {
@@ -356,6 +362,12 @@ public final boolean isSynthetic() {
return (modifiers & AccSynthetic) != 0;
}
+/* Answer true if the receiver is a vararg method
+*/
+public final boolean isVararg() {
+ return (modifiers & AccVarargs) != 0;
+}
+
/* Answer true if the receiver's declaring type is deprecated (or any of its enclosing types)
*/
public final boolean isViewedAsDeprecated() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
index dad5fd36fb..0debd41482 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
@@ -21,12 +21,15 @@ public interface TypeConstants {
final char[] OBJECT = "Object".toCharArray(); //$NON-NLS-1$
final char[] MAIN = "main".toCharArray(); //$NON-NLS-1$
final char[] SERIALVERSIONUID = "serialVersionUID".toCharArray(); //$NON-NLS-1$
+ final char[] SERIALPERSISTENTFIELDS = "serialPersistentFields".toCharArray(); //$NON-NLS-1$
final char[] READRESOLVE = "readResolve".toCharArray(); //$NON-NLS-1$
final char[] WRITEREPLACE = "writeReplace".toCharArray(); //$NON-NLS-1$
final char[] READOBJECT = "readObject".toCharArray(); //$NON-NLS-1$
final char[] WRITEOBJECT = "writeObject".toCharArray(); //$NON-NLS-1$
final char[] CharArray_JAVA_IO_OBJECTINPUTSTREAM = "java.io.ObjectInputStream".toCharArray(); //$NON-NLS-1$
final char[] CharArray_JAVA_IO_OBJECTOUTPUTSTREAM = "java.io.ObjectOutputStream".toCharArray(); //$NON-NLS-1$
+ final char[] CharArray_JAVA_IO_OBJECTSTREAMFIELD = "java.io.ObjectStreamField".toCharArray(); //$NON-NLS-1$
+
// Constant compound names
final char[][] JAVA_LANG = {JAVA, LANG};
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
index b1c88e1773..5d7dc20ab0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
@@ -220,8 +220,8 @@ public void checkTaskTag(int commentStart, int commentEnd) {
if (tagLength == 0) continue nextTag;
// ensure tag is not leaded with letter if tag starts with a letter
- if (Character.isLetterOrDigit(tag[0])) {
- if (Character.isLetterOrDigit(previous)) {
+ if (Character.isJavaIdentifierStart(tag[0])) {
+ if (Character.isJavaIdentifierPart(previous)) {
continue nextTag;
}
}
@@ -231,8 +231,8 @@ public void checkTaskTag(int commentStart, int commentEnd) {
continue nextTag;
}
// ensure tag is not followed with letter if tag finishes with a letter
- if (i+tagLength < commentEnd && Character.isLetterOrDigit(src[i+tagLength-1])) {
- if (Character.isLetterOrDigit(src[i + tagLength]))
+ if (i+tagLength < commentEnd && Character.isJavaIdentifierPart(src[i+tagLength-1])) {
+ if (Character.isJavaIdentifierPart(src[i + tagLength]))
continue nextTag;
}
if (this.foundTaskTags == null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index 0601cf0c07..6b60040ff3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -3523,6 +3523,13 @@ public void unusedPrivateField(FieldDeclaration fieldDecl) {
&& BaseTypes.LongBinding == field.type) {
return; // do not report unused serialVersionUID field
}
+ if (CharOperation.equals(TypeConstants.SERIALPERSISTENTFIELDS, field.name)
+ && field.isStatic()
+ && field.isFinal()
+ && field.type.dimensions() == 1
+ && CharOperation.equals(TypeConstants.CharArray_JAVA_IO_OBJECTSTREAMFIELD, field.type.leafComponentType().readableName())) {
+ return; // do not report unused serialPersistentFields field
+ }
this.handle(
IProblem.UnusedPrivateField,
new String[] {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
index 74d1beb0a7..49582b3a20 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
@@ -39,18 +39,18 @@
53 = An array of void is an invalid type for the variable {0}
54 = An array of void is an invalid type
55 = Duplicate local variable {0}
-56 = Duplicate argument {0}
+56 = Duplicate parameter {0}
57 = The final local variable {0} may already have been assigned
58 = The final local variable {0} cannot be assigned. It must be blank and not using a compound assignment
60 = The final local variable {0} cannot be assigned, since it is defined in an enclosing type
61 = The local variable {0} is never read
-62 = The argument {0} is never read
+62 = The parameter {0} is never read
63 = The code of method {0}({1}) is exceeding the 65535 bytes limit
64 = The code for the static initializer is exceeding the 65535 bytes limit
-65 = Too many arguments, parameter {0} is exceeding the limit of 255 words eligible for method arguments
+65 = Too many parameters, parameter {0} is exceeding the limit of 255 words eligible for method parameters
66 = Too many local variables, local variable {0} is exceeding the limit of 65535 words eligible for method local variables
-67 = Too many synthetic arguments, emulated parameter {0} is exceeding the limit of 255 words eligible for method arguments
+67 = Too many synthetic parameters, emulated parameter {0} is exceeding the limit of 255 words eligible for method parameters
68 = Too many array dimensions. Maximum is 255
69 = The code of constructor {0}({1}) is exceeding the 65535 bytes limit
70 = {0} cannot be resolved or is not a field
@@ -71,8 +71,8 @@
91 = The local variable {0} is hiding a field from type {1}
92 = The field {0}.{1} is hiding another local variable defined in an enclosing type scope
93 = The field {0}.{1} is hiding a field from type {2}
-94 = The argument {0} is hiding another local variable defined in an enclosing type scope
-95 = The argument {0} is hiding a field from type {1}
+94 = The parameter {0} is hiding another local variable defined in an enclosing type scope
+95 = The parameter {0} is hiding a field from type {1}
100 = The method {1}({2}) is undefined for the type {0}
101 = The method {1}({2}) from the type {0} is not visible
@@ -260,7 +260,7 @@
353 = The field type {2} cannot be referenced using its binary name
354 = The field type {2} is defined in an inherited type and an enclosing scope
355 = Duplicate method {0} in type {1}
-356 = Illegal modifier for argument {0}; only final is permitted
+356 = Illegal modifier for parameter {0}; only final is permitted
357 = Duplicate modifier for the method {1} in type {0}
358 = Illegal modifier for the method {1} in type {0}
359 = Illegal modifier for the interface method {1} in type {0}; only public & abstract are permitted
@@ -268,17 +268,17 @@
361 = The method {1} cannot be declared static; static methods can only be declared in a static or top level type
362 = The abstract method {1} in type {0} can only set a visibility modifier, one of public or protected
363 = The abstract method {1} in type {0} can only be defined by an abstract class
-364 = void is an invalid type for the argument {1} of the method {0}
-365 = An array of void is an invalid type for the argument {1} of the method {0}
+364 = void is an invalid type for the parameter {1} of the method {0}
+365 = An array of void is an invalid type for the parameter {1} of the method {0}
366 = An array of void is an invalid return type for the method {0}
367 = The native method {1} cannot also be declared strictfp
-368 = Duplicate modifier for argument {0}
+368 = Duplicate modifier for parameter {0}
-370 = {2} cannot be resolved (or is not a valid type) for the argument {1} of the method {0}
-371 = The type {2} is not visible for the argument {1} of the method {0}
-372 = The type {2} is ambiguous for the argument {1} of the method {0}
-373 = The argument type {2} cannot be referenced using its binary name
-374 = The argument type {2} is defined in an inherited type and an enclosing scope
+370 = {2} cannot be resolved (or is not a valid type) for the parameter {1} of the method {0}
+371 = The type {2} is not visible for the parameter {1} of the method {0}
+372 = The type {2} is ambiguous for the parameter {1} of the method {0}
+373 = The parameter type {2} cannot be referenced using its binary name
+374 = The parameter type {2} is defined in an inherited type and an enclosing scope
375 = {1} cannot be resolved (or is not an exception type) for the method {0}
376 = The exception type {1} is not visible for the method {0}
377 = The exception type {1} is ambiguous for the method {0}
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
index 0ccf441874..2caa9bcf91 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
@@ -16,7 +16,6 @@ import org.eclipse.jdt.internal.compiler.CompilationResult;
import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
import org.eclipse.jdt.internal.compiler.ast.FieldReference;
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
-import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
@@ -49,9 +48,7 @@ public CodeSnippetClassFile(
this.header[this.headerOffset++] = (byte) (0xCAFEBABEL >> 8);
this.header[this.headerOffset++] = (byte) (0xCAFEBABEL >> 0);
- long targetJDK = this.referenceBinding.scope.environment().options.targetJDK;
- // TODO[1.5] until a 1.5 VM is released (accepting 49.0 files), will instead generate 1.4 (48.0) classfiles
- if (targetJDK == ClassFileConstants.JDK1_5) targetJDK = ClassFileConstants.JDK1_4;
+ this.targetJDK = this.referenceBinding.scope.environment().options.targetJDK;
this.header[this.headerOffset++] = (byte) (targetJDK >> 8); // minor high
this.header[this.headerOffset++] = (byte) (targetJDK >> 0); // minor low
this.header[this.headerOffset++] = (byte) (targetJDK >> 24); // major high
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
index 229be178a7..bd19da59b4 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
@@ -216,8 +216,8 @@ public void checkTaskTag(int commentStart, int commentEnd) {
if (tagLength == 0) continue nextTag;
// ensure tag is not leaded with letter if tag starts with a letter
- if (Character.isLetterOrDigit(tag[0])) {
- if (Character.isLetterOrDigit(previous)) {
+ if (Character.isJavaIdentifierStart(tag[0])) {
+ if (Character.isJavaIdentifierPart(previous)) {
continue nextTag;
}
}
@@ -227,8 +227,8 @@ public void checkTaskTag(int commentStart, int commentEnd) {
continue nextTag;
}
// ensure tag is not followed with letter if tag finishes with a letter
- if (i+tagLength < commentEnd && Character.isLetterOrDigit(src[i+tagLength-1])) {
- if (Character.isLetterOrDigit(src[i + tagLength]))
+ if (i+tagLength < commentEnd && Character.isJavaIdentifierPart(src[i+tagLength-1])) {
+ if (Character.isJavaIdentifierPart(src[i + tagLength]))
continue nextTag;
}
if (this.foundTaskTags == null) {
diff --git a/org.eclipse.jdt.core/plugin.properties b/org.eclipse.jdt.core/plugin.properties
index 579f43bbc2..786b314158 100644
--- a/org.eclipse.jdt.core/plugin.properties
+++ b/org.eclipse.jdt.core/plugin.properties
@@ -18,4 +18,5 @@ transientJavaProblemName=Transient Java Problem
classpathVariableInitializersName=Classpath Variable Initializers
classpathContainerInitializersName=Classpath Container Initializers
codeFormattersName=Source Code Formatters
-javaTaskName=Java Task \ No newline at end of file
+javaTaskName=Java Task
+searchParticipantsName=Search Participants \ No newline at end of file
diff --git a/org.eclipse.jdt.core/plugin.xml b/org.eclipse.jdt.core/plugin.xml
index 15eff4c2dd..baed04d2e7 100644
--- a/org.eclipse.jdt.core/plugin.xml
+++ b/org.eclipse.jdt.core/plugin.xml
@@ -57,6 +57,14 @@
id="codeFormatter"
schema="schema/codeFormatter.exsd"/>
+<!-- =================================================================================== -->
+<!-- Extension Point: Search Participants -->
+<!-- =================================================================================== -->
+
+<extension-point name="%searchParticipantsName"
+ id="searchParticipant"
+ schema="schema/searchParticipant.exsd"/>
+
<!-- =================================================================================== -->
<!-- Extension: Java Nature -->
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java
index bd05904f74..4f1b6b270a 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java
@@ -68,6 +68,7 @@ public abstract class SearchParticipant {
/**
* Index the given document.
* Implementation should call addIndexEntry(...)
+ * If delegating to another participant, it should use the original index location (and not the delegatee's one)
* TODO (jerome) improve spec
*/
public abstract void indexDocument(SearchDocument document, IPath indexPath);

Back to the top