Author: scabanovich
Date: 2011-03-03 17:22:27 -0500 (Thu, 03 Mar 2011)
New Revision: 29484
Modified:
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeanWizardPage.java
Log:
JBIDE-8515
https://issues.jboss.org/browse/JBIDE-8515
Modified:
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeanWizardPage.java
===================================================================
---
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeanWizardPage.java 2011-03-03
22:14:09 UTC (rev 29483)
+++
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeanWizardPage.java 2011-03-03
22:22:27 UTC (rev 29484)
@@ -58,7 +58,6 @@
import org.jboss.tools.cdi.core.ICDIAnnotation;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IQualifier;
-import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.ui.CDIUIMessages;
import org.jboss.tools.cdi.ui.CDIUiImages;
import org.jboss.tools.common.ui.widget.editor.CheckBoxFieldEditor;
@@ -96,7 +95,7 @@
public void init(IStructuredSelection selection) {
super.init(selection);
- if (!selection.isEmpty()) {
+ if (selection != null && !selection.isEmpty()) {
Object o = selection.iterator().next();
IType type = null;
if (o instanceof IType) {
@@ -118,8 +117,8 @@
} catch (JavaModelException e) {
CDICorePlugin.getDefault().logError(e);
}
+ ArrayList<String> interfacesNames = new ArrayList<String>();
if (isInterface) {
- ArrayList<String> interfacesNames = new ArrayList<String>();
String name = "";
try {
name = type.getFullyQualifiedParameterizedName();
@@ -127,12 +126,12 @@
name = type.getFullyQualifiedName();
}
interfacesNames.add(name);
- setSuperInterfaces(interfacesNames, true);
- superInterfacesChanged();
setDefaultTypeName(name);
}
+ interfacesNames.add("java.io.Serializable");
+ setSuperInterfaces(interfacesNames, true);
+ superInterfacesChanged();
}
- setModifiers(getModifiers() | Flags.AccAbstract, true);
doStatusUpdate();
}