Lines 11-19
Link Here
|
11 |
package org.eclipse.jdt.core.tests.model; |
11 |
package org.eclipse.jdt.core.tests.model; |
12 |
|
12 |
|
13 |
import java.io.IOException; |
13 |
import java.io.IOException; |
|
|
14 |
import java.util.HashMap; |
14 |
|
15 |
|
|
|
16 |
import org.eclipse.core.resources.IResource; |
15 |
import org.eclipse.core.runtime.CoreException; |
17 |
import org.eclipse.core.runtime.CoreException; |
|
|
18 |
import org.eclipse.core.runtime.IPath; |
16 |
import org.eclipse.jdt.core.*; |
19 |
import org.eclipse.jdt.core.*; |
|
|
20 |
import org.eclipse.jdt.core.tests.util.Util; |
17 |
|
21 |
|
18 |
import junit.framework.*; |
22 |
import junit.framework.*; |
19 |
|
23 |
|
Lines 2553-2556
Link Here
|
2553 |
elements |
2557 |
elements |
2554 |
); |
2558 |
); |
2555 |
} |
2559 |
} |
|
|
2560 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=222458 |
2561 |
public void test0113() throws JavaModelException { |
2562 |
ICompilationUnit definition = null; |
2563 |
try { |
2564 |
definition = getWorkingCopy( |
2565 |
"/Resolve/src2/test0113/Test.java", |
2566 |
"package test0113;\n" + |
2567 |
"public class Test {\n" + |
2568 |
" class Member<T> {\n" + |
2569 |
" }\n" + |
2570 |
"}", |
2571 |
this.wcOwner |
2572 |
); |
2573 |
IJavaElement[] elements = select( |
2574 |
"/Resolve/src2/test0113/Test2.java", |
2575 |
"package test0113;\n" + |
2576 |
"public class Test2 {\n" + |
2577 |
" Test.Member<String> field;\n" + |
2578 |
"}", |
2579 |
"Member"); |
2580 |
assertEquals("test0113.Test.Member<java.lang.String>", ((IType)elements[0]).getFullyQualifiedParameterizedName()); |
2581 |
} finally { |
2582 |
if (definition != null) |
2583 |
definition.discardWorkingCopy(); |
2584 |
} |
2585 |
} |
2586 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=222458 |
2587 |
public void test0114() throws Exception { |
2588 |
IResource rootResource = getPackageFragmentRoot("Resolve", "/Resolve/class-folder").getResource(); |
2589 |
IPath rootLocation = rootResource.getLocation(); |
2590 |
try { |
2591 |
Util.createClassFolder(new String[] { |
2592 |
"test0114/Test.java", |
2593 |
"package test0114;\n" + |
2594 |
"public class Test {\n" + |
2595 |
" class Member<T> {\n" + |
2596 |
" }\n" + |
2597 |
"}" |
2598 |
}, |
2599 |
rootLocation.toOSString(), |
2600 |
"1.5"); |
2601 |
rootResource.refreshLocal(IResource.DEPTH_INFINITE, null); |
2602 |
IJavaElement[] elements = select( |
2603 |
"/Resolve/src2/test0114/Test2.java", |
2604 |
"package test0114;\n" + |
2605 |
"public class Test2 {\n" + |
2606 |
" Test.Member<String> field;\n" + |
2607 |
"}", |
2608 |
"Member"); |
2609 |
assertEquals("test0114.Test.Member<java.lang.String>", ((IType)elements[0]).getFullyQualifiedParameterizedName()); |
2610 |
} finally { |
2611 |
deleteFile(rootLocation.append("test0114").toFile()); |
2612 |
} |
2613 |
} |
2556 |
} |
2614 |
} |