[436718] Incorrect imports added when creating a web class (servlet, listener, etc) if implementing interfaces with attributes using generics
diff --git a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF
index d4e874c..efb1f08 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 @@
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 0a3104d..117f56a 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 @@
}
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 d67899a..c130676 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 @@
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 42a133f..b4c9f82 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>