[jbosstools-commits] JBoss Tools SVN: r17599 - trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Sep 15 16:00:40 EDT 2009


Author: dgolovin
Date: 2009-09-15 16:00:39 -0400 (Tue, 15 Sep 2009)
New Revision: 17599

Added:
   trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java
   trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java
Log:
restore bpel.as.integration java classes to fix plugin activation errors

Added: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java	                        (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java	2009-09-15 20:00:39 UTC (rev 17599)
@@ -0,0 +1,50 @@
+package org.jboss.tools.bpel.as.integration;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.jboss.tools.bpel.as.integration";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}


Property changes on: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java	                        (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java	2009-09-15 20:00:39 UTC (rev 17599)
@@ -0,0 +1,37 @@
+package org.jboss.tools.bpel.as.integration;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.publishers.JstPublisher;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
+
+public class JBossServerBPELPublisher extends JstPublisher implements
+		IJBossServerPublisher {
+
+	public JBossServerBPELPublisher() {
+	}
+
+	public boolean accepts(String method, IServer server, IModule[] module) {
+		return "local".equals(method) && accepts(server, module);
+	}
+	
+	public boolean accepts(IServer server, IModule[] module) {
+		IProject project = module[0].getProject();
+		if(project == null) return false;
+		
+		try {
+			IFacetedProject fp = ProjectFacetsManager.create(project);
+			IProjectFacet pf = ProjectFacetsManager.getProjectFacet(IBPELModuleFacetConstants.BPEL20_PROJECT_FACET);
+			return fp.hasProjectFacet(pf);
+		} catch (Exception e) {
+			return false;
+		}
+		
+	}
+}


Property changes on: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain



More information about the jbosstools-commits mailing list