Author: dennyxu
Date: 2008-12-04 00:59:25 -0500 (Thu, 04 Dec 2008)
New Revision: 12270
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
Log:
JBIDE-3333: to make esb project wizard work with WTP3.03 and early versions
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2008-12-04
02:34:35 UTC (rev 12269)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2008-12-04
05:59:25 UTC (rev 12270)
@@ -1,6 +1,8 @@
package org.jboss.tools.esb.core.facet;
import java.io.ByteArrayInputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
@@ -43,7 +45,15 @@
WtpUtils.addNatures(project);
// Setup the flexible project structure.
- final IVirtualComponent c = ComponentCore.createComponent(project, false);
+ IVirtualComponent c = null;
+ try {
+ Method createMethod = ComponentCore.class.getMethod("createComponent",
IProject.class, boolean.class);
+ c = (IVirtualComponent)createMethod.invoke(null, project, false);
+ } catch (Exception e) {
+ c = ComponentCore.createComponent(project);
+ }
+
+
c.create(0, null);
//String esbContent =
model.getStringProperty(IJBossESBFacetDataModelProperties.ESB_CONTENT_FOLDER);
c.setMetaProperty("java-output-path", "/build/classes/");
Show replies by date