Author: rob.stryker(a)jboss.com
Date: 2007-05-02 11:43:35 -0400 (Wed, 02 May 2007)
New Revision: 1989
Modified:
trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/module/Ejb30ArtifactAdapter.java
Log:
artifact adapter didnt account for IProject
Modified:
trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/module/Ejb30ArtifactAdapter.java
===================================================================
---
trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/module/Ejb30ArtifactAdapter.java 2007-05-02
12:27:51 UTC (rev 1988)
+++
trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/module/Ejb30ArtifactAdapter.java 2007-05-02
15:43:35 UTC (rev 1989)
@@ -21,7 +21,9 @@
*/
package org.jboss.ide.eclipse.ejb3.core.module;
+import org.eclipse.core.resources.IProject;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IModuleArtifact;
import org.eclipse.wst.server.core.internal.ModuleFactory;
@@ -47,8 +49,14 @@
}
public IModuleArtifact getModuleArtifact(Object obj) {
+ IJavaProject jp = null;
if( obj instanceof IJavaProject ) {
- IJavaProject jp = (IJavaProject)obj;
+ jp = (IJavaProject)obj;
+ } else if( obj instanceof IProject ) {
+ jp = JavaCore.create((IProject)obj);
+ }
+
+ if( jp != null ) {
ModuleFactory mf = getModuleFactory();
IModule mod = mf.getModule(jp.getElementName());
if( mod != null ) {
Show replies by date