[jbosstools-commits] JBoss Tools SVN: r24104 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Aug 12 10:34:32 EDT 2010


Author: scabanovich
Date: 2010-08-12 10:34:32 -0400 (Thu, 12 Aug 2010)
New Revision: 24104

Modified:
   trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java
Log:
https://jira.jboss.org/browse/JBIDE-6808

Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java	2010-08-12 14:13:17 UTC (rev 24103)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java	2010-08-12 14:34:32 UTC (rev 24104)
@@ -182,23 +182,19 @@
 		IType contextType = context instanceof IType ? (IType)context : context.getDeclaringType();
 		String key = context == null ? typeParameterSignature : contextType.getFullyQualifiedName() + "+" + typeParameterSignature;
 
-		String t = typeParameterSignature;
-		int q = t.indexOf(":");
-		if(q >= 0) {
-			t = t.substring(0, q);
-		}
+		String t = Signature.getTypeVariable(typeParameterSignature);
+		String[] bounds = Signature.getTypeParameterBounds(typeParameterSignature);
+		
 		t = "Q" + t + ";";
 		if(result == null || t.equals(result.getSignature())) {
-			if(q >= 0) {
-				String sts = typeParameterSignature.substring(q + 1);
-				if(sts.length() > 0) {
-					ParametedType st = getParametedType(contextType, sts);
-					if(st != null) {
-						result = new TypeDeclaration(st, 0, 0);
-					}
-				} else if(result != null) {
-					result.setSignature(t);
+			String sts = bounds.length > 0 ? bounds[0] : "";
+			if(sts.length() > 0) {
+				ParametedType st = getParametedType(contextType, sts);
+				if(st != null) {
+					result = new TypeDeclaration(st, 0, 0);
 				}
+			} else if(result != null) {
+				result.setSignature(t);
 			}
 			if(result == null) {
 				result = new ParametedType();



More information about the jbosstools-commits mailing list