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 39554 Details for
Bug 96237
[javadoc] Inner types must be qualified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Temporary patch which should be appliable on top of v_659
v01.txt (text/plain), 48.45 KB, created by
Frederic Fusier
on 2006-04-26 12:59:28 EDT
(
hide
)
Description:
Temporary patch which should be appliable on top of v_659
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2006-04-26 12:59:28 EDT
Size:
48.45 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java,v >retrieving revision 1.3 >diff -u -r1.3 SelectionJavadocParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java 4 Nov 2005 15:59:32 -0000 1.3 >+++ codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java 26 Apr 2006 16:40:21 -0000 >@@ -101,8 +101,9 @@ > * Otherwise return null as we do not need this reference. > */ > protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException { >- int start = (int) (this.identifierPositionStack[0] >>> 32); >- int end = (int) this.identifierPositionStack[0]; >+ int memberPtr = this.identifierLengthStack[0] - 1; >+ int start = (int) (this.identifierPositionStack[memberPtr] >>> 32); >+ int end = (int) this.identifierPositionStack[memberPtr]; > if (start <= this.selectionStart && this.selectionEnd <= end) { > selectedNode = (ASTNode) super.createMethodReference(receiver, arguments); > this.abort = true; >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.54 >diff -u -r1.54 JavadocParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 29 Mar 2006 02:47:34 -0000 1.54 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java 26 Apr 2006 16:40:23 -0000 >@@ -180,36 +180,56 @@ > TypeReference typeRef = (TypeReference) receiver; > // Decide whether we have a constructor or not > boolean isConstructor = false; >+ int length = this.identifierLengthStack[0]; > if (typeRef == null) { > char[] name = this.sourceParser.compilationUnit.getMainTypeName(); > TypeDeclaration typeDecl = getParsedTypeDeclaration(); > if (typeDecl != null) { > name = typeDecl.name; > } >- isConstructor = CharOperation.equals(this.identifierStack[0], name); >+ isConstructor = CharOperation.equals(this.identifierStack[length-1], name); > typeRef = new JavadocImplicitTypeReference(name, this.memberStart); > } else { >- char[] name = null; > if (typeRef instanceof JavadocSingleTypeReference) { >- name = ((JavadocSingleTypeReference)typeRef).token; >+ char[] name = ((JavadocSingleTypeReference)typeRef).token; >+ isConstructor = CharOperation.equals(this.identifierStack[length-1], name); > } else if (typeRef instanceof JavadocQualifiedTypeReference) { > char[][] tokens = ((JavadocQualifiedTypeReference)typeRef).tokens; >- name = tokens[tokens.length-1]; >+ int last = tokens.length-1; >+ isConstructor = CharOperation.equals(this.identifierStack[length-1], tokens[last]); >+ if (isConstructor) { >+ boolean valid = true; >+ if (valid) { >+ for (int i=0; i<length-1 && valid; i++) { >+ valid = CharOperation.equals(this.identifierStack[i], tokens[i]); >+ } >+ } >+ if (!valid) { >+ // TODO (frederic) need a specific message after 3.2 ship delivery >+ if (this.reportProblems) this.sourceParser.problemReporter().javadocInvalidReference(this.memberStart+1, this.scanner.getCurrentTokenEndPosition()); >+ return null; >+ } >+ } > } else { > throw new InvalidInputException(); > } >- isConstructor = CharOperation.equals(this.identifierStack[0], name); > } > // Create node > if (arguments == null) { > if (isConstructor) { >- JavadocAllocationExpression alloc = new JavadocAllocationExpression(this.identifierPositionStack[0]); >- alloc.type = typeRef; >- alloc.tagValue = this.tagValue; >- alloc.sourceEnd = this.scanner.getCurrentTokenEndPosition(); >- return alloc; >+ JavadocAllocationExpression allocation = new JavadocAllocationExpression(this.identifierPositionStack[length-1]); >+ allocation.type = typeRef; >+ allocation.tagValue = this.tagValue; >+ allocation.sourceEnd = this.scanner.getCurrentTokenEndPosition(); >+ if (length == 1) { >+ allocation.qualification = new char[][] { this.identifierStack[0] }; >+ } else { >+ System.arraycopy(this.identifierStack, 0, allocation.qualification = new char[length][], 0, length); >+ } >+ allocation.memberStart = this.memberStart; >+ return allocation; > } else { >- JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[0], this.identifierPositionStack[0]); >+ JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[length-1], this.identifierPositionStack[length-1]); > msg.receiver = typeRef; > msg.tagValue = this.tagValue; > msg.sourceEnd = this.scanner.getCurrentTokenEndPosition(); >@@ -219,14 +239,20 @@ > JavadocArgumentExpression[] expressions = new JavadocArgumentExpression[arguments.size()]; > arguments.toArray(expressions); > if (isConstructor) { >- JavadocAllocationExpression alloc = new JavadocAllocationExpression(this.identifierPositionStack[0]); >- alloc.arguments = expressions; >- alloc.type = typeRef; >- alloc.tagValue = this.tagValue; >- alloc.sourceEnd = this.scanner.getCurrentTokenEndPosition(); >- return alloc; >+ JavadocAllocationExpression allocation = new JavadocAllocationExpression(this.identifierPositionStack[length-1]); >+ allocation.arguments = expressions; >+ allocation.type = typeRef; >+ allocation.tagValue = this.tagValue; >+ allocation.sourceEnd = this.scanner.getCurrentTokenEndPosition(); >+ if (length == 1) { >+ allocation.qualification = new char[][] { this.identifierStack[0] }; >+ } else { >+ System.arraycopy(this.identifierStack, 0, allocation.qualification = new char[length][], 0, length); >+ } >+ allocation.memberStart = this.memberStart; >+ return allocation; > } else { >- JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[0], this.identifierPositionStack[0], expressions); >+ JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[length-1], this.identifierPositionStack[length-1], expressions); > msg.receiver = typeRef; > msg.tagValue = this.tagValue; > msg.sourceEnd = this.scanner.getCurrentTokenEndPosition(); >@@ -258,7 +284,7 @@ > */ > protected Object createTypeReference(int primitiveToken) { > TypeReference typeRef = null; >- int size = this.identifierLengthStack[this.identifierLengthPtr--]; >+ int size = this.identifierLengthStack[this.identifierLengthPtr]; > if (size == 1) { // Single Type ref > typeRef = new JavadocSingleTypeReference( > this.identifierStack[this.identifierPtr], >@@ -272,7 +298,7 @@ > System.arraycopy(this.identifierPositionStack, this.identifierPtr - size + 1, positions, 0, size); > typeRef = new JavadocQualifiedTypeReference(tokens, positions, this.tagSourceStart, this.tagSourceEnd); > } >- this.identifierPtr -= size; >+// this.identifierPtr -= size; > return typeRef; > } > >@@ -294,6 +320,34 @@ > return null; > } > >+ /** >+ * @param receiver >+ * @param start >+ * @throws InvalidInputException >+ */ >+ protected boolean parseQualifiedMember(Object receiver, int start) throws InvalidInputException { >+ parseQualifiedName(true); >+ boolean valid = true; >+ if (receiver instanceof SingleTypeReference) { >+ SingleTypeReference singleTypeRef = (SingleTypeReference) receiver; >+ valid = CharOperation.equals(singleTypeRef.token, this.identifierStack[this.identifierPtr]); >+ } >+ else if (receiver instanceof QualifiedTypeReference) { >+ QualifiedTypeReference qualifiedTypeRef = (QualifiedTypeReference) receiver; >+ for (int i=0; i<this.identifierPtr && valid; i++) { >+ valid = CharOperation.equals(qualifiedTypeRef.tokens[i], this.identifierStack[i]); >+ } >+ } >+ if (valid) return true; >+ int end = this.scanner.getCurrentTokenEndPosition() < this.lineEnd ? >+ this.scanner.getCurrentTokenEndPosition() : >+ this.scanner.getCurrentTokenStartPosition(); >+ end = end < this.lineEnd ? end : this.lineEnd; >+ // TODO (frederic) need a specific message after 3.2 ship delivery >+ if (this.reportProblems) this.sourceParser.problemReporter().javadocInvalidReference(start, end); >+ return false; >+ } >+ > /* > * Parse @return tag declaration > */ >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.60 >diff -u -r1.60 AbstractCommentParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 29 Mar 2006 02:47:34 -0000 1.60 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 26 Apr 2006 16:40:22 -0000 >@@ -641,8 +641,14 @@ > > // Get member identifier > if (readToken() == TerminalTokens.TokenNameIdentifier) { >- consumeToken(); >- pushIdentifier(true, false); >+ if (this.scanner.currentCharacter == '.') { >+ if (!parseQualifiedMember(receiver, start)) { >+ return null; >+ } >+ } else { >+ consumeToken(); >+ pushIdentifier(true, false); >+ } > // Look for next token to know whether it's a field or method reference > int previousPosition = this.index; > if (readToken() == TerminalTokens.TokenNameLPAREN) { >@@ -895,6 +901,15 @@ > return false; > } > >+ /** >+ * Parse qualified member >+ * >+ * @param receiver >+ * @param start >+ * @throws InvalidInputException >+ */ >+ protected abstract boolean parseQualifiedMember(Object receiver, int start) throws InvalidInputException; >+ > /* > * Parse a qualified name and built a type reference if the syntax is valid. > */ >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.34 >diff -u -r1.34 DocCommentParser.java >--- dom/org/eclipse/jdt/core/dom/DocCommentParser.java 29 Mar 2006 02:54:50 -0000 1.34 >+++ dom/org/eclipse/jdt/core/dom/DocCommentParser.java 26 Apr 2006 16:40:23 -0000 >@@ -86,7 +86,7 @@ > buffer.append(super.toString()); > return buffer.toString(); > } >- >+ > /* (non-Javadoc) > * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#createArgumentReference(char[], java.lang.Object, int) > */ >@@ -167,13 +167,13 @@ > // Create method ref > MethodRef methodRef = this.ast.newMethodRef(); > SimpleName methodName = new SimpleName(this.ast); >- methodName.internalSetIdentifier(new String(this.identifierStack[0])); >+ int memberPtr = this.identifierLengthStack[0] - 1; >+ methodName.internalSetIdentifier(new String(this.identifierStack[memberPtr])); > methodRef.setName(methodName); >- int start = (int) (this.identifierPositionStack[0] >>> 32); >- int end = (int) this.identifierPositionStack[0]; >+ int start = (int) (this.identifierPositionStack[memberPtr] >>> 32); >+ int end = (int) this.identifierPositionStack[memberPtr]; > methodName.setSourceRange(start, end - start + 1); > // Set qualifier >-// int end = methodName.getStartPosition()+methodName.getLength()-1; > if (receiver == null) { > start = this.memberStart; > methodRef.setSourceRange(start, end - start + 1); >@@ -188,10 +188,8 @@ > while (parameters.hasNext()) { > MethodRefParameter param = (MethodRefParameter) parameters.next(); > methodRef.parameters().add(param); >-// end = param.getStartPosition()+param.getLength()-1; > } > } >-// methodRef.setSourceRange(start, end-start+1); > methodRef.setSourceRange(start, this.scanner.getCurrentTokenEndPosition()-start+1); > return methodRef; > } >@@ -239,7 +237,7 @@ > * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#createTypeReference() > */ > protected Object createTypeReference(int primitiveToken) { >- int size = this.identifierLengthStack[this.identifierLengthPtr--]; >+ int size = this.identifierLengthStack[this.identifierLengthPtr]; > String[] identifiers = new String[size]; > int pos = this.identifierPtr - size + 1; > for (int i = 0; i < size; i++) { >@@ -307,15 +305,15 @@ > int end = (int) this.identifierPositionStack[pos]; > typeRef.setSourceRange(start, end-start+1); > } >- this.identifierPtr -= size; > return typeRef; > } > >- /* >- * Parse @return tag declaration >+ /** >+ * @param receiver >+ * @param start >+ * @throws InvalidInputException > */ >- protected boolean parseReturn() { >- createTag(); >+ protected boolean parseQualifiedMember(Object receiver, int start) throws InvalidInputException { > return true; > } > >@@ -332,6 +330,14 @@ > return false; > } > >+ /* >+ * Parse @return tag declaration >+ */ >+ protected boolean parseReturn() { >+ createTag(); >+ return true; >+ } >+ > /* (non-Javadoc) > * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseTag(int) > */ >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java,v >retrieving revision 1.27 >diff -u -r1.27 JavadocAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java 28 Mar 2006 20:28:15 -0000 1.27 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java 26 Apr 2006 16:40:21 -0000 >@@ -10,15 +10,17 @@ > *******************************************************************************/ > package org.eclipse.jdt.internal.compiler.ast; > >+import org.eclipse.jdt.core.compiler.CharOperation; > import org.eclipse.jdt.internal.compiler.impl.Constant; > import org.eclipse.jdt.internal.compiler.lookup.*; > > public class JavadocAllocationExpression extends AllocationExpression { > > public int tagSourceStart, tagSourceEnd; >- public int tagValue; >+ public int tagValue, memberStart; > public boolean superAccess = false; >- >+ public char[][] qualification; >+ > public JavadocAllocationExpression(int start, int end) { > this.sourceStart = start; > this.sourceEnd = end; >@@ -28,7 +30,7 @@ > this((int) (pos >>> 32), (int) pos); > } > >- private TypeBinding internalResolveType(Scope scope) { >+ TypeBinding internalResolveType(Scope scope) { > > // Propagate the type checking to the arguments, and check if the constructor is defined. > this.constant = Constant.NotAConstant; >@@ -120,6 +122,22 @@ > } > } > } >+ } else if (this.resolvedType.isMemberType()) { >+ boolean valid = qualification != null; >+ int length = qualification.length; >+ int idx = length; >+ ReferenceBinding enclosingTypeBinding = allocationType; >+ if (valid) { >+ while (idx>0 && enclosingTypeBinding != null) { >+ valid = CharOperation.equals(qualification[--idx], enclosingTypeBinding.sourceName); >+ if (!valid) break; >+ enclosingTypeBinding = enclosingTypeBinding.enclosingType(); >+ } >+ } >+ if (!valid || idx > 0 || enclosingTypeBinding != null) { >+ // TODO (frederic) need a specific message after 3.2 ship delivery >+ scope.problemReporter().javadocInvalidReference(this.memberStart+1, this.sourceEnd); >+ } > } > if (isMethodUseDeprecated(this.binding, scope, true)) { > scope.problemReporter().javadocDeprecatedMethod(this.binding, this, scope.getDeclarationModifiers()); >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.22 >diff -u -r1.22 CompletionJavadocParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java 28 Mar 2006 20:29:57 -0000 1.22 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java 26 Apr 2006 16:40:21 -0000 >@@ -149,8 +149,9 @@ > * Otherwise return null as we do not need this reference. > */ > protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException { >- int refStart = (int) (this.identifierPositionStack[0] >>> 32); >- int refEnd = (int) this.identifierPositionStack[0]; >+ int memberPtr = this.identifierLengthStack[0] - 1; >+ int refStart = (int) (this.identifierPositionStack[memberPtr] >>> 32); >+ int refEnd = (int) this.identifierPositionStack[memberPtr]; > boolean inCompletion = (refStart <= (this.cursorLocation+1) && this.cursorLocation <= refEnd) // completion cursor is between first and last stacked identifiers > || ((refStart == (refEnd+1) && refEnd == this.cursorLocation)) // or it's a completion on empty token > || (this.memberStart == this.cursorLocation); // or it's a completion just after the member separator with an identifier after the cursor >@@ -226,7 +227,6 @@ > this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, this.identifierStack[this.identifierPtr], positions, this.tagSourceStart, this.tagSourceEnd); > } > } >- this.identifierPtr -= nbIdentifiers; > > if (CompletionEngine.DEBUG) { > System.out.println(" completion partial qualified type="+completionNode); //$NON-NLS-1$ >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedAllocationExpression.java >=================================================================== >RCS file: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedAllocationExpression.java >diff -N compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedAllocationExpression.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedAllocationExpression.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,50 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2006 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.jdt.internal.compiler.ast; >+ >+import org.eclipse.jdt.core.compiler.CharOperation; >+import org.eclipse.jdt.internal.compiler.lookup.*; >+ >+public class JavadocQualifiedAllocationExpression extends JavadocAllocationExpression { >+ >+public char[][] qualification; >+ >+public JavadocQualifiedAllocationExpression(int start, int end) { >+ super(start, end); >+} >+public JavadocQualifiedAllocationExpression(long pos) { >+ super(pos); >+} >+ >+TypeBinding internalResolveType(Scope scope) { >+ ReferenceBinding allocationType = (ReferenceBinding) super.internalResolveType(scope); >+ if (this.binding.isValidBinding() && allocationType.isMemberType()) { >+ boolean valid = qualification != null; >+ if (valid) { >+ ReferenceBinding enclosingTypeBinding = allocationType; >+ int idx = qualification.length; >+ while (idx>0 && enclosingTypeBinding.isMemberType()) { >+ valid = CharOperation.equals(qualification[--idx], enclosingTypeBinding.sourceName); >+ if (!valid) break; >+ enclosingTypeBinding = enclosingTypeBinding.enclosingType(); >+ } >+ } >+ if (!valid) { >+ // TODO (frederic) need a specific message after 3.2 ship delivery >+ scope.problemReporter().javadocInvalidReference(this.memberStart+1, this.sourceEnd); >+ } >+ } >+ if (isMethodUseDeprecated(this.binding, scope, true)) { >+ scope.problemReporter().javadocDeprecatedMethod(this.binding, this, scope.getDeclarationModifiers()); >+ } >+ return allocationType; >+} >+} >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java,v >retrieving revision 1.22 >diff -u -r1.22 JavadocBugsTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 29 Mar 2006 03:50:22 -0000 1.22 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java 26 Apr 2006 16:40:26 -0000 >@@ -36,7 +36,7 @@ > // Use this static initializer to specify subset for tests > // All specified tests which does not belong to the class are skipped... > static { >-// TESTS_PREFIX = "testBug83127"; >+// TESTS_PREFIX = "testBug96237"; > // TESTS_NAMES = new String[] { "testBug68017javadocWarning2" }; > // TESTS_NUMBERS = new int[] { 129241 }; > // TESTS_RANGE = new int[] { 21, 50 }; >@@ -690,12 +690,7 @@ > "}\n" > }, > "----------\n" + >- "1. WARNING in X.java (at line 2)\n" + >- " public class X extends RuntimeException {\n" + >- " ^\n" + >- "The serializable class X does not declare a static final serialVersionUID field of type long\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 5)\n" + >+ "1. ERROR in X.java (at line 5)\n" + > " public X(String message) {\n" + > " ^^^^^^^\n" + > "Javadoc: Missing tag for parameter message\n" + >@@ -2420,6 +2415,196 @@ > } > > /** >+ * Bug 68726: [Javadoc] Target attribute in @see link triggers warning >+ * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=68726">68726</a> >+ */ >+ public void testBug68726conform1() { >+ runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " /**\n" + >+ " * @see Object <a href=\"http://www.eclipse.org\" target=\"_top\">Eclipse</a>\n" + >+ " */\n" + >+ " void foo1() {}\n" + >+ " /**@see Object <a href=\"http://www.eclipse.org\" target=\"_top\" target1=\"_top1\" target2=\"_top2\">Eclipse</a>*/\n" + >+ " void foo2() {}\n" + >+ "}\n" >+ } >+ ); >+ } >+ public void testBug68726conform2() { >+ runConformTest( >+ new String[] { >+ "X.java", >+ "/**\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page</a>\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >+ " * IBM Home Page</a>\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >+ " * IBM Home Page\n" + >+ " * </a>\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >+ " *\n" + >+ " * IBM\n" + >+ " *\n" + >+ " * Home Page\n" + >+ " *\n" + >+ " *\n" + >+ " * </a>\n" + >+ " * @see Object\n" + >+ " */\n" + >+ "public class X {\n" + >+ "}\n" >+ } >+ ); >+ } >+ public void testBug68726negative1() { >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " /**\n" + >+ " * Invalid URL link references\n" + >+ " *\n" + >+ " * @see <a href=\"invalid\" target\n" + >+ " * @see <a href=\"invalid\" target=\n" + >+ " * @see <a href=\"invalid\" target=\"\n" + >+ " * @see <a href=\"invalid\" target=\"_top\n" + >+ " * @see <a href=\"invalid\" target=\"_top\"\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid<\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid</\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid</a\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid</a> no text allowed after the href\n" + >+ " */\n" + >+ " void foo() {}\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 5)\n" + >+ " * @see <a href=\"invalid\" target\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 6)\n" + >+ " * @see <a href=\"invalid\" target=\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 7)\n" + >+ " * @see <a href=\"invalid\" target=\"\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "4. ERROR in X.java (at line 8)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "5. ERROR in X.java (at line 9)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\"\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "6. ERROR in X.java (at line 10)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "7. ERROR in X.java (at line 11)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "8. ERROR in X.java (at line 12)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "9. ERROR in X.java (at line 13)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid<\n" + >+ " ^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "10. ERROR in X.java (at line 14)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid</\n" + >+ " ^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "11. ERROR in X.java (at line 15)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid</a\n" + >+ " ^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "12. ERROR in X.java (at line 16)\n" + >+ " * @see <a href=\"invalid\" target=\"_top\">invalid</a> no text allowed after the href\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Unexpected text\n" + >+ "----------\n" >+ ); >+ } >+ public void testBug68726negative2() { >+ runNegativeTest( >+ new String[] { >+ "X.java", >+ "/**\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >+ " * IBM Home Page\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >+ " * IBM Home Page<\n" + >+ " * /a>\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >+ " *\n" + >+ " * IBM\n" + >+ " *\n" + >+ " * Home Page\n" + >+ " *\n" + >+ " *\n" + >+ " * \n" + >+ " * @see Unknown\n" + >+ " */\n" + >+ "public class X {\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 2)\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 3)\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >+ " * IBM Home Page\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 6)\n" + >+ " * IBM Home Page<\n" + >+ " ^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "4. ERROR in X.java (at line 8)\n" + >+ " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >+ " *\n" + >+ " * IBM\n" + >+ " *\n" + >+ " * Home Page\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Malformed link reference\n" + >+ "----------\n" + >+ "5. ERROR in X.java (at line 16)\n" + >+ " * @see Unknown\n" + >+ " ^^^^^^^\n" + >+ "Javadoc: Unknown cannot be resolved to a type\n" + >+ "----------\n" >+ ); >+ } >+ >+ /** > * Bug 69272: [Javadoc] Invalid malformed reference (missing separator) > * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=69272">69272</a> > */ >@@ -2709,196 +2894,6 @@ > } > > /** >- * Bug 68726: [Javadoc] Target attribute in @see link triggers warning >- * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=68726">68726</a> >- */ >- public void testBug68726conform1() { >- runConformTest( >- new String[] { >- "X.java", >- "public class X {\n" + >- " /**\n" + >- " * @see Object <a href=\"http://www.eclipse.org\" target=\"_top\">Eclipse</a>\n" + >- " */\n" + >- " void foo1() {}\n" + >- " /**@see Object <a href=\"http://www.eclipse.org\" target=\"_top\" target1=\"_top1\" target2=\"_top2\">Eclipse</a>*/\n" + >- " void foo2() {}\n" + >- "}\n" >- } >- ); >- } >- public void testBug68726conform2() { >- runConformTest( >- new String[] { >- "X.java", >- "/**\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page</a>\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >- " * IBM Home Page</a>\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >- " * IBM Home Page\n" + >- " * </a>\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >- " *\n" + >- " * IBM\n" + >- " *\n" + >- " * Home Page\n" + >- " *\n" + >- " *\n" + >- " * </a>\n" + >- " * @see Object\n" + >- " */\n" + >- "public class X {\n" + >- "}\n" >- } >- ); >- } >- public void testBug68726negative1() { >- runNegativeTest( >- new String[] { >- "X.java", >- "public class X {\n" + >- " /**\n" + >- " * Invalid URL link references\n" + >- " *\n" + >- " * @see <a href=\"invalid\" target\n" + >- " * @see <a href=\"invalid\" target=\n" + >- " * @see <a href=\"invalid\" target=\"\n" + >- " * @see <a href=\"invalid\" target=\"_top\n" + >- " * @see <a href=\"invalid\" target=\"_top\"\n" + >- " * @see <a href=\"invalid\" target=\"_top\">\n" + >- " * @see <a href=\"invalid\" target=\"_top\">\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid<\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid</\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid</a\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid</a> no text allowed after the href\n" + >- " */\n" + >- " void foo() {}\n" + >- "}\n" >- }, >- "----------\n" + >- "1. ERROR in X.java (at line 5)\n" + >- " * @see <a href=\"invalid\" target\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 6)\n" + >- " * @see <a href=\"invalid\" target=\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "3. ERROR in X.java (at line 7)\n" + >- " * @see <a href=\"invalid\" target=\"\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "4. ERROR in X.java (at line 8)\n" + >- " * @see <a href=\"invalid\" target=\"_top\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "5. ERROR in X.java (at line 9)\n" + >- " * @see <a href=\"invalid\" target=\"_top\"\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "6. ERROR in X.java (at line 10)\n" + >- " * @see <a href=\"invalid\" target=\"_top\">\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "7. ERROR in X.java (at line 11)\n" + >- " * @see <a href=\"invalid\" target=\"_top\">\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "8. ERROR in X.java (at line 12)\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "9. ERROR in X.java (at line 13)\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid<\n" + >- " ^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "10. ERROR in X.java (at line 14)\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid</\n" + >- " ^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "11. ERROR in X.java (at line 15)\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid</a\n" + >- " ^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "12. ERROR in X.java (at line 16)\n" + >- " * @see <a href=\"invalid\" target=\"_top\">invalid</a> no text allowed after the href\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Unexpected text\n" + >- "----------\n" >- ); >- } >- public void testBug68726negative2() { >- runNegativeTest( >- new String[] { >- "X.java", >- "/**\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >- " * IBM Home Page\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >- " * IBM Home Page<\n" + >- " * /a>\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >- " *\n" + >- " * IBM\n" + >- " *\n" + >- " * Home Page\n" + >- " *\n" + >- " *\n" + >- " * \n" + >- " * @see Unknown\n" + >- " */\n" + >- "public class X {\n" + >- "}\n" >- }, >- "----------\n" + >- "1. ERROR in X.java (at line 2)\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 3)\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >- " * IBM Home Page\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "3. ERROR in X.java (at line 6)\n" + >- " * IBM Home Page<\n" + >- " ^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "4. ERROR in X.java (at line 8)\n" + >- " * @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + >- " *\n" + >- " * IBM\n" + >- " *\n" + >- " * Home Page\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Javadoc: Malformed link reference\n" + >- "----------\n" + >- "5. ERROR in X.java (at line 16)\n" + >- " * @see Unknown\n" + >- " ^^^^^^^\n" + >- "Javadoc: Unknown cannot be resolved to a type\n" + >- "----------\n" >- ); >- } >- >- /** > * Bug 70892: [1.5][Javadoc] Compiler should parse reference for inline tag @value > * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=70892">70892</a> > * These two tests should pass whatever the source level... >@@ -3751,7 +3746,7 @@ > " class C { \n" + > " /**\n" + > " * Link {@link #B(Exception)} OK\n" + >- " * Link {@link #C(String)} OK\n" + >+ " * Link {@link #B.C(String)} OK\n" + > " * Link {@link #foo()} OK\n" + > " * Link {@link #bar()} OK\n" + > " */\n" + >@@ -3950,6 +3945,306 @@ > } > > /** >+ * Bug 96237: [javadoc] Inner types must be qualified >+ * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=96237" >+ */ >+ public void testBug96237() { >+ runConformTest( >+ new String[] { >+ "boden/IAFAState.java", >+ "package boden;\n" + >+ "public interface IAFAState {\n" + >+ " public class ValidationException extends Exception {\n" + >+ " public ValidationException(String variableName, IAFAState subformula) {\n" + >+ " super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + >+ " }\n" + >+ " public void method() {}\n" + >+ " }\n" + >+ " /**\n" + >+ " * Validates a formula for consistent bindings. Bindings are consistent, when at each point in time,\n" + >+ " * the set of povided variables can be guaranteed to be a superset of the set of required variables.\n" + >+ " * @throws ValidationException Thrown if a variable is unbound. \n" + >+ " * @see ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + >+ " * @see IAFAState.ValidationException#method()\n" + >+ " * @see ValidationException\n" + >+ " * {@link ValidationException}\n" + >+ " */\n" + >+ " public void validate() throws ValidationException;\n" + >+ "}\n", >+ "boden/TestValid.java", >+ "package boden;\n" + >+ "import boden.IAFAState.ValidationException;\n" + >+ "/**\n" + >+ " * @see ValidationException\n" + >+ " * @see IAFAState.ValidationException\n" + >+ " */\n" + >+ "public class TestValid {\n" + >+ " /** \n" + >+ " * @see ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + >+ " */\n" + >+ " IAFAState.ValidationException valid1;\n" + >+ " /**\n" + >+ " * @see IAFAState.ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + >+ " */\n" + >+ " IAFAState.ValidationException valid2;\n" + >+ "}\n" >+ } >+ ); >+ } >+ public void testBug96237b() { >+ runNegativeTest( >+ new String[] { >+ "boden/IAFAState.java", >+ "package boden;\n" + >+ "public interface IAFAState {\n" + >+ " public class ValidationException extends Exception {\n" + >+ " public ValidationException(String variableName, IAFAState subformula) {\n" + >+ " super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + >+ " }\n" + >+ " public void method() {}\n" + >+ " }\n" + >+ "}\n", >+ "boden/TestInvalid.java", >+ "package boden;\n" + >+ "import boden.IAFAState.ValidationException;\n" + >+ "public class TestInvalid {\n" + >+ " /** \n" + >+ " * @see ValidationException#ValidationException(String, IAFAState)\n" + >+ " */ \n" + >+ " IAFAState.ValidationException invalid;\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in boden\\TestInvalid.java (at line 5)\n" + >+ " * @see ValidationException#ValidationException(String, IAFAState)\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" >+ ); >+ } >+ public void testBug96237c() { >+ runNegativeTest( >+ new String[] { >+ "boden/IAFAState.java", >+ "package boden;\n" + >+ "public interface IAFAState {\n" + >+ " public class ValidationException extends Exception {\n" + >+ " public ValidationException(String variableName, IAFAState subformula) {\n" + >+ " super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + >+ " }\n" + >+ " public void method() {}\n" + >+ " }\n" + >+ "}\n", >+ "boden/TestInvalid.java", >+ "package boden;\n" + >+ "import boden.IAFAState.ValidationException;\n" + >+ "public class TestInvalid {\n" + >+ " /**\n" + >+ " * @see IAFAState.ValidationException#ValidationException(String, IAFAState)\n" + >+ " */\n" + >+ " IAFAState.ValidationException invalid;\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in boden\\TestInvalid.java (at line 5)\n" + >+ " * @see IAFAState.ValidationException#ValidationException(String, IAFAState)\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" >+ ); >+ } >+ public void testBug96237d() { >+ runNegativeTest( >+ new String[] { >+ "test/Test.java", >+ "package test;\n" + >+ "public interface Test {\n" + >+ " public class Level0 {\n" + >+ " public Level0() {}\n" + >+ " }\n" + >+ " public interface Member {\n" + >+ " public class Level1 {\n" + >+ " public Level1() {}\n" + >+ " }\n" + >+ " }\n" + >+ "}\n", >+ "test/C.java", >+ "package test;\n" + >+ "public class C {\n" + >+ " /**\n" + >+ " * @see Test.Level0#Test.Level0()\n" + >+ " */\n" + >+ " Test.Level0 valid = new Test.Level0();\n" + >+ " /**\n" + >+ " * @see Test.Level0#Level0()\n" + >+ " */\n" + >+ " Test.Level0 invalid = new Test.Level0();\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in test\\C.java (at line 8)\n" + >+ " * @see Test.Level0#Level0()\n" + >+ " ^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" >+ ); >+ } >+ public void testBug96237e() { >+ runNegativeTest( >+ new String[] { >+ "test/Test.java", >+ "package test;\n" + >+ "public interface Test {\n" + >+ " public class Level0 {\n" + >+ " public Level0() {}\n" + >+ " }\n" + >+ " public interface Member {\n" + >+ " public class Level1 {\n" + >+ " public Level1() {}\n" + >+ " }\n" + >+ " }\n" + >+ "}\n", >+ "test/C2.java", >+ "package test;\n" + >+ "public class C2 {\n" + >+ " /**\n" + >+ " * @see Test.Member.Level1#Test.Member.Level1()\n" + >+ " */\n" + >+ " Test.Member.Level1 valid = new Test.Member.Level1();\n" + >+ " /**\n" + >+ " * @see Test.Member.Level1#Level1()\n" + >+ " */\n" + >+ " Test.Member.Level1 invalid = new Test.Member.Level1();\n" + >+ " /**\n" + >+ " * @see Test.Member.Level1#Test.Level1()\n" + >+ " */\n" + >+ " Test.Member.Level1 wrong = new Test.Member.Level1();\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in test\\C2.java (at line 8)\n" + >+ " * @see Test.Member.Level1#Level1()\n" + >+ " ^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "2. ERROR in test\\C2.java (at line 12)\n" + >+ " * @see Test.Member.Level1#Test.Level1()\n" + >+ " ^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" >+ ); >+ } >+ public void testBug96237f() { >+ runConformTest( >+ new String[] { >+ "implicit/Valid.java", >+ "package implicit;\n" + >+ "public interface Valid {\n" + >+ " public class Level0 {\n" + >+ " /**\n" + >+ " * @see #Valid.Level0() Valid\n" + >+ " */\n" + >+ " public Level0() {}\n" + >+ " /**\n" + >+ " * @see #Valid.Level0(String) Valid\n" + >+ " */\n" + >+ " public Level0(String str) {}\n" + >+ " }\n" + >+ " public interface Member {\n" + >+ " public class Level1 {\n" + >+ " /**\n" + >+ " * @see #Valid.Member.Level1() Valid\n" + >+ " */\n" + >+ " public Level1() {}\n" + >+ " /**\n" + >+ " * @see #Valid.Member.Level1(int) Valid\n" + >+ " */\n" + >+ " public Level1(int x) {}\n" + >+ " }\n" + >+ " }\n" + >+ "}\n" >+ } >+ ); >+ } >+ public void testBug96237g() { >+ runNegativeTest( >+ new String[] { >+ "implicit/Invalid.java", >+ "package implicit;\n" + >+ "public interface Invalid {\n" + >+ " public class Level0 {\n" + >+ " /**\n" + >+ " * @see #Level0() Invalid\n" + >+ " */\n" + >+ " public Level0() {}\n" + >+ " /**\n" + >+ " * @see #Level0(String) Invalid\n" + >+ " */\n" + >+ " public Level0(String str) {}\n" + >+ " }\n" + >+ " public interface Member {\n" + >+ " public class Level1 {\n" + >+ " /**\n" + >+ " * @see #Level1() Invalid\n" + >+ " * @see #Member.Level1() Invalid\n" + >+ " * @see #Invalid.Level1() Invalid\n" + >+ " */\n" + >+ " public Level1() {}\n" + >+ " /**\n" + >+ " * @see #Level1(int) Invalid\n" + >+ " * @see #Invalid.Level1(int) Invalid\n" + >+ " * @see #Member.Level1(int) Invalid\n" + >+ " */\n" + >+ " public Level1(int x) {}\n" + >+ " }\n" + >+ " }\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in implicit\\Invalid.java (at line 5)\n" + >+ " * @see #Level0() Invalid\n" + >+ " ^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "2. ERROR in implicit\\Invalid.java (at line 9)\n" + >+ " * @see #Level0(String) Invalid\n" + >+ " ^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "3. ERROR in implicit\\Invalid.java (at line 16)\n" + >+ " * @see #Level1() Invalid\n" + >+ " ^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "4. ERROR in implicit\\Invalid.java (at line 17)\n" + >+ " * @see #Member.Level1() Invalid\n" + >+ " ^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "5. ERROR in implicit\\Invalid.java (at line 18)\n" + >+ " * @see #Invalid.Level1() Invalid\n" + >+ " ^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "6. ERROR in implicit\\Invalid.java (at line 22)\n" + >+ " * @see #Level1(int) Invalid\n" + >+ " ^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "7. ERROR in implicit\\Invalid.java (at line 23)\n" + >+ " * @see #Invalid.Level1(int) Invalid\n" + >+ " ^^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" + >+ "8. ERROR in implicit\\Invalid.java (at line 24)\n" + >+ " * @see #Member.Level1(int) Invalid\n" + >+ " ^^^^^^^^^^^^^^^^^^\n" + >+ "Javadoc: Invalid reference\n" + >+ "----------\n" >+ ); >+ } >+ >+ /** > * Bug 116464: [javadoc] Unicode tag name are not correctly parsed > * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=116464" > */ >Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java,v >retrieving revision 1.37 >diff -u -r1.37 JavadocTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java 30 Mar 2006 15:26:50 -0000 1.37 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java 26 Apr 2006 16:40:26 -0000 >@@ -100,6 +100,7 @@ > options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, CompilerOptions.ENABLED); > options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, CompilerOptions.ENABLED); > options.put(CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, CompilerOptions.PRIVATE); >+ options.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.IGNORE); > return options; > } >
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 96237
:
39409
|
39554
|
45150
|
45373