geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r952535 [16/26] - in /geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins: org.apache.geronimo.j2ee.v11.jaxbmodel/ org.apache.geronimo.j2ee.v11.jaxbmodel/META-INF/ org.apache.geronimo.j2ee.v11.jaxbmodel/src/main/java/org/apache/geronimo...
Date Tue, 08 Jun 2010 04:40:28 GMT
Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/DeploymentPlanCreationOperation.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/DeploymentPlanCreationOperation.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/DeploymentPlanCreationOperation.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core.operations;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.operations.AbstractGeronimoJ2EEComponentOperation;
+import org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp;
+import org.apache.geronimo.st.v11.core.Activator;
+import org.apache.geronimo.st.v11.core.GeronimoUtils;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+
+/**
+ * @version $Rev: 817996 $ $Date: 2009-09-23 16:04:12 +0800 (Wed, 23 Sep 2009) $
+ */
+public abstract class DeploymentPlanCreationOperation extends
+		AbstractGeronimoJ2EEComponentOperation implements
+		IDeploymentPlanCreationOp {
+	
+	protected Object config;
+
+	public DeploymentPlanCreationOperation(IDataModel model, Object config) {
+		super(model);
+		this.config = config;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor,
+	 *      org.eclipse.core.runtime.IAdaptable)
+	 */
+	public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+			throws ExecutionException {
+		try {
+			execute();
+		}catch (Exception e){
+			return new Status(IStatus.ERROR,Activator.PLUGIN_ID,"Error in creating deployment plan",e);
+		}
+		return Status.OK_STATUS;
+	}
+
+	public void execute() throws Exception {
+		IVirtualComponent comp = ComponentCore.createComponent(getProject());
+
+		String type = J2EEProjectUtilities.getJ2EEProjectType(getProject());
+
+		if (IModuleConstants.JST_WEB_MODULE.equals(type)) {
+			createGeronimoWebDeploymentPlan(GeronimoUtils.getWebDeploymentPlanFile(comp));			
+		} else if (IModuleConstants.JST_EJB_MODULE.equals(type)) {
+			createOpenEjbDeploymentPlan(GeronimoUtils.getOpenEjbDeploymentPlanFile(comp));
+		} else if (IModuleConstants.JST_EAR_MODULE.equals(type)) {
+			createGeronimoApplicationDeploymentPlan(GeronimoUtils.getApplicationDeploymentPlanFile(comp));
+		} else if (IModuleConstants.JST_APPCLIENT_MODULE.equals(type)) {
+			createGeronimoApplicationClientDeploymentPlan(GeronimoUtils.getApplicationClientDeploymentPlanFile(comp));
+		} else if (IModuleConstants.JST_CONNECTOR_MODULE.equals(type)) {
+			createConnectorDeploymentPlan(GeronimoUtils.getConnectorDeploymentPlanFile(comp));
+		} else if (IModuleConstants.JST_UTILITY_MODULE.equals(type)) {
+			createServiceDeploymentPlan(GeronimoUtils.getServiceDeploymentPlanFile(comp));
+		}
+	}
+
+	
+	public JAXBElement createOpenEjbDeploymentPlan(IFile file) throws Exception {
+		return null;
+	}
+
+	public JAXBElement createGeronimoWebDeploymentPlan(IFile file) throws Exception {
+		return null;
+	}
+
+	public JAXBElement createGeronimoApplicationDeploymentPlan(IFile file) throws Exception {
+		return null;
+	}
+
+	public JAXBElement createGeronimoApplicationClientDeploymentPlan(IFile file) throws Exception{
+		return null;
+	}
+
+	public JAXBElement createConnectorDeploymentPlan(IFile file) throws Exception{
+		return null;
+	}
+	
+
+	public JAXBElement createServiceDeploymentPlan(IFile file) throws Exception{
+		return null;
+	}
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/ImportDeploymentPlanDataModelProvider.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/ImportDeploymentPlanDataModelProvider.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/ImportDeploymentPlanDataModelProvider.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/ImportDeploymentPlanDataModelProvider.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core.operations;
+
+import java.util.Set;
+
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $
+ */
+public class ImportDeploymentPlanDataModelProvider extends AbstractDataModelProvider {
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider#getPropertyNames()
+	 */
+	public Set getPropertyNames() {
+		Set names = super.getPropertyNames();
+		names.add(IFacetDataModelProperties.FACET_PROJECT_NAME);
+		names.add(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
+		return names;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider#getDefaultOperation()
+	 */
+	public IDataModelOperation getDefaultOperation() {
+		return new ImportDeploymentPlanOperation(model);
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/ImportDeploymentPlanOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/ImportDeploymentPlanOperation.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/ImportDeploymentPlanOperation.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/ImportDeploymentPlanOperation.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core.operations;
+
+import org.apache.geronimo.st.v11.core.GeronimoUtils;
+import org.apache.geronimo.st.v11.core.internal.Trace;
+import org.apache.geronimo.st.core.jaxb.ConversionHelper;
+import org.apache.geronimo.st.core.operations.AbstractGeronimoJ2EEComponentOperation;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+/**
+ * @version $Rev: 650735 $ $Date: 2008-04-23 11:35:03 +0800 (Wed, 23 Apr 2008) $
+ */
+public class ImportDeploymentPlanOperation extends AbstractGeronimoJ2EEComponentOperation {
+
+    /**
+     * 
+     */
+    public ImportDeploymentPlanOperation() {
+        super();
+        Trace.tracePoint("Constructor", "ImportDeploymentPlanOperation");
+    }
+
+    /**
+     * @param model
+     */
+    public ImportDeploymentPlanOperation(IDataModel model) {
+        super(model);
+        Trace.tracePoint("Constructor", "ImportDeploymentPlanOperation", model);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor,
+     *      org.eclipse.core.runtime.IAdaptable)
+     */
+    public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+        Trace.tracePoint("Entry", "ImportDeploymentPlanOperation.execute", monitor, info);
+
+        if (!isGeronimoRuntimeTarget())
+            return Status.OK_STATUS;
+
+        IVirtualComponent comp = ComponentCore.createComponent(getProject());
+        String type = J2EEProjectUtilities.getJ2EEProjectType(getProject());
+
+        IFile planFile = null;
+
+        try {
+            if (type.equals(IModuleConstants.JST_WEB_MODULE)) {
+                planFile = GeronimoUtils.getWebDeploymentPlanFile(comp);
+                ConversionHelper.convertGeronimoWebFile(planFile);    
+            }
+            else if (type.equals(IModuleConstants.JST_EJB_MODULE)) {
+                planFile = GeronimoUtils.getOpenEjbDeploymentPlanFile(comp);
+                ConversionHelper.convertOpenEjbJarFile(planFile);
+            }
+            else if (type.equals(IModuleConstants.JST_EAR_MODULE)) {
+                planFile = GeronimoUtils.getApplicationDeploymentPlanFile(comp);
+                ConversionHelper.convertGeronimoApplicationFile(planFile);
+            }
+            else if (type.equals(IModuleConstants.JST_CONNECTOR_MODULE)) {
+                planFile = GeronimoUtils.getConnectorDeploymentPlanFile(comp);
+                ConversionHelper.convertGeronimoRaFile(planFile);
+            }
+            else if (type.equals(IModuleConstants.JST_APPCLIENT_MODULE)) {
+                planFile = GeronimoUtils.getApplicationClientDeploymentPlanFile(comp);
+                ConversionHelper.convertGeronimoApplicationClientFile(planFile);
+            }
+        }
+        catch (Exception e) {
+            throw new ExecutionException("ImportDeploymentPlanOperation.execute(): Error converting plan: " + planFile.getFullPath() );
+        }
+
+        Trace.tracePoint("Exit ", "ImportDeploymentPlanOperation.execute", Status.OK_STATUS);
+        return Status.OK_STATUS;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/SharedLibEntryCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/SharedLibEntryCreationOperation.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/SharedLibEntryCreationOperation.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/SharedLibEntryCreationOperation.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,440 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core.operations;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.enterprise.deploy.spi.status.DeploymentStatus;
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+
+import org.apache.geronimo.st.v11.core.Activator;
+import org.apache.geronimo.st.v11.core.GeronimoServerBehaviourDelegate;
+import org.apache.geronimo.st.v11.core.GeronimoUtils;
+import org.apache.geronimo.st.v11.core.commands.DeploymentCommandFactory;
+import org.apache.geronimo.st.core.internal.Trace;
+import org.apache.geronimo.st.core.operations.ISharedLibEntryCreationDataModelProperties;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.internal.ProgressUtil;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+
+/**
+ * @version $Rev: 817996 $ $Date: 2009-09-23 16:04:12 +0800 (Wed, 23 Sep 2009) $
+ */
+public class SharedLibEntryCreationOperation extends AbstractDataModelOperation implements ISharedLibEntryCreationDataModelProperties {
+	
+	private TargetModuleID sharedLibTarget;
+	private IServer server;
+	private IProgressMonitor monitor;
+	private IPath sharedLibLocation;
+	private static final IPath TEMP_LOCATION = Activator.getDefault().getStateLocation().append("shared-lib-temp");
+
+	public SharedLibEntryCreationOperation() {
+	}
+
+	/**
+	 * @param model
+	 */
+	public SharedLibEntryCreationOperation(IDataModel model) {
+		super(model);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor,
+	 *      org.eclipse.core.runtime.IAdaptable)
+	 */
+	public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+		Trace.trace(Trace.INFO, ">> SharedLibEntryCreationOperation.execute()");
+		
+		this.monitor = ProgressUtil.getMonitorFor(monitor);
+		this.monitor.beginTask("Processing in-place shared libraries.", 100);
+		
+		IModule[] modules = (IModule[]) model.getProperty(MODULES);
+		this.server = (IServer) model.getProperty(SERVER);
+		
+		HashMap<File, File> addList = new HashMap<File, File>();
+		List<File> deleteList = new ArrayList<File>();
+		
+		try {
+			String sharedLibPath = getSharedLibPath();
+			if(sharedLibPath == null) 
+				return Status.CANCEL_STATUS;
+			
+			sharedLibLocation = server.getRuntime().getLocation().append(sharedLibPath);
+			
+			for(int i = 0; i < modules.length; i++) {
+				IModule module = modules[i];
+				IProject project = module.getProject();
+				
+				File dummyJarFile = sharedLibLocation.append(project.getName() + ".eclipse.jar").toFile();
+				// delete the dummy jar if module no longer associated with server
+				if (!ServerUtil.containsModule(server, module, monitor) && dummyJarFile.exists()) {
+					deleteList.add(dummyJarFile);
+				} else {
+					HashSet entries = new HashSet();
+					J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
+					if(GeronimoUtils.isEarModule(module)) {
+						IModule[] childModules = j2eeModule.getChildModules();
+						for(int j = 0; j < modules.length; j++) {
+							entries.addAll(processModule(childModules[i]));
+						}
+					} else {
+						entries.addAll(processModule(module));
+					}
+
+					// regen the jar only if required
+					if (regenerate(dummyJarFile, entries)) {
+						TEMP_LOCATION.toFile().mkdirs();
+						File temp = TEMP_LOCATION.append(project.getName() + ".eclipse.jar").toFile();
+						Trace.trace(Trace.INFO, "Updating external sharedlib entries for " + module.getName());
+						if(temp.exists())
+							delete(temp);
+						Manifest manifest = new Manifest();
+						Attributes attributes = manifest.getMainAttributes();
+						attributes.put(Attributes.Name.MANIFEST_VERSION, "1.0");
+						attributes.put(Attributes.Name.CLASS_PATH, getCPEntriesAsString(entries));
+						JarOutputStream os = new JarOutputStream(new FileOutputStream(temp), manifest);
+						os.flush();
+						os.close();
+						addList.put(temp, dummyJarFile);
+					}
+				}
+			}
+			
+			updateAndRecycleSharedLib(addList, deleteList);
+			
+		}catch (CoreException e){
+			IStatus status = e.getStatus();
+			Trace.trace(Trace.SEVERE, status.getMessage(), e);
+			throw new ExecutionException(status.getMessage(), e);
+		}catch (Exception e) {
+			Trace.trace(Trace.SEVERE, "Failure in updating shared library.", e);
+			throw new ExecutionException("Failure in updating shared library", e);
+		} finally {
+			monitor.done();
+		}
+		
+		Trace.trace(Trace.INFO, "<< SharedLibEntryCreationOperation.execute()");
+		return Status.OK_STATUS;
+	}
+	
+	private void updateAndRecycleSharedLib(HashMap addList, List deleteList) throws Exception {
+		if(addList.size() > 0 || deleteList.size() > 0) {
+			stopSharedLib();
+			for(int i = 0; i < deleteList.size(); i++) {
+				File file = (File) deleteList.get(i);
+				delete(file);
+			}
+			Iterator i = addList.keySet().iterator();
+			while(i.hasNext()) {
+				File src = (File) i.next();
+				File dest = (File) addList.get(src);
+				if(dest.exists()) {
+					delete(dest);
+				}
+				copy(src, dest);
+			}
+			startSharedLib();
+		}
+	}
+	
+	private void copy(File src, File dest) throws Exception {
+		try {
+			InputStream in = new FileInputStream(src);
+			OutputStream out = new FileOutputStream(dest);
+			byte[] buf = new byte[1024];
+			int len;
+			while ((len = in.read(buf)) > 0) {
+				out.write(buf, 0, len);
+			}
+			in.close();
+			out.close();
+		} catch (Exception e) {
+			throw e;
+		}
+		Trace.trace(Trace.INFO, "Created " + dest.getAbsolutePath());
+	}
+
+	private String getSharedLibPath() throws Exception {
+		// locate the path of the first sharedlib library folder
+		GeronimoServerBehaviourDelegate gsDelegate = (GeronimoServerBehaviourDelegate) server.getAdapter(GeronimoServerBehaviourDelegate.class);
+		MBeanServerConnection connection = gsDelegate.getServerConnection();
+		Set result = connection.queryMBeans(new ObjectName("*:j2eeType=GBean,name=SharedLib,*"), null);
+		if (!result.isEmpty()) {
+			ObjectInstance instance = (ObjectInstance) result.toArray()[0];
+			String[] libDirs = (String[]) connection.getAttribute(instance.getObjectName(),"libDirs");
+			if (libDirs != null && libDirs.length > 0) {
+				return libDirs[0];
+			}
+		}
+		return null;
+	}
+	
+	private HashSet processModule(IModule module) throws Exception {
+		Trace.trace(Trace.INFO, "SharedLibEntryCreationOperation.process() " + module.getName());
+
+		IProject project = module.getProject();
+		// filter the cp entries needed to be added to the dummy shared lib
+		// jar
+		HashSet entries = new HashSet();
+		processJavaProject(project, entries, false);
+
+		// add output locations of referenced projects excluding non-child
+		// projects
+		ModuleDelegate delegate = (ModuleDelegate) module.loadAdapter(ModuleDelegate.class, null);
+		if(delegate != null) {
+			IProject[] refs = project.getReferencedProjects();
+			for(int i = 0; i < refs.length; i++) {
+				boolean found = false;
+				IModule[] children = delegate.getChildModules();
+				for(int j = 0; j < children.length; j++) {
+					if(children[j].getProject().equals(refs[i])) {
+						found = true;
+						break;
+					}
+				}
+				if(!found) {
+					processJavaProject(refs[i], entries, true);
+				}
+			}
+		}
+		return entries;
+	}
+
+	private void delete(File dummyJarFile) throws CoreException {
+		if(dummyJarFile.delete()) {
+			Trace.trace(Trace.INFO, dummyJarFile.getAbsolutePath() + " deleted sucessfully.");
+		} else {
+			Trace.trace(Trace.SEVERE, "Failed to delete " + dummyJarFile.getAbsolutePath(), null);
+			throw new CoreException(new Status(IStatus.ERROR,Activator.PLUGIN_ID,"Failed to delete " + dummyJarFile.getAbsolutePath(),null));
+		}
+	}
+
+	private void processJavaProject(IProject project, HashSet entries, boolean includeOutputLocations) throws JavaModelException {
+		IJavaProject jp = JavaCore.create(project);
+		IClasspathEntry[] cp = jp.getRawClasspath();
+		for (int i = 0; i < cp.length; i++) {
+			IClasspathEntry entry = cp[i];
+			int kind = entry.getEntryKind();
+			String path = null;
+			if(kind == IClasspathEntry.CPE_CONTAINER) {
+				if("org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER".equals(entry.getPath().toString())) {
+					IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), jp);
+					IClasspathEntry[] containerEntries = container.getClasspathEntries();
+					for(int j = 0; j  < containerEntries.length; j++) {
+						addEntry(entries, resolveVarOrLibEntry(containerEntries[j]));
+					}
+				}
+			} else if (kind == IClasspathEntry.CPE_PROJECT) {
+				IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(entry.getPath().segment(0));
+				IJavaProject ref = JavaCore.create(p);
+				path = p.getLocation().removeLastSegments(1).append(ref.getOutputLocation()).addTrailingSeparator().toOSString();
+			} else if (kind == IClasspathEntry.CPE_SOURCE) {
+				// this if not combined with parent statement to filter out
+				// CPE_SOURCE entries from following else statement
+				// if no outputlocation, output path will get picked up by
+				// default output path
+				if(includeOutputLocations && entry.getOutputLocation() != null) {
+                    path = project.getLocation().append(entry.getOutputLocation().removeFirstSegments(1)).addTrailingSeparator().toOSString();
+				}
+			} else {
+				path = resolveVarOrLibEntry(entry);
+			}
+			addEntry(entries, path);
+		}
+		
+		if(includeOutputLocations) {
+            String path = project.getLocation().append(jp.getOutputLocation().removeFirstSegments(1)).addTrailingSeparator().toOSString();
+			addEntry(entries, path);
+		}
+	}
+
+	private String resolveVarOrLibEntry(IClasspathEntry entry) {
+		IClasspathEntry resolved = JavaCore.getResolvedClasspathEntry(entry);
+		IPath resolvedPath = resolved.getPath().makeAbsolute();
+		IProject candiate = ResourcesPlugin.getWorkspace().getRoot().getProject(resolvedPath.segment(0));
+		// check if resolvedPath is a project resource
+		if(candiate.exists(resolvedPath.removeFirstSegments(1))) {
+			return candiate.getLocation().append(resolvedPath.removeFirstSegments(1)).toOSString();
+		} else {
+			return resolvedPath.toOSString();
+		}
+	}
+
+	private void addEntry(HashSet entries, String path) {
+		if(path != null) {
+			File f = new File(path);
+			try {
+				String url = f.toURL().toExternalForm();
+				if (!entries.contains(url)) {
+					Trace.trace(Trace.INFO, "Adding " + url);
+					monitor.subTask("Linking " + url + " to shared lib.");
+					entries.add(url);
+				}
+			} catch (MalformedURLException e1) {
+				Trace.trace(Trace.INFO, "Failed to add " + path);
+				e1.printStackTrace();
+			}
+		}
+	}
+
+	/**
+	 * @param entries
+	 * @return
+	 */
+	private String getCPEntriesAsString(Set entries) {
+		StringBuffer buffer = new StringBuffer();
+		Iterator i = entries.iterator();
+		while (i.hasNext()) {
+			String cpEntry = (String) i.next();
+			buffer.append(cpEntry);
+			if (i.hasNext()) {
+				buffer.append(" ");
+			}
+		}
+		return buffer.toString();
+	}
+
+	/**
+	 * @param jarPath
+	 * @param entries
+	 * @return
+	 * @throws Exception
+	 */
+	private boolean regenerate(File jarFile, Set entries) throws Exception {
+		if (jarFile.exists()) {
+			if (entries.isEmpty()) {
+				// go ahead and return if zero entires, dummy jar will be
+				// deleted
+				return true;
+			} else {
+				JarFile jar = new JarFile(jarFile);
+				Manifest manifest = jar.getManifest();
+				Attributes attributes = manifest.getMainAttributes();
+				String value = attributes.getValue(Attributes.Name.CLASS_PATH);
+				jar.close();
+
+				Set currentEntries = new HashSet();
+				if (value != null) {
+					StringTokenizer tokenizer = new StringTokenizer(value);
+					while (tokenizer.hasMoreTokens()) {
+						currentEntries.add(tokenizer.nextToken());
+					}
+				}
+				// regen dummy jar if old and new entries don't match
+				return !entries.equals(currentEntries);
+			}
+		}
+
+		return !entries.isEmpty();
+	}
+	
+	private void stopSharedLib() throws Exception {
+		DeploymentManager dm = DeploymentCommandFactory.getDeploymentManager(server);
+		TargetModuleID id = getSharedLibTargetModuleID();
+		TargetModuleID[] ids = new TargetModuleID[]{id};
+		ProgressObject po = dm.stop(ids);
+		waitForProgress(po);
+		if(po.getDeploymentStatus().isFailed()) {
+			throw new Exception(po.getDeploymentStatus().getMessage());
+		} 
+	}
+	
+	private void startSharedLib() throws Exception {
+		DeploymentManager dm = DeploymentCommandFactory.getDeploymentManager(server);
+		TargetModuleID id = getSharedLibTargetModuleID();
+		ProgressObject po = dm.start(new TargetModuleID[]{id});
+		waitForProgress(po);
+		if(po.getDeploymentStatus().isFailed()) {
+			throw new Exception(po.getDeploymentStatus().getMessage());
+		} 
+	}
+	
+	private TargetModuleID getSharedLibTargetModuleID() throws Exception {
+		if(sharedLibTarget == null) {
+			DeploymentManager dm = DeploymentCommandFactory.getDeploymentManager(server);
+			TargetModuleID[] ids = dm.getAvailableModules(null, dm.getTargets());
+			for(int i = 0; i < ids.length; i++) {
+				if(ids[i].getModuleID().indexOf("sharedlib") > 0) {
+					sharedLibTarget = ids[i];
+					break;
+				}
+			}	
+		}
+		
+		if(sharedLibTarget == null) {
+			throw new Exception("Could not determine SharedLib TargetModuleID.");
+		}
+		
+		return sharedLibTarget;
+	}
+
+	private void waitForProgress(ProgressObject po) {
+		while (po.getDeploymentStatus().isRunning()) {
+			try {
+				Thread.sleep(100);
+			} catch (InterruptedException e) {
+				e.printStackTrace();
+			}
+		}
+		DeploymentStatus status = po.getDeploymentStatus();
+		String command = status.getCommand().toString();
+		String state = status.getState().toString();
+		Trace.trace(Trace.INFO, "SharedLib " + " " + command + " " + state);
+	}
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/SharedLibEntryDataModelProvider.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/SharedLibEntryDataModelProvider.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/SharedLibEntryDataModelProvider.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/SharedLibEntryDataModelProvider.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core.operations;
+
+import java.util.Set;
+
+import org.apache.geronimo.st.core.operations.ISharedLibEntryCreationDataModelProperties;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $
+ */
+public class SharedLibEntryDataModelProvider extends AbstractDataModelProvider implements ISharedLibEntryCreationDataModelProperties {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider#getPropertyNames()
+	 */
+	public Set getPropertyNames() {
+		Set names = super.getPropertyNames();
+		names.add(MODULES);
+		names.add(SERVER);
+		return names;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider#getDefaultOperation()
+	 */
+	public IDataModelOperation getDefaultOperation() {
+		return new SharedLibEntryCreationOperation(model);
+	}
+}

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java Tue Jun  8 04:40:16 2010
@@ -18,23 +18,23 @@ package org.apache.geronimo.st.v11.core.
 
 import javax.xml.bind.JAXBElement;
 
-import org.apache.geronimo.st.core.operations.DeploymentPlanCreationOperation;
-import org.apache.geronimo.st.v21.core.DeploymentPlanInstallConfig;
+import org.apache.geronimo.st.v11.core.operations.DeploymentPlanCreationOperation;
+import org.apache.geronimo.st.core.DeploymentPlanInstallConfig;
 import org.apache.geronimo.st.v11.core.internal.Trace;
 import org.apache.geronimo.st.core.jaxb.JAXBUtils;
-import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
-import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
-import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
-import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
-import org.apache.geronimo.xml.ns.deployment_1.ServiceType;
-import org.apache.geronimo.xml.ns.j2ee.application_1.ApplicationType;
-import org.apache.geronimo.xml.ns.j2ee.application_1.ObjectFactory;
-import org.apache.geronimo.xml.ns.j2ee.application_client_1.ApplicationClientType;
-import org.apache.geronimo.xml.ns.j2ee.connector_1.ResourceadapterType;
-import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
+import org.apache.geronimo.j2ee.deployment.ArtifactType;
+import org.apache.geronimo.j2ee.deployment.DependenciesType;
+import org.apache.geronimo.j2ee.deployment.DependencyType;
+import org.apache.geronimo.j2ee.deployment.EnvironmentType;
+import org.apache.geronimo.j2ee.deployment.ServiceType;
+import org.apache.geronimo.j2ee.application.ApplicationType;
+import org.apache.geronimo.j2ee.application.ObjectFactory;
+import org.apache.geronimo.j2ee.applicationclient.ApplicationClientType;
+import org.apache.geronimo.j2ee.connector.ResourceadapterType;
+import org.apache.geronimo.j2ee.web.WebAppType;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.openejb.xml.ns.openejb_jar_2.OpenejbJarType;
+import org.apache.geronimo.j2ee.openejb_jar.OpenejbJarType;
 
 /**
  * @version $Rev: 509704 $ $Date: 2007-02-20 13:42:24 -0500 (Tue, 20 Feb 2007) $
@@ -80,7 +80,7 @@ public class V11DeploymentPlanCreationOp
   		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan",
 				dpFile, dpFile.getFullPath());
 
-  		org.apache.geronimo.xml.ns.j2ee.web_1.ObjectFactory webFactory = new org.apache.geronimo.xml.ns.j2ee.web_1.ObjectFactory();
+  		org.apache.geronimo.j2ee.web.ObjectFactory webFactory = new org.apache.geronimo.j2ee.web.ObjectFactory();
 		WebAppType web = webFactory.createWebAppType();
 
 		web.setContextRoot("/" + getProject().getName());
@@ -102,7 +102,7 @@ public class V11DeploymentPlanCreationOp
 	public JAXBElement createOpenEjbDeploymentPlan(IFile dpFile) throws Exception {
   		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile);
 
-  		org.openejb.xml.ns.openejb_jar_2.ObjectFactory ejbFactory = new org.openejb.xml.ns.openejb_jar_2.ObjectFactory();
+  		org.apache.geronimo.j2ee.openejb_jar.ObjectFactory ejbFactory = new org.apache.geronimo.j2ee.openejb_jar.ObjectFactory();
 		OpenejbJarType ejbJar = ejbFactory.createOpenejbJarType();
 
 		ejbJar.setEnvironment(getConfigEnvironment());
@@ -122,8 +122,8 @@ public class V11DeploymentPlanCreationOp
 	public JAXBElement createConnectorDeploymentPlan(IFile dpFile) throws Exception {
 		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile);
 
-		org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory connectorFactory = new org.apache.geronimo.xml.ns.j2ee.connector_1.ObjectFactory();
-		org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType connector = connectorFactory.createConnectorType();
+		org.apache.geronimo.j2ee.connector.ObjectFactory connectorFactory = new org.apache.geronimo.j2ee.connector.ObjectFactory();
+		org.apache.geronimo.j2ee.connector.ConnectorType connector = connectorFactory.createConnectorType();
 		ResourceadapterType resourceadapter = connectorFactory.createResourceadapterType();
 	
 		connector.setEnvironment(getConfigEnvironment());
@@ -139,7 +139,7 @@ public class V11DeploymentPlanCreationOp
 	public JAXBElement createGeronimoApplicationClientDeploymentPlan(IFile dpFile) throws Exception {
 		Trace.tracePoint("Entry","V11DeploymentPlanCreationOperation.createGeronimoApplicationClientDeploymentPlan", dpFile);
 
-		org.apache.geronimo.xml.ns.j2ee.application_client_1.ObjectFactory applicationClientFactory = new org.apache.geronimo.xml.ns.j2ee.application_client_1.ObjectFactory();
+		org.apache.geronimo.j2ee.applicationclient.ObjectFactory applicationClientFactory = new org.apache.geronimo.j2ee.applicationclient.ObjectFactory();
 		ApplicationClientType applicationClient = applicationClientFactory.createApplicationClientType();
 
         applicationClient.setServerEnvironment(getConfigEnvironment());
@@ -155,7 +155,7 @@ public class V11DeploymentPlanCreationOp
 	public JAXBElement createServiceDeploymentPlan(IFile dpFile) throws Exception {
 		Trace.tracePoint("Entry","V11DeploymentPlanCreationOperation.createServiceDeploymentPlan", dpFile);
 
-		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory artifactFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		org.apache.geronimo.j2ee.deployment.ObjectFactory artifactFactory = new org.apache.geronimo.j2ee.deployment.ObjectFactory();
 		ServiceType service = artifactFactory.createServiceType();
 
         
@@ -183,7 +183,7 @@ public class V11DeploymentPlanCreationOp
 				: "car";
 
 		ArtifactType artifact = createArtifact(groupId, artifactId, version, type);
-		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+		org.apache.geronimo.j2ee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.j2ee.deployment.ObjectFactory();
    
 		EnvironmentType env = serviceFactory.createEnvironmentType();
 		env.setModuleId(artifact);
@@ -206,7 +206,7 @@ public class V11DeploymentPlanCreationOp
 	public static ArtifactType createArtifact(String groupId, String artifactId, String version, String type) {
   		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createArtifact", groupId, artifactId, version, type);
 
-  		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+  		org.apache.geronimo.j2ee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.j2ee.deployment.ObjectFactory();
 		ArtifactType artifact = serviceFactory.createArtifactType();
 
 		if (groupId != null)
@@ -224,7 +224,7 @@ public class V11DeploymentPlanCreationOp
 	public static DependencyType createDependency(String groupId, String artifactId, String version, String type) {
   		Trace.tracePoint("Entry", "V11DeploymentPlanCreationOperation.createDependency", groupId, artifactId, version, type);
 
-  		org.apache.geronimo.xml.ns.deployment_1.ObjectFactory serviceFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+  		org.apache.geronimo.j2ee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.j2ee.deployment.ObjectFactory();
 		DependencyType dependency = serviceFactory.createDependencyType();
 		if (groupId != null)
 			dependency.setGroupId(groupId);

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF Tue Jun  8 04:40:16 2010
@@ -8,8 +8,8 @@ Bundle-Vendor: Apache.org
 Bundle-Localization: plugin
 Require-Bundle: org.apache.geronimo.runtime.common,
  org.apache.geronimo.runtime.v11;bundle-version="2.2.0",
+ org.apache.geronimo.st.v11.core,
  org.apache.geronimo.st.ui,
- org.apache.geronimo.st.v21.ui,
  org.apache.geronimo.j2ee.v11.jaxbmodel,
  org.eclipse.ui,
  org.eclipse.core.runtime,
@@ -17,13 +17,13 @@ Require-Bundle: org.apache.geronimo.runt
  org.eclipse.ui.forms,
  org.eclipse.core.resources,
  org.eclipse.wst.common.project.facet.ui,
- org.apache.geronimo.st.v11.core,
- org.apache.geronimo.st.v21.core,
  org.eclipse.wst.server.ui,
  org.eclipse.wst.server.core,
  org.eclipse.ui.ide,
  org.eclipse.wst.common.modulecore,
  org.eclipse.wst.sse.ui,
- org.eclipse.jface.text;bundle-version="3.5.0"
+ org.eclipse.jface.text,
+ org.eclipse.debug.ui,
+ org.eclipse.jdt.debug.ui
 Bundle-ActivationPolicy: lazy
 Import-Package: org.apache.geronimo.st.v21.core.jaxb

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/actions/LaunchGeronimoConsoleAction.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/actions/LaunchGeronimoConsoleAction.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/actions/LaunchGeronimoConsoleAction.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/actions/LaunchGeronimoConsoleAction.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.actions;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.apache.geronimo.st.ui.internal.Trace;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IActionDelegate;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport;
+import org.eclipse.wst.server.core.IServer;
+
+/**
+ * @version $Rev: 688899 $ $Date: 2008-08-26 06:10:55 +0800 (Tue, 26 Aug 2008) $
+ */
+public class LaunchGeronimoConsoleAction implements IActionDelegate {
+
+	private IServer server;
+
+	private String serverPrefix;
+
+	public LaunchGeronimoConsoleAction() {
+        super();
+        IExtensionRegistry reg = Platform.getExtensionRegistry();
+        IConfigurationElement[] extensions = reg
+                .getConfigurationElementsFor("org.apache.geronimo.st.ui.actionURLs");
+        for (IConfigurationElement element : extensions) {
+            Trace.trace(Trace.INFO, element.getName() + " = "
+                    + element.getValue() + ".");
+            if (element.getName().equals("server_prefix")) {
+                serverPrefix = element.getValue();
+                Trace
+                        .trace(Trace.INFO, "server_prefix = " + serverPrefix
+                                + ".");
+            }
+        }
+    }
+
+	public URL getConsoleUrl() throws MalformedURLException {
+		if (server != null) {
+			GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+			return new URL("http://" + server.getHost() + ":"
+					+ gs.getHTTPPort() + "/console/");
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+	 */
+	public void run(IAction action) {
+
+		try {
+			int style = IWorkbenchBrowserSupport.AS_EDITOR
+					| IWorkbenchBrowserSupport.STATUS;
+			IWebBrowser browser = WorkbenchBrowserSupport.getInstance().createBrowser(style, "console", 
+                                Messages.bind(Messages.console, server.getName()),
+                                Messages.bind(Messages.consoleTooltip, server
+                                                .getName()));
+			URL url = getConsoleUrl();
+			if (url != null)
+				browser.openURL(url);
+		} catch (MalformedURLException e) {
+			e.printStackTrace();
+		} catch (PartInitException e) {
+			e.printStackTrace();
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+	 *      org.eclipse.jface.viewers.ISelection)
+	 */
+	public void selectionChanged(IAction action, ISelection selection) {
+
+		server = (IServer) ((StructuredSelection) selection).getFirstElement();
+
+		boolean enable = server != null
+				&& server.getServerType().getId().startsWith(serverPrefix)
+				&& server.getServerState() == IServer.STATE_STARTED;
+
+		action.setEnabled(enable);
+
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetClasspathContainersCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetClasspathContainersCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetClasspathContainersCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetClasspathContainersCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.apache.geronimo.st.v11.ui.internal.Trace;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class SetClasspathContainersCommand extends ServerCommand {
+
+    private List<String> newList;
+    private List<String> oldList;
+
+
+    /*
+     * @param server
+     * @param checkList string array
+     */
+    public SetClasspathContainersCommand(IServerWorkingCopy server, Object[] checkList) {
+
+        super(server, "SetClasspathContainersCommand");
+        this.newList = createList( checkList );
+
+        Trace.tracePoint("ENTRY", "SetClasspathContainersCommand", checkList, checkList.length );
+        Trace.tracePoint("EXIT", "SetClasspathContainersCommand");
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.commands.ServerCommand#execute()
+     */
+    public void execute() {
+        Trace.tracePoint("ENTRY", "SetClasspathContainersCommand.execute");
+
+        GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+        oldList = gs.getClasspathContainers();
+        gs.setClasspathContainers(newList);
+
+        Trace.tracePoint("EXIT", "SetClasspathContainersCommand.execute");
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.commands.ServerCommand#undo()
+     */
+    public void undo() {
+        Trace.tracePoint("ENTRY", "SetClasspathContainersCommand.undo");
+
+        GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+        gs.setClasspathContainers(oldList);
+
+        Trace.tracePoint("EXIT", "SetClasspathContainersCommand.undo");
+    }
+
+
+    //
+    // Convert object array to List<String>
+    //
+	public List<String> createList( Object[] checkList ) {
+        Trace.tracePoint("ENTRY", "SetClasspathContainersCommand.createList");
+    
+        List<String> containers = new ArrayList<String>();
+        for (Object container : checkList) {
+            containers.add( (String)container );
+        }
+
+        Trace.tracePoint("EXIT", "SetClasspathContainersCommand.createList", containers );
+        return containers;
+   }
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetConsoleLogLevelCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetConsoleLogLevelCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetConsoleLogLevelCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetConsoleLogLevelCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $
+ */
+public class SetConsoleLogLevelCommand extends ServerCommand {
+
+	String value;
+
+	String oldValue;
+
+	/**
+	 * @param server
+	 * @param name
+	 */
+	public SetConsoleLogLevelCommand(IServerWorkingCopy server, String value) {
+		super(server, "SetConsoleLogLevelCommand");
+		this.value = value;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#execute()
+	 */
+	public void execute() {
+		GeronimoServerDelegate gs = getGeronimoServer();
+		oldValue = gs.getConsoleLogLevel();
+		gs.setConsoleLogLevel(value);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#undo()
+	 */
+	public void undo() {
+		getGeronimoServer().setConsoleLogLevel(oldValue);
+	}
+
+	private GeronimoServerDelegate getGeronimoServer() {
+		GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		if (gs == null) {
+			gs = (GeronimoServerDelegate) server.loadAdapter(GeronimoServerDelegate.class, new NullProgressMonitor());
+		}
+		return gs;
+	}
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetHTTPPortCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetHTTPPortCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetHTTPPortCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetHTTPPortCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $
+ */
+public class SetHTTPPortCommand extends ServerCommand {
+
+	protected String name;
+
+	protected String oldName;
+
+	GeronimoServerDelegate gs;
+
+	/**
+	 * @param server
+	 * @param name
+	 */
+	public SetHTTPPortCommand(IServerWorkingCopy server, String name) {
+		super(server, name);
+		this.name = name;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#execute()
+	 */
+	public void execute() {
+		gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		if (gs == null) {
+			gs = (GeronimoServerDelegate) server.loadAdapter(GeronimoServerDelegate.class, new NullProgressMonitor());
+		}
+		oldName = gs.getHTTPPort();
+		gs.setHTTPPort(name);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#undo()
+	 */
+	public void undo() {
+		if (gs != null) {
+			gs.setHTTPPort(oldName);
+		}
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev: 672450 $ $Date: 2008-06-28 09:21:07 +0800 (Sat, 28 Jun 2008) $
+ */
+public class SetInPlaceSharedLibCommand extends ServerCommand {
+
+	boolean value;
+
+	boolean oldValue;
+
+	/**
+	 * @param server
+	 * @param name
+	 */
+	public SetInPlaceSharedLibCommand(IServerWorkingCopy server, boolean value) {
+		super(server, "SetInPlaceSharedLibCommand");
+		this.value = value;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.ui.commands.ServerCommand#execute()
+	 */
+	public void execute() {
+		GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		oldValue = gs.isInPlaceSharedLib();
+		gs.setInPlaceSharedLib(value);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.ui.commands.ServerCommand#undo()
+	 */
+	public void undo() {
+		GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		gs.setInPlaceSharedLib(oldValue);
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetNotRedeployJSPFilesCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetNotRedeployJSPFilesCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetNotRedeployJSPFilesCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetNotRedeployJSPFilesCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class SetNotRedeployJSPFilesCommand extends ServerCommand {
+
+    boolean value;
+
+    boolean oldValue;
+
+    /**
+     * @param server
+     * @param name
+     */
+    public SetNotRedeployJSPFilesCommand(IServerWorkingCopy server, boolean value) {
+        super(server, "SetRunFromWorkspaceCommand");
+        this.value = value;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.commands.ServerCommand#execute()
+     */
+    public void execute() {
+        GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+        oldValue = gs.isNotRedeployJSPFiles();
+        gs.setNotRedeployJSPFiles(value);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.commands.ServerCommand#undo()
+     */
+    public void undo() {
+        GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+        gs.setNotRedeployJSPFiles(oldValue);
+    }
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetPasswordCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetPasswordCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetPasswordCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetPasswordCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $
+ */
+public class SetPasswordCommand extends ServerCommand {
+
+	protected String name;
+
+	protected String oldName;
+
+	GeronimoServerDelegate gs;
+
+	/**
+	 * @param server
+	 * @param name
+	 */
+	public SetPasswordCommand(IServerWorkingCopy server, String name) {
+		super(server, name);
+		this.name = name;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#execute()
+	 */
+	public void execute() {
+		gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		if (gs == null) {
+			gs = (GeronimoServerDelegate) server.loadAdapter(GeronimoServerDelegate.class, new NullProgressMonitor());
+		}
+		oldName = gs.getAdminPassword();
+		gs.setAdminPassword(name);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#undo()
+	 */
+	public void undo() {
+		if (gs != null) {
+			gs.setAdminPassword(oldName);
+		}
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetPublishTimeoutCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetPublishTimeoutCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetPublishTimeoutCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetPublishTimeoutCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+/**
+ * @version $Rev: 732383 $ $Date: 2009-01-08 00:27:32 +0800 (Thu, 08 Jan 2009) $
+ *
+ * Command to change the server's auto-publish setting.
+ */
+public class SetPublishTimeoutCommand extends ServerCommand {
+    protected long timeOut;
+    protected long oldTimeOut;
+
+    /**
+     * SetServerAutoPublishDefaultCommand constructor.
+     *
+     * @param server a server
+     * @param time a publish time
+     */
+    public SetPublishTimeoutCommand(IServerWorkingCopy server, long timeOut) {
+        super(server, "SetServerAutoPublishTimeOutCommand");
+        this.timeOut = timeOut;
+    }
+
+    /**
+     * Execute the command.
+     */
+    public void execute() {
+        GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+        oldTimeOut = gs.getPublishTimeout();
+        gs.setPublishTimeout(timeOut);
+    }
+
+    /**
+     * Undo the command.
+     */
+    public void undo() {
+        GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+        gs.setPublishTimeout(oldTimeOut);
+    }
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetRMIPortCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetRMIPortCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetRMIPortCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetRMIPortCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $
+ */
+public class SetRMIPortCommand extends ServerCommand {
+
+	protected String name;
+
+	protected String oldName;
+
+	GeronimoServerDelegate gs;
+
+	/**
+	 * @param server
+	 * @param name
+	 */
+	public SetRMIPortCommand(IServerWorkingCopy server, String name) {
+		super(server, name);
+		this.name = name;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#execute()
+	 */
+	public void execute() {
+		gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		if (gs == null) {
+			gs = (GeronimoServerDelegate) server.loadAdapter(GeronimoServerDelegate.class, new NullProgressMonitor());
+		}
+		oldName = gs.getRMINamingPort();
+		gs.setRMINamingPort(name);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#undo()
+	 */
+	public void undo() {
+		if (gs != null) {
+			gs.setRMINamingPort(oldName);
+		}
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetRunFromWorkspaceCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetRunFromWorkspaceCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetRunFromWorkspaceCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetRunFromWorkspaceCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev: 672450 $ $Date: 2008-06-28 09:21:07 +0800 (Sat, 28 Jun 2008) $
+ */
+public class SetRunFromWorkspaceCommand extends ServerCommand {
+
+	boolean value;
+
+	boolean oldValue;
+
+	/**
+	 * @param server
+	 * @param name
+	 */
+	public SetRunFromWorkspaceCommand(IServerWorkingCopy server, boolean value) {
+		super(server, "SetRunFromWorkspaceCommand");
+		this.value = value;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.ui.commands.ServerCommand#execute()
+	 */
+	public void execute() {
+		GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		oldValue = gs.isRunFromWorkspace();
+		gs.setRunFromWorkspace(value);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.ui.commands.ServerCommand#undo()
+	 */
+	public void undo() {
+		GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		gs.setRunFromWorkspace(oldValue);
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetSelectClasspathContainersCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetSelectClasspathContainersCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetSelectClasspathContainersCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetSelectClasspathContainersCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class SetSelectClasspathContainersCommand extends ServerCommand {
+
+    boolean value;
+    boolean oldValue;
+
+
+    /**
+     * @param server
+     * @param name
+     */
+    public SetSelectClasspathContainersCommand(IServerWorkingCopy server, boolean value) {
+        super(server, "SetSelectClasspathContainersCommand");
+        this.value = value;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.commands.ServerCommand#execute()
+     */
+    public void execute() {
+        GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+        oldValue = gs.isSelectClasspathContainers();
+        gs.setSelectClasspathContainers(value);
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.commands.ServerCommand#undo()
+     */
+    public void undo() {
+        GeronimoServerDelegate gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+        gs.setSelectClasspathContainers(oldValue);
+    }
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetUsernameCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetUsernameCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetUsernameCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetUsernameCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $ 
+ */
+public class SetUsernameCommand extends ServerCommand {
+
+	protected String name;
+
+	protected String oldName;
+
+	GeronimoServerDelegate gs;
+
+	/**
+	 * @param server
+	 * @param name
+	 */
+	public SetUsernameCommand(IServerWorkingCopy server, String name) {
+		super(server, name);
+		this.name = name;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#execute()
+	 */
+	public void execute() {
+		gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		if (gs == null) {
+			gs = (GeronimoServerDelegate) server.loadAdapter(GeronimoServerDelegate.class, new NullProgressMonitor());
+		}
+		oldName = gs.getAdminID();
+		gs.setAdminID(name);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#undo()
+	 */
+	public void undo() {
+		if (gs != null) {
+			gs.setAdminID(oldName);
+		}
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetVMArgsCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetVMArgsCommand.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetVMArgsCommand.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/commands/SetVMArgsCommand.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.commands;
+
+import org.apache.geronimo.st.ui.commands.ServerCommand;
+import org.apache.geronimo.st.v11.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $
+ */
+public class SetVMArgsCommand extends ServerCommand {
+	
+	protected String args;
+
+	protected String oldArgs;
+	
+	GeronimoServerDelegate gs;
+
+	public SetVMArgsCommand(IServerWorkingCopy server, String args) {
+		super(server, args);
+		this.args = args;
+	}
+
+	public void execute() {
+		gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		if (gs == null) {
+			gs = (GeronimoServerDelegate) server.loadAdapter(GeronimoServerDelegate.class, new NullProgressMonitor());
+		}
+		oldArgs = gs.getVMArgs();
+		gs.setVMArgs(args);
+	}
+
+	public void undo() {
+		if (gs != null) {
+			gs.setVMArgs(oldArgs);
+		}
+	}
+
+}



Mime
View raw message