diff options
author | Roberto Sanchez | 2014-08-25 15:19:26 +0000 |
---|---|---|
committer | Roberto Sanchez | 2014-08-25 15:19:26 +0000 |
commit | 311bcdb8e9122a4ff827432ac13597f420c8a58f (patch) | |
tree | 4a724a03663603f76d0a18e88a3ce9a86c8a2a48 | |
parent | 6948d3be9e60f8320442bc5f21ade8a9ea3d62e6 (diff) | |
download | webtools.javaee-311bcdb8e9122a4ff827432ac13597f420c8a58f.tar.gz webtools.javaee-311bcdb8e9122a4ff827432ac13597f420c8a58f.tar.xz webtools.javaee-311bcdb8e9122a4ff827432ac13597f420c8a58f.zip |
[436718] Incorrect imports added when creating a web class (servlet, listener, etc) if implementing interfaces with attributes using generics
4 files changed, 13 insertions, 7 deletions
diff --git a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF index d4e874c9a..efb1f087f 100644 --- a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.j2ee; singleton:=true -Bundle-Version: 1.1.800.qualifier +Bundle-Version: 1.1.801.qualifier Bundle-Activator: org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin Bundle-Vendor: %Bundle-Vendor.0 Bundle-Localization: plugin diff --git a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/BinaryMethod.java b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/BinaryMethod.java index 0a3104da5..117f56a52 100644 --- a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/BinaryMethod.java +++ b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/BinaryMethod.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 SAP AG and others. + * Copyright (c) 2007, 2014 SAP AG and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -259,7 +259,7 @@ public class BinaryMethod implements Method { } private void getClassTypeImports(String type, List<String> result) { - result.add(Signature.toString(type)); + result.add(Signature.toString(Signature.getTypeErasure(type))); } private void getTypeVarialbleImports(String type, List<String> result) { diff --git a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/SourceMethod.java b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/SourceMethod.java index d67899ae8..c13067649 100644 --- a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/SourceMethod.java +++ b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/SourceMethod.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 SAP AG and others. + * Copyright (c) 2007, 2014 SAP AG and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -242,8 +242,14 @@ public class SourceMethod implements Method { private void getSimpleTypeImports(Type type, List<String> result) { ITypeBinding binding = type.resolveBinding(); - if (binding != null) - result.add(binding.getQualifiedName()); + if (binding != null){ + if (binding.isParameterizedType() && binding.getBinaryName() != null){ + result.add(binding.getBinaryName()); + } + else{ + result.add(binding.getQualifiedName()); + } + } } private void getQualifiedTypeImports(Type type, List<String> result) { diff --git a/plugins/org.eclipse.jst.j2ee/pom.xml b/plugins/org.eclipse.jst.j2ee/pom.xml index 42a133f80..b4c9f8246 100644 --- a/plugins/org.eclipse.jst.j2ee/pom.xml +++ b/plugins/org.eclipse.jst.j2ee/pom.xml @@ -22,6 +22,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.j2ee</artifactId> - <version>1.1.800-SNAPSHOT</version> + <version>1.1.801-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> |