geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r417031 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/ org.apache.geronimo.st.v1.core/src/org/apache...
Date Sun, 25 Jun 2006 16:45:03 GMT
Author: sppatel
Date: Sun Jun 25 09:45:02 2006
New Revision: 417031

URL: http://svn.apache.org/viewvc?rev=417031&view=rev
Log:
allow prompting of artifactid during project creation

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/DeploymentPlanInstallConfig.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/FacetInstallPage.java
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoFacetInstallDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/GeronimoV1FacetInstallDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoFacetInstallDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoFacetInstallDelegate.java?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoFacetInstallDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoFacetInstallDelegate.java
Sun Jun 25 09:45:02 2006
@@ -38,11 +38,10 @@
 	 *      org.eclipse.wst.common.project.facet.core.IProjectFacetVersion,
 	 *      java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
 	 */
-	public void execute(IProject project, IProjectFacetVersion fv,
-			Object config, IProgressMonitor monitor) throws CoreException {
+	public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor
monitor) throws CoreException {
 
 		try {
-			createDeploymentPlanCreationOp(project).execute(monitor, null);
+			createDeploymentPlanCreationOp(project, config).execute(monitor, null);
 		} catch (ExecutionException e) {
 			e.printStackTrace();
 		}
@@ -53,7 +52,7 @@
 			IFacetedProject fp = ProjectFacetsManager.create(ears[i]);
 			if (!fp.hasProjectFacet(facet)) {
 				try {
-					createDeploymentPlanCreationOp(ears[i]).execute(monitor, null);
+					createDeploymentPlanCreationOp(ears[i], config).execute(monitor, null);
 				} catch (ExecutionException e) {
 					e.printStackTrace();
 				}
@@ -61,7 +60,6 @@
 		}
 	}
 
