Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thomann2004-09-21 17:54:16 -0400
committerOlivier Thomann2004-09-21 17:54:16 -0400
commit3b9b7a7d0a241f57946c2f7535b52039d498213e (patch)
tree84c37fb69638befd58f8c04278ec811652f6c81c
parentb43c3c90323b24a060bc84126348dcf5d375f78d (diff)
downloadeclipse.jdt.core-3b9b7a7d0a241f57946c2f7535b52039d498213e.tar.gz
eclipse.jdt.core-3b9b7a7d0a241f57946c2f7535b52039d498213e.tar.xz
eclipse.jdt.core-3b9b7a7d0a241f57946c2f7535b52039d498213e.zip
Stream 3_0_maintenance - Fix for 73497
-rw-r--r--org.eclipse.jdt.core/buildnotes_jdt-core.html6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java27
2 files changed, 22 insertions, 11 deletions
diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html
index 1ae3083e03..7953c123cb 100644
--- a/org.eclipse.jdt.core/buildnotes_jdt-core.html
+++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html
@@ -39,7 +39,7 @@
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
-Eclipse SDK 3.0.1 Build - ? September 2004 - 3.0.1 RELEASE CANDIDATE 1
+Eclipse SDK 3.0.1 Build - ? September 2004 - 3.0.2
<br>Project org.eclipse.jdt.core v_453_R30x
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_453_R30x">cvs</a>).
<h2>
@@ -48,7 +48,9 @@ What's new in this drop</h2>
</ul>
<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=74014">74014</a>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73497">73497</a>
+Problem methods don't point to the right position in source
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=74014">74014</a>
prefix path for source attachements - automatic detection does not seem to work
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73330">73330</a>
NullPointerException in search
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 e575af546b..274b4946ad 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
@@ -67,7 +67,6 @@ public class ClassFile
public boolean ownSharedArrays = false; // flag set when header/contents are set to shared arrays
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;
/**
@@ -559,6 +558,7 @@ public class ClassFile
generateCodeAttributeHeader();
codeStream.resetForProblemClinit(this);
String problemString = "" ; //$NON-NLS-1$
+ int problemLine = 0;
if (problems != null) {
int max = problems.length;
StringBuffer buffer = new StringBuffer(25);
@@ -591,7 +591,8 @@ public class ClassFile
.scope
.referenceCompilationUnit()
.compilationResult
- .lineSeparatorPositions);
+ .lineSeparatorPositions,
+ problemLine);
contents[attributeOffset++] = (byte) (attributeNumber >> 8);
contents[attributeOffset] = (byte) attributeNumber;
}
@@ -620,6 +621,7 @@ public class ClassFile
generateCodeAttributeHeader();
codeStream.reset(method, this);
String problemString = "" ; //$NON-NLS-1$
+ int problemLine = 0;
if (problems != null) {
int max = problems.length;
StringBuffer buffer = new StringBuffer(25);
@@ -652,7 +654,8 @@ public class ClassFile
.scope
.referenceCompilationUnit()
.compilationResult
- .lineSeparatorPositions);
+ .lineSeparatorPositions,
+ problemLine);
completeMethodInfo(methodAttributeOffset, attributeNumber);
}
@@ -704,6 +707,7 @@ public class ClassFile
generateCodeAttributeHeader();
codeStream.reset(method, this);
String problemString = "" ; //$NON-NLS-1$
+ int problemLine = 0;
if (problems != null) {
int max = problems.length;
StringBuffer buffer = new StringBuffer(25);
@@ -740,7 +744,8 @@ public class ClassFile
.scope
.referenceCompilationUnit()
.compilationResult
- .lineSeparatorPositions);
+ .lineSeparatorPositions,
+ problemLine);
completeMethodInfo(methodAttributeOffset, attributeNumber);
}
@@ -858,7 +863,7 @@ public class ClassFile
buffer.append("\t" + problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
buffer.insert(0, Util.bind("compilation.unresolvedProblem" )); //$NON-NLS-1$
String problemString = buffer.toString();
- this.problemLine = problem.getSourceLineNumber();
+ int problemLine = problem.getSourceLineNumber();
codeStream.init(this);
codeStream.preserveUnusedLocals = true;
@@ -870,7 +875,8 @@ public class ClassFile
completeCodeAttributeForMissingAbstractProblemMethod(
methodBinding,
codeAttributeOffset,
- compilationResult.lineSeparatorPositions);
+ compilationResult.lineSeparatorPositions,
+ problemLine);
completeMethodInfo(methodAttributeOffset, attributeNumber);
}
@@ -881,7 +887,8 @@ public class ClassFile
public void completeCodeAttributeForMissingAbstractProblemMethod(
MethodBinding binding,
int codeAttributeOffset,
- int[] startLineIndexes) {
+ int[] startLineIndexes,
+ int problemLine) {
// reinitialize the localContents with the byte modified by the code stream
this.contents = codeStream.bCodeStream;
int localContentsOffset = codeStream.classFileOffset;
@@ -1612,7 +1619,8 @@ public class ClassFile
*/
public void completeCodeAttributeForClinit(
int codeAttributeOffset,
- int[] startLineIndexes) {
+ int[] startLineIndexes,
+ int problemLine) {
// reinitialize the contents with the byte modified by the code stream
this.contents = codeStream.bCodeStream;
int localContentsOffset = codeStream.classFileOffset;
@@ -1726,7 +1734,8 @@ public class ClassFile
AbstractMethodDeclaration method,
MethodBinding binding,
int codeAttributeOffset,
- int[] startLineIndexes) {
+ int[] startLineIndexes,
+ int problemLine) {
// reinitialize the localContents with the byte modified by the code stream
this.contents = codeStream.bCodeStream;
int localContentsOffset = codeStream.classFileOffset;

Back to the top