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 92447 Details for
Bug 222458
IType#getFullyQualifiedParameterizedName() is underspecified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix and regression tests
222458.txt (text/plain), 6.19 KB, created by
Jerome Lanneluc
on 2008-03-13 11:04:09 EDT
(
hide
)
Description:
Proposed fix and regression tests
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2008-03-13 11:04:09 EDT
Size:
6.19 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java,v >retrieving revision 1.57 >diff -u -r1.57 ResolveTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 15 Nov 2007 09:46:53 -0000 1.57 >+++ src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 13 Mar 2008 15:03:11 -0000 >@@ -11,9 +11,13 @@ > package org.eclipse.jdt.core.tests.model; > > import java.io.IOException; >+import java.util.HashMap; > >+import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; > import org.eclipse.jdt.core.*; >+import org.eclipse.jdt.core.tests.util.Util; > > import junit.framework.*; > >@@ -2553,4 +2557,58 @@ > elements > ); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=222458 >+public void test0113() throws JavaModelException { >+ ICompilationUnit definition = null; >+ try { >+ definition = getWorkingCopy( >+ "/Resolve/src2/test0113/Test.java", >+ "package test0113;\n" + >+ "public class Test {\n" + >+ " class Member<T> {\n" + >+ " }\n" + >+ "}", >+ this.wcOwner >+ ); >+ IJavaElement[] elements = select( >+ "/Resolve/src2/test0113/Test2.java", >+ "package test0113;\n" + >+ "public class Test2 {\n" + >+ " Test.Member<String> field;\n" + >+ "}", >+ "Member"); >+ assertEquals("test0113.Test.Member<java.lang.String>", ((IType)elements[0]).getFullyQualifiedParameterizedName()); >+ } finally { >+ if (definition != null) >+ definition.discardWorkingCopy(); >+ } >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=222458 >+public void test0114() throws Exception { >+ IResource rootResource = getPackageFragmentRoot("Resolve", "/Resolve/class-folder").getResource(); >+ IPath rootLocation = rootResource.getLocation(); >+ try { >+ Util.createClassFolder(new String[] { >+ "test0114/Test.java", >+ "package test0114;\n" + >+ "public class Test {\n" + >+ " class Member<T> {\n" + >+ " }\n" + >+ "}" >+ }, >+ rootLocation.toOSString(), >+ "1.5"); >+ rootResource.refreshLocal(IResource.DEPTH_INFINITE, null); >+ IJavaElement[] elements = select( >+ "/Resolve/src2/test0114/Test2.java", >+ "package test0114;\n" + >+ "public class Test2 {\n" + >+ " Test.Member<String> field;\n" + >+ "}", >+ "Member"); >+ assertEquals("test0114.Test.Member<java.lang.String>", ((IType)elements[0]).getFullyQualifiedParameterizedName()); >+ } finally { >+ deleteFile(rootLocation.append("test0114").toFile()); >+ } >+} > } >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/ResolvedSourceType.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ResolvedSourceType.java,v >retrieving revision 1.8 >diff -u -r1.8 ResolvedSourceType.java >--- model/org/eclipse/jdt/internal/core/ResolvedSourceType.java 6 Mar 2008 15:31:29 -0000 1.8 >+++ model/org/eclipse/jdt/internal/core/ResolvedSourceType.java 13 Mar 2008 15:03:12 -0000 >@@ -29,7 +29,7 @@ > } > > public String getFullyQualifiedParameterizedName() throws JavaModelException { >- return getFullyQualifiedParameterizedName(getFullyQualifiedName(), this.uniqueKey); >+ return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.uniqueKey); > } > > /* (non-Javadoc) >Index: model/org/eclipse/jdt/internal/core/ResolvedBinaryType.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ResolvedBinaryType.java,v >retrieving revision 1.5 >diff -u -r1.5 ResolvedBinaryType.java >--- model/org/eclipse/jdt/internal/core/ResolvedBinaryType.java 10 May 2006 18:03:47 -0000 1.5 >+++ model/org/eclipse/jdt/internal/core/ResolvedBinaryType.java 13 Mar 2008 15:03:12 -0000 >@@ -29,7 +29,7 @@ > } > > public String getFullyQualifiedParameterizedName() throws JavaModelException { >- return getFullyQualifiedParameterizedName(getFullyQualifiedName(), this.uniqueKey); >+ return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.uniqueKey); > } > > /* (non-Javadoc) >Index: codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java,v >retrieving revision 1.1 >diff -u -r1.1 AssistSourceType.java >--- codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java 6 Mar 2008 15:31:31 -0000 1.1 >+++ codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java 13 Mar 2008 15:03:12 -0000 >@@ -42,7 +42,7 @@ > > public String getFullyQualifiedParameterizedName() throws JavaModelException { > if (this.isResolved()) { >- return getFullyQualifiedParameterizedName(getFullyQualifiedName(), this.getKey()); >+ return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.getKey()); > } > return getFullyQualifiedName('.', true/*show parameters*/); > } >Index: model/org/eclipse/jdt/core/IType.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java,v >retrieving revision 1.60 >diff -u -r1.60 IType.java >--- model/org/eclipse/jdt/core/IType.java 13 Mar 2008 10:55:19 -0000 1.60 >+++ model/org/eclipse/jdt/core/IType.java 13 Mar 2008 15:03:12 -0000 >@@ -433,7 +433,8 @@ > String getFullyQualifiedName(char enclosingTypeSeparator); > > /** >- * Returns this type's fully qualified name followed by its type parameters between angle brakets if it is a generic type. >+ * Returns this type's fully qualified name using a '.' enclosing type separator >+ * followed by its type parameters between angle brackets if it is a generic type. > * For example, "p.X<T>", "java.util.Map<java.lang.String, p.X>" > * > * @exception JavaModelException if this element does not exist or if an
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 222458
:
92445
| 92447