Lines 24-29
Link Here
|
24 |
import org.eclipse.jdt.core.Flags; |
24 |
import org.eclipse.jdt.core.Flags; |
25 |
import org.eclipse.jdt.core.IClassFile; |
25 |
import org.eclipse.jdt.core.IClassFile; |
26 |
import org.eclipse.jdt.core.ICompilationUnit; |
26 |
import org.eclipse.jdt.core.ICompilationUnit; |
|
|
27 |
import org.eclipse.jdt.core.IField; |
27 |
import org.eclipse.jdt.core.IInitializer; |
28 |
import org.eclipse.jdt.core.IInitializer; |
28 |
import org.eclipse.jdt.core.IJavaElement; |
29 |
import org.eclipse.jdt.core.IJavaElement; |
29 |
import org.eclipse.jdt.core.IJavaProject; |
30 |
import org.eclipse.jdt.core.IJavaProject; |
Lines 9217-9224
Link Here
|
9217 |
assertNotNull("No fields", fields); |
9218 |
assertNotNull("No fields", fields); |
9218 |
assertTrue("Empty", fields.length != 0); |
9219 |
assertTrue("Empty", fields.length != 0); |
9219 |
} |
9220 |
} |
9220 |
|
|
|
9221 |
|
9222 |
/** |
9221 |
/** |
9223 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=196354 |
9222 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=196354 |
9224 |
*/ |
9223 |
*/ |
Lines 9233-9236
Link Here
|
9233 |
assertNotNull("No binding", packageBinding); |
9232 |
assertNotNull("No binding", packageBinding); |
9234 |
assertEquals("Wrong name", "Sample", packageBinding.getName()); |
9233 |
assertEquals("Wrong name", "Sample", packageBinding.getName()); |
9235 |
} |
9234 |
} |
|
|
9235 |
/** |
9236 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=215858 |
9237 |
*/ |
9238 |
public void test0679() throws JavaModelException { |
9239 |
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0679", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
9240 |
IType[] types = sourceUnit.getTypes(); |
9241 |
assertNotNull(types); |
9242 |
assertEquals("wrong size", 1, types.length); |
9243 |
IType type = types[0]; |
9244 |
IField field = type.getField("i"); |
9245 |
assertNotNull("No field", field); |
9246 |
ISourceRange sourceRange = field.getNameRange(); |
9247 |
ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); |
9248 |
assertNotNull(result); |
9249 |
} |
9236 |
} |
9250 |
} |