Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 32675 Details for
Bug 123096
[javadoc][assist] @linkplain no longer proposed when 1.4 compliance is used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to fix this issue
v00.txt (text/plain), 8.54 KB, created by
Frederic Fusier
on 2006-01-09 09:35:46 EST
(
hide
)
Description:
Patch to fix this issue
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2006-01-09 09:35:46 EST
Size:
8.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java,v >retrieving revision 1.47 >diff -u -r1.47 JavadocParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 17 Nov 2005 18:52:09 -0000 1.47 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 9 Jan 2006 14:31:17 -0000 >@@ -500,7 +500,7 @@ > } > break; > case 'v': >- if (this.sourceLevel >= ClassFileConstants.JDK1_5 && length == TAG_VALUE_LENGTH && CharOperation.equals(TAG_VALUE, tagName)) { >+ if (this.complianceLevel >= ClassFileConstants.JDK1_5 && length == TAG_VALUE_LENGTH && CharOperation.equals(TAG_VALUE, tagName)) { > this.tagValue = TAG_VALUE_VALUE; > if (this.inlineTagStarted) { > valid = parseReference(); >@@ -576,7 +576,7 @@ > if (++this.invalidParamReferencesPtr >= stackLength) { > System.arraycopy( > this.invalidParamReferencesStack, 0, >- this.invalidParamReferencesStack = new JavadocSingleNameReference[stackLength + AstStackIncrement], 0, >+ this.invalidParamReferencesStack = new JavadocSingleNameReference[stackLength + AST_STACK_INCREMENT], 0, > stackLength); > } > this.invalidParamReferencesStack[this.invalidParamReferencesPtr] = nameRef; >Index: compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java,v >retrieving revision 1.52 >diff -u -r1.52 AbstractCommentParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 29 Nov 2005 08:31:20 -0000 1.52 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 9 Jan 2006 14:31:17 -0000 >@@ -47,7 +47,7 @@ > // Options > public boolean checkDocComment = false; > public boolean reportProblems; >- protected long sourceLevel; >+ protected long complianceLevel; > > // Results > protected long inheritedPositions; >@@ -82,7 +82,7 @@ > protected long[] identifierPositionStack; > > // Ast stack >- protected static int AstStackIncrement = 10; >+ protected final static int AST_STACK_INCREMENT = 10; > protected int astPtr; > protected Object[] astStack; > protected int astLengthPtr; >@@ -99,7 +99,7 @@ > this.reportProblems = sourceParser != null; > if (sourceParser != null) { > this.checkDocComment = this.sourceParser.options.docCommentSupport; >- this.sourceLevel = this.sourceParser.options.sourceLevel; >+ this.complianceLevel = this.sourceParser.options.complianceLevel; > } > } > >@@ -710,7 +710,7 @@ > boolean hasMultiLines = this.scanner.currentPosition > (this.lineEnd+1); > boolean isTypeParam = false; > boolean valid = true, empty = true; >- boolean mayBeGeneric = this.sourceLevel >= ClassFileConstants.JDK1_5; >+ boolean mayBeGeneric = this.complianceLevel >= ClassFileConstants.JDK1_5; > int token = -1; > nextToken: while (true) { > this.currentTokenType = -1; >@@ -1225,7 +1225,7 @@ > if (++this.astPtr >= stackLength) { > System.arraycopy( > this.astStack, 0, >- this.astStack = new Object[stackLength + AstStackIncrement], 0, >+ this.astStack = new Object[stackLength + AST_STACK_INCREMENT], 0, > stackLength); > this.astPtr = stackLength; > } >@@ -1236,7 +1236,7 @@ > if (++this.astLengthPtr >= stackLength) { > System.arraycopy( > this.astLengthStack, 0, >- this.astLengthStack = new int[stackLength + AstStackIncrement], 0, >+ this.astLengthStack = new int[stackLength + AST_STACK_INCREMENT], 0, > stackLength); > } > this.astLengthStack[this.astLengthPtr] = 1; >Index: dom/org/eclipse/jdt/core/dom/DocCommentParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java,v >retrieving revision 1.28 >diff -u -r1.28 DocCommentParser.java >--- dom/org/eclipse/jdt/core/dom/DocCommentParser.java 17 Nov 2005 18:52:09 -0000 1.28 >+++ dom/org/eclipse/jdt/core/dom/DocCommentParser.java 9 Jan 2006 14:31:18 -0000 >@@ -34,7 +34,7 @@ > super(null); > this.ast = ast; > this.scanner = scanner; >- this.sourceLevel = this.ast.apiLevel() >= AST.JLS3 ? ClassFileConstants.JDK1_5 : ClassFileConstants.JDK1_3; >+ this.complianceLevel = this.ast.apiLevel() >= AST.JLS3 ? ClassFileConstants.JDK1_5 : ClassFileConstants.JDK1_3; > this.checkDocComment = check; > this.kind = DOM_PARSER | TEXT_PARSE; > } >@@ -489,7 +489,7 @@ > } > break; > case 'v': >- if (this.sourceLevel >= ClassFileConstants.JDK1_5 && length == TAG_VALUE_LENGTH && CharOperation.equals(TAG_VALUE, tagName)) { >+ if (this.complianceLevel >= ClassFileConstants.JDK1_5 && length == TAG_VALUE_LENGTH && CharOperation.equals(TAG_VALUE, tagName)) { > this.tagValue = TAG_VALUE_VALUE; > if (this.inlineTagStarted) { > valid = parseReference(); >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java,v >retrieving revision 1.18 >diff -u -r1.18 CompletionJavadocParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java 6 Jan 2006 12:35:14 -0000 1.18 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java 9 Jan 2006 14:31:16 -0000 >@@ -278,7 +278,7 @@ > * Init tags arrays for current source level. > */ > private void initLevelTags() { >- int level = ((int)(this.sourceLevel >>> 16)) - ClassFileConstants.MAJOR_VERSION_1_1 + 1; >+ int level = ((int)(this.complianceLevel >>> 16)) - ClassFileConstants.MAJOR_VERSION_1_1 + 1; > // Init block tags > this.levelTags[BLOCK_IDX] = new char[BLOCK_ALL_TAGS_LENGTH][]; > this.levelTagsLength[BLOCK_IDX] = 0; >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java,v >retrieving revision 1.7 >diff -u -r1.7 JavadocCompletionParserTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java 5 Jan 2006 08:16:55 -0000 1.7 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java 9 Jan 2006 14:31:19 -0000 >@@ -11,6 +11,7 @@ > package org.eclipse.jdt.core.tests.compiler.parser; > > import java.util.Locale; >+import java.util.Map; > import java.util.StringTokenizer; > > import junit.framework.Test; >@@ -41,6 +42,7 @@ > } > > CompletionJavadoc javadoc; >+ String sourceLevel; > > public JavadocCompletionParserTest(String testName) { > super(testName); >@@ -61,6 +63,7 @@ > */ > protected void setUp() throws Exception { > super.setUp(); >+ this.sourceLevel = null; > } > > protected void assertCompletionNodeResult(String source, String expected) { >@@ -82,7 +85,14 @@ > actual > ); > } >- >+protected Map getCompilerOptions() { >+ Map options = super.getCompilerOptions(); >+ if (this.sourceLevel == null) { >+ return options; >+ } >+ options.put(CompilerOptions.OPTION_Source, this.sourceLevel); >+ return options; >+} > protected void verifyCompletionInJavadoc(String source, String after) { > CompilerOptions options = new CompilerOptions(getCompilerOptions()); > CompletionParser parser = new CompletionParser(new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(), >@@ -283,6 +293,21 @@ > verifyCompletionInJavadoc(source, "@"); > verifyAllTagsCompletion(); > } >+/** >+ * @bug [javadoc][assist] @linkplain no longer proposed when 1.4 compliance is used >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=123096" >+ */ >+public void test008() { >+ this.sourceLevel = CompilerOptions.VERSION_1_3; >+ String source = "package javadoc;\n" + >+ "/**\n" + >+ " * Completion on empty tag name:\n" + >+ " * @\n" + >+ " */\n" + >+ "public class Test {}\n"; >+ verifyCompletionInJavadoc(source, "@"); >+ verifyAllTagsCompletion(); >+} > > /** > * @tests Tests to verify completion node flags
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 123096
:
32675
|
32757