Lines 75-80
Link Here
|
75 |
import org.eclipse.jdt.core.dom.InfixExpression; |
75 |
import org.eclipse.jdt.core.dom.InfixExpression; |
76 |
import org.eclipse.jdt.core.dom.Initializer; |
76 |
import org.eclipse.jdt.core.dom.Initializer; |
77 |
import org.eclipse.jdt.core.dom.InstanceofExpression; |
77 |
import org.eclipse.jdt.core.dom.InstanceofExpression; |
|
|
78 |
import org.eclipse.jdt.core.dom.Javadoc; |
78 |
import org.eclipse.jdt.core.dom.MethodDeclaration; |
79 |
import org.eclipse.jdt.core.dom.MethodDeclaration; |
79 |
import org.eclipse.jdt.core.dom.MethodInvocation; |
80 |
import org.eclipse.jdt.core.dom.MethodInvocation; |
80 |
import org.eclipse.jdt.core.dom.Modifier; |
81 |
import org.eclipse.jdt.core.dom.Modifier; |
Lines 95-100
Link Here
|
95 |
import org.eclipse.jdt.core.dom.SuperMethodInvocation; |
96 |
import org.eclipse.jdt.core.dom.SuperMethodInvocation; |
96 |
import org.eclipse.jdt.core.dom.SwitchCase; |
97 |
import org.eclipse.jdt.core.dom.SwitchCase; |
97 |
import org.eclipse.jdt.core.dom.SwitchStatement; |
98 |
import org.eclipse.jdt.core.dom.SwitchStatement; |
|
|
99 |
import org.eclipse.jdt.core.dom.TagElement; |
100 |
import org.eclipse.jdt.core.dom.TextElement; |
98 |
import org.eclipse.jdt.core.dom.TryStatement; |
101 |
import org.eclipse.jdt.core.dom.TryStatement; |
99 |
import org.eclipse.jdt.core.dom.Type; |
102 |
import org.eclipse.jdt.core.dom.Type; |
100 |
import org.eclipse.jdt.core.dom.TypeDeclaration; |
103 |
import org.eclipse.jdt.core.dom.TypeDeclaration; |
Lines 122-128
Link Here
|
122 |
static { |
125 |
static { |
123 |
// TESTS_NAMES = new String[] {"test0602"}; |
126 |
// TESTS_NAMES = new String[] {"test0602"}; |
124 |
// TESTS_RANGE = new int[] { 713, -1 }; |
127 |
// TESTS_RANGE = new int[] { 713, -1 }; |
125 |
// TESTS_NUMBERS = new int[] { 504, 505, 512, 720 }; |
128 |
// TESTS_NUMBERS = new int[] { 721 }; |
126 |
} |
129 |
} |
127 |
public static Test suite() { |
130 |
public static Test suite() { |
128 |
return buildModelTestSuite(ASTConverterTestAST3_2.class); |
131 |
return buildModelTestSuite(ASTConverterTestAST3_2.class); |
Lines 10575-10578
Link Here
|
10575 |
assertTrue("A constructor", !declaration.isConstructor()); |
10578 |
assertTrue("A constructor", !declaration.isConstructor()); |
10576 |
checkSourceRange(declaration, "public void method(final int parameter) { }", source, true/*expectMalformed*/); |
10579 |
checkSourceRange(declaration, "public void method(final int parameter) { }", source, true/*expectMalformed*/); |
10577 |
} |
10580 |
} |
|
|
10581 |
/** |
10582 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=342455 |
10583 |
*/ |
10584 |
public void test0721() throws JavaModelException { |
10585 |
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0721", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
10586 |
char[] source = sourceUnit.getSource().toCharArray(); |
10587 |
ASTNode result = runConversion(AST.JLS3, sourceUnit, true); |
10588 |
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ |
10589 |
CompilationUnit unit = (CompilationUnit) result; |
10590 |
ASTNode node = getASTNode(unit, 0); |
10591 |
TypeDeclaration declaration = (TypeDeclaration) node; |
10592 |
Javadoc javadoc = declaration.getJavadoc(); |
10593 |
List tags = javadoc.tags(); |
10594 |
TagElement element = (TagElement) tags.get(0); |
10595 |
List fragments = element.fragments(); |
10596 |
element = (TagElement) fragments.get(0); |
10597 |
assertEquals("wrong tag name", "@code", element.getTagName()); |
10598 |
checkSourceRange((TextElement) element.fragments().get(0), " stars*", source); |
10599 |
|
10600 |
element = (TagElement) fragments.get(2); |
10601 |
assertEquals("wrong tag name", "@literal", element.getTagName()); |
10602 |
checkSourceRange((TextElement) element.fragments().get(0), " stars****", source); |
10603 |
|
10604 |
element = (TagElement) fragments.get(4); |
10605 |
assertEquals("wrong tag name", "@code", element.getTagName()); |
10606 |
checkSourceRange((TextElement) element.fragments().get(0), " space* ", source); |
10607 |
|
10608 |
element = (TagElement) fragments.get(5); |
10609 |
assertEquals("wrong tag name", "@code", element.getTagName()); |
10610 |
checkSourceRange((TextElement) element.fragments().get(0), " stars* ", source); |
10611 |
|
10612 |
element = (TagElement) fragments.get(7); |
10613 |
assertEquals("wrong tag name", "@literal", element.getTagName()); |
10614 |
checkSourceRange((TextElement) element.fragments().get(0), " stars**** ", source); |
10615 |
} |
10578 |
} |
10616 |
} |