-	public abstract IDataModelOperation createDeploymentPlanCreationOp(
-			IProject project);
+	public abstract IDataModelOperation createDeploymentPlanCreationOp(IProject project, Object
config);
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java
Sun Jun 25 09:45:02 2006
@@ -35,9 +35,12 @@
 public abstract class DeploymentPlanCreationOperation extends
 		AbstractGeronimoJ2EEComponentOperation implements
 		IDeploymentPlanCreationOp {
+	
+	protected Object config;
 
-	public DeploymentPlanCreationOperation(IDataModel model) {
+	public DeploymentPlanCreationOperation(IDataModel model, Object config) {
 		super(model);
+		this.config = config;
 	}
 
 	/*

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/GeronimoV1FacetInstallDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/GeronimoV1FacetInstallDelegate.java?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/GeronimoV1FacetInstallDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/GeronimoV1FacetInstallDelegate.java
Sun Jun 25 09:45:02 2006
@@ -25,14 +25,13 @@
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
 
-public class GeronimoV1FacetInstallDelegate extends
-		GeronimoFacetInstallDelegate {
+public class GeronimoV1FacetInstallDelegate extends GeronimoFacetInstallDelegate {
 
-	public IDataModelOperation createDeploymentPlanCreationOp(IProject project) {
+	public IDataModelOperation createDeploymentPlanCreationOp(IProject project, Object config)
{
 		IVirtualComponent comp = ComponentCore.createComponent(project);
 		IDataModel model = DataModelFactory.createDataModel(new JavaComponentCreationDataModelProvider());
 		model.setStringProperty(IComponentCreationDataModelProperties.COMPONENT_NAME, comp.getName());
 		model.setStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME, project.getName());
-		return new V1DeploymentPlanCreationOperation(model);
+		return new V1DeploymentPlanCreationOperation(model, config);
 	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/operations/V1DeploymentPlanCreationOperation.java
Sun Jun 25 09:45:02 2006
@@ -38,8 +38,8 @@
 public class V1DeploymentPlanCreationOperation extends
 		DeploymentPlanCreationOperation {
 
-	public V1DeploymentPlanCreationOperation(IDataModel model) {
-		super(model);
+	public V1DeploymentPlanCreationOperation(IDataModel model, Object config) {
+		super(model, config);
 	}
 
 	/* (non-Javadoc)

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
Sun Jun 25 09:45:02 2006
@@ -58,8 +58,9 @@
     
     <extension point="org.eclipse.wst.common.project.facet.core.facets">        
         <project-facet-version facet="org.apache.geronimo.facet" version="1.1">
-            <action type="install">
+            <action type="install" id="geronimo.plan.install">
                 <delegate class="org.apache.geronimo.st.v11.core.operations.GeronimoV11FacetInstallDelegate"/>
+                <config-factory class="org.apache.geronimo.st.v11.core.DeploymentPlanInstallConfig$Factory"/>
             </action>
             <constraint>
                 <or>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/DeploymentPlanInstallConfig.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/DeploymentPlanInstallConfig.java?rev=417031&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/DeploymentPlanInstallConfig.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/DeploymentPlanInstallConfig.java
Sun Jun 25 09:45:02 2006
@@ -0,0 +1,79 @@
+/**
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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;
+
+import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
+
+public class DeploymentPlanInstallConfig {
+	
+	private String groupId;
+	
+	private String artifactId;
+	
+	private String version;
+	
+	private String type;
+	
+	private boolean sharedLib;
+	
+    public static final class Factory implements IActionConfigFactory
+    {
+        public Object create()
+        {
+            return new DeploymentPlanInstallConfig();
+        }
+    }
+
+	public String getArtifactId() {
+		return artifactId;
+	}
+
+	public void setArtifactId(String artifactId) {
+		this.artifactId = artifactId;
+	}
+
+	public String getGroupId() {
+		return groupId;
+	}
+
+	public void setGroupId(String groupId) {
+		this.groupId = groupId;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public boolean isSharedLib() {
+		return sharedLib;
+	}
+
+	public void setSharedLib(boolean sharedLib) {
+		this.sharedLib = sharedLib;
+	}
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/DeploymentPlanInstallConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/DeploymentPlanInstallConfig.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/DeploymentPlanInstallConfig.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/GeronimoV11FacetInstallDelegate.java
Sun Jun 25 09:45:02 2006
@@ -16,7 +16,10 @@
 package org.apache.geronimo.st.v11.core.operations;
 
 import org.apache.geronimo.st.core.GeronimoFacetInstallDelegate;
+import org.apache.geronimo.st.v11.core.DeploymentPlanInstallConfig;
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jst.j2ee.internal.archive.operations.JavaComponentCreationDataModelProvider;
 import org.eclipse.wst.common.componentcore.ComponentCore;
 import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
@@ -24,15 +27,15 @@
 import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
 
-public class GeronimoV11FacetInstallDelegate extends
-		GeronimoFacetInstallDelegate {
+public class GeronimoV11FacetInstallDelegate extends GeronimoFacetInstallDelegate {
 
-	public IDataModelOperation createDeploymentPlanCreationOp(IProject project) {
+	public IDataModelOperation createDeploymentPlanCreationOp(IProject project, Object config)
{
 		IVirtualComponent comp = ComponentCore.createComponent(project);
 		IDataModel model = DataModelFactory.createDataModel(new JavaComponentCreationDataModelProvider());
 		model.setStringProperty(IComponentCreationDataModelProperties.COMPONENT_NAME, comp.getName());
 		model.setStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME, project.getName());
-		return new V11DeploymentPlanCreationOperation(model);
+		return new V11DeploymentPlanCreationOperation(model, config);
 	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
Sun Jun 25 09:45:02 2006
@@ -17,8 +17,10 @@
 
 import org.apache.geronimo.st.core.GeronimoSchemaNS;
 import org.apache.geronimo.st.core.operations.DeploymentPlanCreationOperation;
+import org.apache.geronimo.st.v11.core.DeploymentPlanInstallConfig;
 import org.apache.geronimo.st.v11.core.GeronimoV11Utils;
 import org.apache.geronimo.xml.ns.deployment.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment.DependenciesType;
 import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
 import org.apache.geronimo.xml.ns.deployment.EnvironmentType;
 import org.apache.geronimo.xml.ns.j2ee.application.ApplicationFactory;
@@ -46,11 +48,12 @@
 import org.openejb.xml.ns.openejb.jar.OpenejbJarType;
 import org.openejb.xml.ns.openejb.jar.util.JarResourceFactoryImpl;
 
-public class V11DeploymentPlanCreationOperation extends
-		DeploymentPlanCreationOperation {
+public class V11DeploymentPlanCreationOperation extends DeploymentPlanCreationOperation {
+	
+	DeploymentPlanInstallConfig cfg;
 
-	public V11DeploymentPlanCreationOperation(IDataModel model) {
-		super(model);
+	public V11DeploymentPlanCreationOperation(IDataModel model, Object config) {
+		super(model, config);
 	}
 
 	/* (non-Javadoc)
@@ -72,7 +75,7 @@
 		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
 
 		root.setApplicationName(getComponentName());
-		root.setEnvironment(getConfigEnvironment("default", getComponentName(), "1.0", "car"));
+		root.setEnvironment(getConfigEnvironment());
 
 		documentRoot.setApplication(root);
 		resource.getContents().add(documentRoot);
@@ -103,7 +106,7 @@
 
 		WebAppType root = WebFactory.eINSTANCE.createWebAppType();
 
-		root.setEnvironment(getConfigEnvironment("default", getComponentName(), "1.0", "car"));
+		root.setEnvironment(getConfigEnvironment());
 		root.setContextRoot("/" + getComponentName());
 		//root.setContextPriorityClassloader(false); //TODO Replace this with inverse-classloading
 
@@ -135,7 +138,7 @@
 		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
 		map.put("pkgen", GeronimoSchemaNS.GERONIMO_PKGEN_NS_2_0);
 
-		root.setEnvironment(getConfigEnvironment("default", getComponentName(), "1.0", "car"));
+		root.setEnvironment(getConfigEnvironment());
 		root.setEnterpriseBeans(JarFactory.eINSTANCE.createEnterpriseBeansType());
 
 		documentRoot.setOpenejbJar(root);
@@ -164,7 +167,7 @@
 		map.put("nam", GeronimoSchemaNS.GERONIMO_NAMING_NS_1_1);
 		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
 
-		root.setEnvironment(getConfigEnvironment("default", getComponentName(), "1.0", "car"));
+		root.setEnvironment(getConfigEnvironment());
 		documentRoot.setConnector(root);
 		resource.getContents().add(documentRoot);
 
@@ -173,15 +176,41 @@
 		return root;
 	}
 	
-	public EnvironmentType getConfigEnvironment(String groupId, String artifactId, String version,
String type) {
+	public EnvironmentType getConfigEnvironment() {
+		if(config != null && config instanceof DeploymentPlanInstallConfig) {
+			cfg = (DeploymentPlanInstallConfig) config;
+		}
+		
+        String groupId = cfg != null && hasValue(cfg.getGroupId()) ? cfg.getGroupId()
: "default";
+		String artifactId = cfg != null && hasValue(cfg.getArtifactId()) ? cfg.getArtifactId()
: getComponentName();
+		String version = cfg != null && hasValue(cfg.getVersion()) ? cfg.getVersion() :
"1.0";
+		String type = cfg != null && hasValue(cfg.getType()) ? cfg.getType() : "car";
+		
+		ArtifactType artifact = createArtifactType(groupId, artifactId, version, type);
+		EnvironmentType env = DeploymentFactory.eINSTANCE.createEnvironmentType();
+		env.setModuleId(artifact);
+		
+		if(cfg != null && cfg.isSharedLib()) {
+			DependenciesType dt = DeploymentFactory.eINSTANCE.createDependenciesType();
+			ArtifactType sharedLib = createArtifactType("geronimo", "sharedLib", "1.1", "car");
+			dt.getDependency().add(sharedLib);
+			env.setDependencies(dt);
+		}
+		
+		return env;
+	}
+	
+	private ArtifactType createArtifactType(String groupId, String artifactId, String version,
String type) {
 		ArtifactType artifact = DeploymentFactory.eINSTANCE.createArtifactType();
 		artifact.setGroupId(groupId);
 		artifact.setArtifactId(artifactId);
 		artifact.setVersion(version);
 		artifact.setType(type);
-		EnvironmentType env = DeploymentFactory.eINSTANCE.createEnvironmentType();
-		env.setModuleId(artifact);
-		return env;
+		return artifact;
+	}
+	
+	private static boolean hasValue(String attribute) {
+		return attribute != null && attribute.trim().length() != 0;
 	}
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
Sun Jun 25 09:45:02 2006
@@ -21,5 +21,8 @@
  org.eclipse.wst.common.modulecore,
  org.eclipse.emf.ecore,
  org.apache.geronimo.v11.deployment.model.edit,
- org.apache.geronimo.v11.deployment.model
+ org.apache.geronimo.v11.deployment.model,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.wst.web.ui,
+ org.eclipse.wst.common.frameworks
 Eclipse-LazyStart: true

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/plugin.xml?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/plugin.xml
Sun Jun 25 09:45:02 2006
@@ -12,4 +12,10 @@
     <extension point="org.apache.geronimo.st.ui.loader">
     	<loader class="org.apache.geronimo.st.v11.ui.editors.GeronimoFormContentLoader" version="1.1"/>
     </extension>
+    
+    <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
+  		<wizard-pages action="geronimo.plan.install">
+    		<page class="org.apache.geronimo.st.v11.ui.wizards.FacetInstallPage"/>
+  		</wizard-pages>
+	</extension>  
 </plugin>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java
Sun Jun 25 09:45:02 2006
@@ -21,5 +21,7 @@
 	public static String artifactType;
 	public static String inverseClassloading;
 	public static String supressDefaultEnv;
+	
+	public static String addSharedLib;
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties?rev=417031&r1=417030&r2=417031&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties
Sun Jun 25 09:45:02 2006
@@ -9,4 +9,6 @@
 version=Version:
 artifactType=Artifact Type:
 inverseClassloading=Inverse classloading
-supressDefaultEnv=Supress default environment
\ No newline at end of file
+supressDefaultEnv=Supress default environment
+
+addSharedLib=Add a runtime dependency to Geronimo's shared library.
\ No newline at end of file

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/FacetInstallPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/FacetInstallPage.java?rev=417031&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/FacetInstallPage.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/FacetInstallPage.java
Sun Jun 25 09:45:02 2006
@@ -0,0 +1,117 @@
+/**
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.wizards;
+
+import org.apache.geronimo.st.v11.core.DeploymentPlanInstallConfig;
+import org.apache.geronimo.st.v11.ui.internal.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
+
+public class FacetInstallPage extends AbstractFacetWizardPage {
+
+	private DeploymentPlanInstallConfig config;
+
+	private Text groupText;
+	private Text artifactText;
+	private Text versionText;
+	private Text typeText;
+	private Button sharedLib;
+
+	public FacetInstallPage() {
+		super("geronimo.plan.install");
+		setTitle("Geronimo Deployment Plan");
+		setDescription("Configure the geronimo deployment plan.");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.common.project.facet.ui.IFacetWizardPage#setConfig(java.lang.Object)
+	 */
+	public void setConfig(Object config) {
+		this.config = (DeploymentPlanInstallConfig) config;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		
+		Composite composite = new Composite(parent, SWT.NONE);
+		composite.setLayout(new GridLayout(2, false));
+
+		Label groupLabel = new Label(composite, SWT.NONE);
+		groupLabel.setText(Messages.groupId);
+
+		groupText = new Text(composite, SWT.BORDER);
+		groupText.setLayoutData(createGridData());
+		groupText.setText("default");
+		
+		Label artifactLabel = new Label(composite, SWT.NONE);
+		artifactLabel.setText(Messages.artifactId);
+
+		artifactText = new Text(composite, SWT.BORDER);
+		artifactText.setLayoutData(createGridData());
+		
+		Label versionLabel = new Label(composite, SWT.NONE);
+		versionLabel.setText(Messages.version);
+
+		versionText = new Text(composite, SWT.BORDER);
+		versionText.setLayoutData(createGridData());
+		versionText.setText("1.0");
+		
+		Label typeLabel = new Label(composite, SWT.NONE);
+		typeLabel.setText(Messages.artifactType);
+
+		typeText = new Text(composite, SWT.BORDER);
+		typeText.setLayoutData(createGridData());
+		typeText.setText("car");
+		
+		sharedLib = new Button(composite, SWT.CHECK);
+		GridData data = createGridData();
+		data.horizontalSpan = 2;
+		data.verticalIndent = 5;
+		sharedLib.setLayoutData(data);
+		sharedLib.setText(Messages.addSharedLib);
+		
+		setControl(composite);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage#transferStateToConfig()
+	 */
+	public void transferStateToConfig() {
+		config.setGroupId(groupText.getText());
+		config.setArtifactId(artifactText.getText());
+		config.setVersion(versionText.getText());
+		config.setType(typeText.getText());
+		config.setSharedLib(sharedLib.getSelection());
+	}
+
+	private static GridData createGridData() {
+		return new GridData(GridData.FILL_HORIZONTAL);
+	}
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/FacetInstallPage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/FacetInstallPage.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/FacetInstallPage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message