View | Details | Raw Unified | Return to bug 222458 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java (+58 lines)
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
}
(-)model/org/eclipse/jdt/internal/core/ResolvedSourceType.java (-1 / +1 lines)
Lines 29-35 Link Here
29
	}
29
	}
30
	
30
	
31
	public String getFullyQualifiedParameterizedName() throws JavaModelException {
31
	public String getFullyQualifiedParameterizedName() throws JavaModelException {
32
		return getFullyQualifiedParameterizedName(getFullyQualifiedName(), this.uniqueKey);
32
		return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.uniqueKey);
33
	}
33
	}
34
	
34
	
35
	/* (non-Javadoc)
35
	/* (non-Javadoc)
(-)model/org/eclipse/jdt/internal/core/ResolvedBinaryType.java (-1 / +1 lines)
Lines 29-35 Link Here
29
	}
29
	}
30
30
31
	public String getFullyQualifiedParameterizedName() throws JavaModelException {
31
	public String getFullyQualifiedParameterizedName() throws JavaModelException {
32
		return getFullyQualifiedParameterizedName(getFullyQualifiedName(), this.uniqueKey);
32
		return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.uniqueKey);
33
	}
33
	}
34
	
34
	
35
	/* (non-Javadoc)
35
	/* (non-Javadoc)
(-)codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java (-1 / +1 lines)
Lines 42-48 Link Here
42
	
42
	
43
	public String getFullyQualifiedParameterizedName() throws JavaModelException {
43
	public String getFullyQualifiedParameterizedName() throws JavaModelException {
44
		if (this.isResolved()) {
44
		if (this.isResolved()) {
45
			return getFullyQualifiedParameterizedName(getFullyQualifiedName(), this.getKey());
45
			return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.getKey());
46
		}
46
		}
47
		return getFullyQualifiedName('.', true/*show parameters*/);
47
		return getFullyQualifiedName('.', true/*show parameters*/);
48
	}
48
	}
(-)model/org/eclipse/jdt/core/IType.java (-1 / +2 lines)
Lines 433-439 Link Here
433
	String getFullyQualifiedName(char enclosingTypeSeparator);
433
	String getFullyQualifiedName(char enclosingTypeSeparator);
434
	
434
	
435
	/**
435
	/**
436
	 * Returns this type's fully qualified name followed by its type parameters between angle brakets if it is a generic type.
436
	 * Returns this type's fully qualified name using a '.' enclosing type separator 
437
	 * followed by its type parameters between angle brakets if it is a generic type.
437
	 * For example, "p.X&lt;T&gt;", "java.util.Map&lt;java.lang.String, p.X&gt;"
438
	 * For example, "p.X&lt;T&gt;", "java.util.Map&lt;java.lang.String, p.X&gt;"
438
	 * 
439
	 * 
439
	 * @exception JavaModelException if this element does not exist or if an
440
	 * @exception JavaModelException if this element does not exist or if an

Return to bug 222458