You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by da...@apache.org on 2005/08/16 21:47:05 UTC
svn commit: r233044 [32/33] - in /geronimo/trunk/sandbox/eclipse-plugin: ./
org.apache.geronimo.core/ org.apache.geronimo.core/META-INF/
org.apache.geronimo.core/serverdef/ org.apache.geronimo.core/src/
org.apache.geronimo.core/src/org/ org.apache.gero...
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/apache/geronimo/xml/ns/web/util/WebSwitch.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/apache/geronimo/xml/ns/web/util/WebSwitch.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/apache/geronimo/xml/ns/web/util/WebSwitch.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/apache/geronimo/xml/ns/web/util/WebSwitch.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,209 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.xml.ns.web.util;
+
+import java.util.List;
+
+import org.apache.geronimo.xml.ns.web.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.apache.geronimo.xml.ns.web.WebPackage
+ * @generated
+ */
+public class WebSwitch {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable.";
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static WebPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public WebSwitch() {
+ if (modelPackage == null) {
+ modelPackage = WebPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public Object doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected Object doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch((EClass)eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected Object doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case WebPackage.CONFIG_PARAM_TYPE: {
+ ConfigParamType configParamType = (ConfigParamType)theEObject;
+ Object result = caseConfigParamType(configParamType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case WebPackage.CONTAINER_CONFIG_TYPE: {
+ ContainerConfigType containerConfigType = (ContainerConfigType)theEObject;
+ Object result = caseContainerConfigType(containerConfigType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case WebPackage.DOCUMENT_ROOT: {
+ DocumentRoot documentRoot = (DocumentRoot)theEObject;
+ Object result = caseDocumentRoot(documentRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case WebPackage.WEB_APP_TYPE: {
+ WebAppType webAppType = (WebAppType)theEObject;
+ Object result = caseWebAppType(webAppType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Config Param Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Config Param Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseConfigParamType(ConfigParamType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Container Config Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Container Config Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseContainerConfigType(ContainerConfigType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Document Root</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Document Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseDocumentRoot(DocumentRoot object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>App Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>App Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseWebAppType(WebAppType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public Object defaultCase(EObject object) {
+ return null;
+ }
+
+} //WebSwitch
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/src/org/apache/geronimo/xml/ns/web/util/WebSwitch.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/templates/Header.javajetinc
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/templates/Header.javajetinc?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/templates/Header.javajetinc (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/templates/Header.javajetinc Tue Aug 16 12:46:27 2005
@@ -0,0 +1,15 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.
+ */
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.deployment.model/templates/Header.javajetinc
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/.project
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/.project?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/.project (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/.project Tue Aug 16 12:46:27 2005
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.apache.geronimo.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/.project
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/build.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/build.properties?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/build.properties (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/build.properties Tue Aug 16 12:46:27 2005
@@ -0,0 +1,4 @@
+bin.includes = feature.xml
+src.includes = .project,\
+ build.properties
+jars.compile.order =
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/build.properties
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/feature.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/feature.xml?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/feature.xml (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/feature.xml Tue Aug 16 12:46:27 2005
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.apache.geronimo.feature"
+ label="org.apache.geronimo.feature"
+ version="1.0.0"
+ provider-name="Apache Software Foundation">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable.
+ </copyright>
+
+ <license url="http://www.apache.org/licenses/LICENSE-2.0">
+ Copyright 2005
+
+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.
+ </license>
+
+ <requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.debug.core"/>
+ <import plugin="org.eclipse.jdt.core"/>
+ <import plugin="org.eclipse.jdt.launching"/>
+ <import plugin="org.eclipse.wst.server.core"/>
+ <import plugin="org.eclipse.jst.server.core"/>
+ <import plugin="org.eclipse.jst.j2ee"/>
+ <import plugin="org.eclipse.jst.j2ee.core"/>
+ <import plugin="org.eclipse.jst.j2ee.web"/>
+ <import plugin="org.eclipse.jst.j2ee.ejb"/>
+ <import plugin="org.eclipse.jst.server.generic.core"/>
+ <import plugin="org.eclipse.emf.ecore.xmi"/>
+ <import plugin="org.eclipse.wst.common.modulecore"/>
+ <import plugin="org.eclipse.wst.common.frameworks"/>
+ <import plugin="org.eclipse.core.commands"/>
+ <import plugin="org.eclipse.emf.ecore"/>
+ <import plugin="org.eclipse.emf.ecore.edit"/>
+ <import plugin="org.eclipse.emf.common"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.forms"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.jst.server.generic.ui"/>
+ </requires>
+
+ <plugin
+ id="org.apache.geronimo.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.apache.geronimo.deployment.model"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.apache.geronimo.runtime.v1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.apache.geronimo.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.feature/feature.xml
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.classpath
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.classpath?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.classpath (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.classpath Tue Aug 16 12:46:27 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib" path="lib/endorsed/xercesImpl-2.6.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-2.1_2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-cli-1.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.0.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-common-1.0-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-deploy-jsr88-1.0-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-deployment-1.0-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-deploy-tool-1.0-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-kernel-1.0-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-spec-corba-2.3-rc4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-spec-j2ee-deployment-1.1-rc4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-spec-qname-1.1-rc4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/geronimo-system-1.0-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/mx4j-3.0.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/mx4j-remote-3.0.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/endorsed/xmlParserAPIs-2.2.1.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.classpath
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.project
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.project?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.project (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.project Tue Aug 16 12:46:27 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.apache.geronimo.runtime.v1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/.project
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/build.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/build.properties?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/build.properties (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/build.properties Tue Aug 16 12:46:27 2005
@@ -0,0 +1,5 @@
+bin.includes = plugin.xml,\
+ lib/
+src.includes = .classpath,\
+ .project,\
+ build.properties
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/build.properties
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/plugin.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/plugin.xml?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/plugin.xml (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/plugin.xml Tue Aug 16 12:46:27 2005
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin
+ id="org.apache.geronimo.runtime.v1"
+ name="Apache Geronimo Runtime V1 Plug-in"
+ version="1.0.0"
+ provider-name="Apache Software Foundation">
+ <runtime>
+ <library name="lib/endorsed/xercesImpl-2.6.2.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/commons-cli-1.0.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/commons-logging-1.0.4.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-common-1.0-SNAPSHOT.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-deploy-jsr88-1.0-SNAPSHOT.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-deployment-1.0-SNAPSHOT.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-deploy-tool-1.0-SNAPSHOT.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-kernel-1.0-SNAPSHOT.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-spec-corba-2.3-rc4.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-spec-j2ee-deployment-1.1-rc4.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-spec-qname-1.1-rc4.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/geronimo-system-1.0-SNAPSHOT.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/log4j-1.2.8.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/mx4j-3.0.1.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/mx4j-remote-3.0.1.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/endorsed/xmlParserAPIs-2.2.1.jar">
+ <export name="*"/>
+ </library>
+ <library name="lib/cglib-nodep-2.1_2.jar">
+ <export name="*"/>
+ </library>
+ </runtime>
+
+</plugin>
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.runtime.v1/plugin.xml
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.classpath
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.classpath?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.classpath (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.classpath Tue Aug 16 12:46:27 2005
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.classpath
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.cvsignore
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.cvsignore?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.cvsignore (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.cvsignore Tue Aug 16 12:46:27 2005
@@ -0,0 +1,4 @@
+bin
+temp.folder
+build.xml
+geronimoui.jar
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.cvsignore
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.options
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.options?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.options (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.options Tue Aug 16 12:46:27 2005
@@ -0,0 +1,4 @@
+# Debugging options for the org.eclipse.jst.server.geronimo.ui plugin
+
+# Turn on general debugging
+org.eclipse.jst.server.geronimo.ui/debug=true
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.options
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.project
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.project?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.project (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.project Tue Aug 16 12:46:27 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.apache.geronimo.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/.project
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/COPYRIGHT
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/COPYRIGHT?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/COPYRIGHT (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/COPYRIGHT Tue Aug 16 12:46:27 2005
@@ -0,0 +1,14 @@
+The following copyright notice(s) were affixed to portions of the code
+with which this file is now or was at one time distributed
+and are placed here unaltered.
+
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Initial API and implementation
+ *******************************************************************************/
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/COPYRIGHT
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/META-INF/MANIFEST.MF?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/META-INF/MANIFEST.MF (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/META-INF/MANIFEST.MF Tue Aug 16 12:46:27 2005
@@ -0,0 +1,24 @@
+nifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.apache.geronimo.ui; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.apache.geronimo.ui.internal.GeronimoUIPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.ide,
+ org.apache.geronimo.core,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.emf.common,
+ org.eclipse.emf.ecore,
+ org.eclipse.wst.server.core,
+ org.apache.geronimo.deployment.model,
+ org.eclipse.jst.server.generic.ui,
+ org.apache.geronimo.core
+Eclipse-AutoStart: true
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/META-INF/MANIFEST.MF
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/NOTICE
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/NOTICE?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/NOTICE (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/NOTICE Tue Aug 16 12:46:27 2005
@@ -0,0 +1,8 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of the Eclipse Geronimo Server Adapter were orginally developed by
+International Business Machines Corporation and are
+licensed to the Apache Software Foundation under the
+"Software Grant and Corporate Contribution License Agreement",
+informally known as the "Eclipse Geronimo Server Adapter CLA".
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/NOTICE
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/build.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/build.properties?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/build.properties (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/build.properties Tue Aug 16 12:46:27 2005
@@ -0,0 +1,15 @@
+bin.includes = icons/,\
+ plugin.xml,\
+ serverdef/,\
+ META-INF/,\
+ plugin.properties,\
+ .options,\
+ .
+jars.compile.order = .
+src.includes = build.properties,\
+ NOTICE,\
+ .project,\
+ .classpath,\
+ COPYRIGHT
+source.. = src/
+output.. = bin/
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/build.properties
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/icons/obj16/geronimo.gif
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/icons/obj16/geronimo.gif?rev=233044&view=auto
==============================================================================
Binary file - no diff available.
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/icons/obj16/geronimo.gif
------------------------------------------------------------------------------
svn:executable = *
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/icons/obj16/geronimo.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.properties?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.properties (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.properties Tue Aug 16 12:46:27 2005
@@ -0,0 +1,4 @@
+pluginName=Geronimo server UI support
+providerName=Apache Software Foundation
+
+editorName=Geronimo Web Deployment Plan Editor
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.properties
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml Tue Aug 16 12:46:27 2005
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension point="org.eclipse.wst.server.ui.wizardFragments">
+ <fragment
+ id="org.eclipse.jst.server.generic.runtime"
+ typeIds="org.eclipse.jst.server.runtime.geronimo.10"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerRuntimeWizardFragment"/>
+ <fragment
+ id="org.eclipse.jst.server.generic.server"
+ typeIds="org.eclipse.jst.server.geronimo.10"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment"/>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.jst.server.geronimo.image.runtime"
+ icon="icons/obj16/geronimo.gif"
+ typeIds="org.eclipse.jst.server.runtime.geronimo.10"/>
+ <image
+ id="org.eclipse.jst.server.geronimo.image.server"
+ icon="icons/obj16/geronimo.gif"
+ typeIds="org.eclipse.jst.server.geronimo.10"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ class="org.apache.geronimo.ui.editors.DPEditor"
+ default="true"
+ filenames="geronimo-web.xml"
+ icon="icons/obj16/geronimo.gif"
+ id="org.apache.geronimo.ui.editors.DPEditor"
+ name="%editorName">
+ </editor>
+ </extension>
+
+</plugin>
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/DPEditor.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/DPEditor.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/DPEditor.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/DPEditor.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,159 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.editors;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+
+import org.apache.geronimo.core.internal.GeronimoUtils;
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.ui.internal.Trace;
+import org.apache.geronimo.ui.pages.NamingFormPage;
+import org.apache.geronimo.ui.pages.WebGeneralPage;
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.IFormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+public class DPEditor extends FormEditor {
+
+ protected FormToolkit toolkit;
+
+ protected WebAppType plan;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void doSave(IProgressMonitor monitor) {
+ if (isDirty()) {
+ InputStream is = null;
+ try {
+ IEditorInput input = getEditorInput();
+ if (input instanceof IFileEditorInput) {
+ plan.eResource().save(Collections.EMPTY_MAP);
+ commitFormPages(true);
+ editorDirtyStateChanged();
+ }
+ } catch (Exception e) {
+ Trace.trace(Trace.SEVERE, "Error saving", e);
+ } finally {
+ try {
+ if (is != null)
+ is.close();
+ } catch (Exception e) {
+ // do nothing
+ }
+ }
+ }
+ }
+
+ private void commitFormPages(boolean onSave) {
+ IFormPage[] pages = getPages();
+ for (int i = 0; i < pages.length; i++) {
+ IFormPage page = pages[i];
+ IManagedForm mform = page.getManagedForm();
+ if (mform != null && mform.isDirty())
+ mform.commit(true);
+ }
+ }
+
+ private IFormPage[] getPages() {
+ ArrayList formPages = new ArrayList();
+ for (int i = 0; i < pages.size(); i++) {
+ Object page = pages.get(i);
+ if (page instanceof IFormPage)
+ formPages.add(page);
+ }
+ return (IFormPage[]) formPages.toArray(new IFormPage[formPages.size()]);
+ }
+
+ public void doSaveAs() {
+ // ignore
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
+ */
+ protected void addPages() {
+ try {
+ addPage(new WebGeneralPage(this, "webgeneralpage",
+ Messages.editorTabGeneral));
+ addPage(new NamingFormPage(this, "namingformpage",
+ Messages.editorTabNaming));
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ createPageSecurity();
+ createPageDependencies();
+ }
+
+ protected void createPageSecurity() {
+
+ ScrolledForm form = getToolkit().createScrolledForm(getContainer());
+
+ form.setText(Messages.editorTitle);
+ form.getBody().setLayout(new GridLayout());
+
+ form.reflow(true);
+
+ int index = addPage(form);
+ setPageText(index, Messages.editorTabSecurity); //$NON-NLS-1$
+
+ }
+
+ protected void createPageDependencies() {
+
+ ScrolledForm form = getToolkit().createScrolledForm(getContainer());
+
+ form.setText(Messages.editorTitle);
+ form.getBody().setLayout(new GridLayout());
+
+ form.reflow(true);
+
+ int index = addPage(form);
+ setPageText(index, Messages.editorTabDependencies); //$NON-NLS-1$
+
+ }
+
+ public void init(IEditorSite site, IEditorInput input)
+ throws PartInitException {
+ super.init(site, input);
+ if (input instanceof IFileEditorInput) {
+ IFileEditorInput fei = (IFileEditorInput) input;
+ plan = GeronimoUtils.getWebDeploymentPlan(fei.getFile());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
+ */
+ public boolean isSaveAsAllowed() {
+ return false;
+ }
+
+ public WebAppType getPlan() {
+ return plan;
+ }
+}
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/editors/DPEditor.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoUIPlugin.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoUIPlugin.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoUIPlugin.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoUIPlugin.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,43 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.internal;
+
+import org.eclipse.ui.plugin.*;
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class GeronimoUIPlugin extends AbstractUIPlugin {
+ protected static final String PLUGIN_ID = "org.apache.geronimo.ui";
+
+ private static GeronimoUIPlugin singleton;
+
+ /**
+ * The constructor.
+ */
+ public GeronimoUIPlugin() {
+ super();
+ singleton = this;
+ }
+
+ /**
+ * Returns the singleton instance of this plugin.
+ *
+ * @return org.apache.geronimo.ui.internal.GeronimoUIPlugin
+ */
+ public static GeronimoUIPlugin getInstance() {
+ return singleton;
+ }
+}
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/GeronimoUIPlugin.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,63 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.internal;
+
+import org.eclipse.osgi.util.NLS;
+/**
+ * Translated messages.
+ */
+public class Messages extends NLS {
+
+ public static String editorTabGeneral;
+ public static String editorTabNaming;
+ public static String editorTabSecurity;
+ public static String editorTabDependencies;
+
+
+ public static String errorCouldNotOpenFile;
+ public static String editorTitle;
+ public static String editorSectionGeneralTitle;
+ public static String editorSectionGeneralDescription;
+ public static String editorConfigId;
+ public static String editorParentId;
+ public static String editorContextRoot;
+ public static String editorClassloader;
+ public static String editorClassloaderServer;
+ public static String editorClassloaderWebApp;
+
+ public static String editorResourceRefDescription;
+ public static String editorResourceRefTitle;
+ public static String editorResRefTargetNameTitle;
+ public static String editorResRefLinkTitle;
+ public static String editorResRefNameTitle;
+
+ public static String editorResourceEnvRefDescription;
+ public static String editorResourceEnvRefTitle;
+ public static String editorResEnvRefMsgDestTitle;
+ public static String editorResEnvRefNameTitle;
+
+ public static String editorEjbLocalRefDescription;
+ public static String editorEjbLocalRefTitle;
+ public static String editorEjbLocalRefTargetName;
+ public static String editorEjbLocalRefEjbLink;
+
+ public static String add;
+ public static String remove;
+
+ static {
+ NLS.initializeMessages(GeronimoUIPlugin.PLUGIN_ID + ".internal.Messages", Messages.class);
+ }
+}
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties Tue Aug 16 12:46:27 2005
@@ -0,0 +1,36 @@
+errorCouldNotOpenFile=Could not open file
+
+editorTitle=Geronimo Deployment Plan Editor
+editorSectionGeneralTitle=General
+editorSectionGeneralDescription=Edit the common deployment settings
+
+editorConfigId=Config Id:
+editorParentId=Parent Id:
+editorContextRoot=Context Root:
+editorClassloader=Search order used by the classloader to locate classes:
+editorClassloaderServer=Search the Geronimo server environment first (recomended)
+editorClassloaderWebApp=Search the web app first
+
+editorResourceRefTitle=Resource References
+editorResourceRefDescription=The following resource references are defined:
+editorResRefTargetNameTitle=Target Name
+editorResRefLinkTitle=Resource Link
+editorResRefNameTitle=Reference Name
+
+editorResourceEnvRefTitle=Resource Environment References
+editorResourceEnvRefDescription=The following resource environment references are defined:
+editorResEnvRefNameTitle=Reference Name
+editorResEnvRefMsgDestTitle=Message destination
+
+editorEjbLocalRefDescription=The following ejb local refererencs are defined:
+editorEjbLocalRefTitle=Ejb Local References
+editorEjbLocalRefTargetName=Target Name
+editorEjbLocalRefEjbLink=Ejb Link
+
+add=Add
+remove=Remove
+
+editorTabGeneral=General
+editorTabNaming=Naming
+editorTabSecurity=Security
+editorTabDependencies=Dependencies
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Trace.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Trace.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Trace.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Trace.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,78 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.internal;
+/**
+ * Helper class to route trace output.
+ */
+public class Trace {
+ /**
+ * Config trace event.
+ */
+ public static byte CONFIG = 0;
+
+ /**
+ * Warning trace event.
+ */
+ public static byte WARNING = 1;
+
+ /**
+ * Severe trace event.
+ */
+ public static byte SEVERE = 2;
+
+ /**
+ * Finest trace event.
+ */
+ public static byte FINEST = 3;
+
+ /**
+ * Parsing trace event.
+ */
+ public static byte PARSING = 4;
+
+ /**
+ * Trace constructor comment.
+ */
+ private Trace() {
+ super();
+ }
+
+ /**
+ * Trace the given text.
+ *
+ * @param level the trace level
+ * @param s a message
+ */
+ public static void trace(byte level, String s) {
+ trace(level, s, null);
+ }
+
+ /**
+ * Trace the given message and exception.
+ *
+ * @param level the trace level
+ * @param s a message
+ * @param t a throwable
+ */
+ public static void trace(byte level, String s, Throwable t) {
+ if (!GeronimoUIPlugin.getInstance().isDebugging())
+ return;
+
+ System.out.println(GeronimoUIPlugin.PLUGIN_ID + " " + s);
+ if (t != null)
+ t.printStackTrace();
+ }
+}
\ No newline at end of file
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Trace.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,83 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.pages;
+
+import org.apache.geronimo.ui.editors.DPEditor;
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.ui.sections.EjbLocalRefSection;
+import org.apache.geronimo.ui.sections.ResourceEnvRefSection;
+import org.apache.geronimo.ui.sections.ResourceRefSection;
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class NamingFormPage extends FormPage {
+
+ public NamingFormPage(FormEditor editor, String id, String title) {
+ super(editor, id, title);
+ }
+
+ public NamingFormPage(String id, String title) {
+ super(id, title);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createFormContent(IManagedForm managedForm) {
+
+ WebAppType plan = ((DPEditor) getEditor()).getPlan();
+
+ ScrolledForm form = managedForm.getForm();
+ form.setText(Messages.editorTitle);
+ form.getBody().setLayout(new GridLayout());
+
+ // create resource ref section
+ ResourceRefSection sec = new ResourceRefSection(plan, form.getBody(),
+ managedForm.getToolkit(), ExpandableComposite.TWISTIE
+ | ExpandableComposite.EXPANDED
+ | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+ | ExpandableComposite.FOCUS_TITLE);
+ managedForm.addPart(sec);
+
+ // create resource env ref section
+ ResourceEnvRefSection sec2 = new ResourceEnvRefSection(plan, form
+ .getBody(), managedForm.getToolkit(),
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+ | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+ | ExpandableComposite.FOCUS_TITLE);
+ managedForm.addPart(sec2);
+
+ // create ejb local ref section
+ EjbLocalRefSection sec3 = new EjbLocalRefSection(plan, form.getBody(),
+ managedForm.getToolkit(), ExpandableComposite.TWISTIE
+ | ExpandableComposite.EXPANDED
+ | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+ | ExpandableComposite.FOCUS_TITLE);
+ managedForm.addPart(sec3);
+
+ form.reflow(true);
+
+ }
+
+}
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/NamingFormPage.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/WebGeneralPage.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/WebGeneralPage.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/WebGeneralPage.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/WebGeneralPage.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.pages;
+
+import org.apache.geronimo.ui.editors.DPEditor;
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.ui.sections.WebGeneralSection;
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class WebGeneralPage extends FormPage {
+
+ public WebGeneralPage(FormEditor editor, String id, String title) {
+ super(editor, id, title);
+ }
+
+ public WebGeneralPage(String id, String title) {
+ super(id, title);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createFormContent(IManagedForm managedForm) {
+
+ WebAppType plan = ((DPEditor) getEditor()).getPlan();
+
+ ScrolledForm form = managedForm.getForm();
+
+ form.setText(Messages.editorTitle);
+ form.getBody().setLayout(new GridLayout());
+
+ //create web plan general section
+ WebGeneralSection sec = new WebGeneralSection(plan,form.getBody(), managedForm.getToolkit(), ExpandableComposite.TWISTIE
+ | ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR
+ | Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE);
+ managedForm.addPart(sec);
+
+ form.reflow(true);
+ }
+
+}
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/WebGeneralPage.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,292 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.sections;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.geronimo.ui.internal.Messages;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.forms.SectionPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+public abstract class DynamicTableSection extends SectionPart {
+
+ private EObject plan;
+
+ private Table table;
+
+ public DynamicTableSection(Section section) {
+ super(section);
+ }
+
+ public DynamicTableSection(EObject plan, Composite parent,
+ FormToolkit toolkit, int style) {
+ super(parent, toolkit, style);
+ this.plan = plan;
+ createClient(getSection(), toolkit);
+ }
+
+ public void createClient(Section section, FormToolkit toolkit) {
+ configureSection(section);
+
+ Composite composite = createTableComposite(section, toolkit);
+ createTable(composite);
+ fillTableItems();
+
+ TableViewer tableViewer = new TableViewer(table);
+ TextCellEditor cellEditor = new TextCellEditor(table);
+ tableViewer.setCellEditors(new CellEditor[] { cellEditor, cellEditor,
+ cellEditor });
+
+ tableViewer.setColumnProperties(getTableColumnNames());
+
+ ICellModifier cellModifier = createCellModifier(getTableColumnNames());
+ tableViewer.setCellModifier(cellModifier);
+
+ Composite buttonComp = createButtonComposite(toolkit, composite);
+ createAddButton(toolkit, buttonComp);
+ createRemoveButton(toolkit, buttonComp);
+
+ }
+
+ protected Composite createTableComposite(Section section,
+ FormToolkit toolkit) {
+ Composite composite = toolkit.createComposite(section);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = getTableColumnNames().length;
+ layout.marginHeight = 5;
+ layout.marginWidth = 10;
+ layout.verticalSpacing = 5;
+ layout.horizontalSpacing = 15;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ section.setClient(composite);
+ return composite;
+ }
+
+ protected void configureSection(Section section) {
+ section.setText(getTitle());
+ section.setDescription(getDescription());
+ section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ }
+
+ protected void fillTableItems() {
+ EList list = (EList) plan.eGet(getEReference());
+
+ for (int j = 0; j < list.size(); j++) {
+ TableItem item = new TableItem(table, SWT.NONE);
+ String[] tableTextData = getTableText((EObject) list.get(j));
+ item.setText(tableTextData);
+ item.setData((EObject) list.get(j));
+ }
+ }
+
+ protected void createTable(Composite composite) {
+ table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION
+ | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE);
+ table.setHeaderVisible(true);
+
+ GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
+ data.heightHint = 60;
+ data.widthHint = 400;
+ table.setLayoutData(data);
+
+ TableLayout tableLayout = new TableLayout();
+ table.setLayout(tableLayout);
+
+ for (int i = 0; i < getTableColumnNames().length; i++) {
+ tableLayout.addColumnData(new ColumnWeightData(35));
+ TableColumn tableColumn = new TableColumn(table, SWT.NONE);
+ tableColumn.setText(getTableColumnNames()[i]);
+
+ }
+
+ }
+
+ protected Composite createButtonComposite(FormToolkit toolkit,
+ Composite parent) {
+ GridLayout layout;
+ Composite buttonComp = new Composite(parent, SWT.NONE);
+ layout = new GridLayout();
+ layout.horizontalSpacing = 2;
+ layout.verticalSpacing = 2;
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ layout.numColumns = 1;
+ buttonComp.setLayout(layout);
+ buttonComp.setBackground(toolkit.getColors().getBackground());
+ buttonComp
+ .setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ return buttonComp;
+ }
+
+ protected ICellModifier createCellModifier(final String[] columnNames) {
+ ICellModifier cellModifier = new ICellModifier() {
+ public Object getValue(Object element, String property) {
+ EObject type = (EObject) element;
+ String value = null;
+ for (int k = 0; k < columnNames.length; k++) {
+ if (columnNames[k].equals(property)) {
+ value = (String) type
+ .eGet(getTableColumnEAttributes()[k]);
+ }
+ }
+ if (value == null)
+ value = "";
+
+ return value;
+ }
+
+ public boolean canModify(Object element, String property) {
+ return true;
+ }
+
+ public void modify(Object element, String property, Object value) {
+ TableItem item = null;
+ if (element instanceof TableItem) {
+ item = (TableItem) element;
+ element = item.getData();
+ }
+ EObject type = (EObject) element;
+ for (int k = 0; k < columnNames.length; k++) {
+ if (columnNames[k].equals(property)) {
+ type.eSet(getTableColumnEAttributes()[k],
+ (String) value);
+ break;
+ }
+ }
+
+ if (item != null) {
+ String[] tableTextData = getTableText(type);
+ item.setText(tableTextData);
+ }
+
+ getManagedForm();
+
+ markDirty();
+ }
+ };
+ return cellModifier;
+ }
+
+ protected void createRemoveButton(FormToolkit toolkit, Composite buttonComp) {
+ Button del = toolkit
+ .createButton(buttonComp, Messages.remove, SWT.NONE);
+ del.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ int[] selectedIndices = table.getSelectionIndices();
+ for (int i = 0; i < selectedIndices.length; i++) {
+ TableItem tableItem = table.getItem(selectedIndices[i]);
+ EObject type = (EObject) (tableItem.getData());
+ table.remove(selectedIndices[i]);
+ ((EList) plan.eGet(getEReference())).remove(type);
+ markDirty();
+ }
+ }
+ });
+ del.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ }
+
+ protected void createAddButton(FormToolkit toolkit, Composite buttonComp) {
+ Button add = toolkit.createButton(buttonComp, Messages.add, SWT.NONE);
+ add.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ TableItem item = new TableItem(table, SWT.NONE);
+ String defaultName = "NewRef";
+ String[] s = new String[] { defaultName, "", "" };
+
+ EObject type = getEFactory().create(
+ getTableColumnEAttributes()[0].getEContainingClass());
+
+ type.eSet(getTableColumnEAttributes()[0], defaultName);
+
+ ((EList) plan.eGet(getEReference())).add(type);
+
+ item.setText(s);
+ item.setData(type);
+ markDirty();
+ }
+ });
+ add.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ }
+
+ protected String[] getTableText(EObject eObject) {
+ List tableText = new ArrayList();
+ for (int i = 0; i < getTableColumnEAttributes().length; i++) {
+ String value = (String) eObject
+ .eGet(getTableColumnEAttributes()[i]);
+ if (value != null) {
+ tableText.add(value);
+ } else {
+ tableText.add("");
+ }
+ }
+ return (String[]) tableText.toArray(new String[tableText.size()]);
+ }
+
+ /**
+ * @return
+ */
+ abstract protected String getTitle();
+
+ /**
+ * @return
+ */
+ abstract protected String getDescription();
+
+ /**
+ * @return
+ */
+ abstract protected EFactory getEFactory();
+
+ /**
+ * @return
+ */
+ abstract protected EReference getEReference();
+
+ /**
+ * @return
+ */
+ abstract protected String[] getTableColumnNames();
+
+ /**
+ * @return
+ */
+ abstract protected EAttribute[] getTableColumnEAttributes();
+
+}
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,82 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.sections;
+
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.xml.ns.naming.NamingFactory;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.apache.geronimo.xml.ns.web.WebFactory;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class EjbLocalRefSection extends DynamicTableSection {
+
+ public EjbLocalRefSection(WebAppType plan, Composite parent,
+ FormToolkit toolkit, int style) {
+ super(plan, parent, toolkit, style);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTitle()
+ */
+ protected String getTitle() {
+ return Messages.editorEjbLocalRefTitle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getDescription()
+ */
+ protected String getDescription() {
+ return Messages.editorEjbLocalRefDescription;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEFactory()
+ */
+ protected EFactory getEFactory() {
+ return NamingFactory.eINSTANCE;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEReference()
+ */
+ protected EReference getEReference() {
+ return WebFactory.eINSTANCE.getWebPackage().getWebAppType_EjbLocalRef();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnNames()
+ */
+ protected String[] getTableColumnNames() {
+ return new String[] { Messages.editorEjbLocalRefTargetName,
+ Messages.editorEjbLocalRefEjbLink };
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnEAttributes()
+ */
+ protected EAttribute[] getTableColumnEAttributes() {
+ return new EAttribute[] {
+ NamingPackage.eINSTANCE.getEjbLocalRefType_TargetName(),
+ NamingPackage.eINSTANCE.getEjbLocalRefType_EjbLink() };
+ }
+
+}
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,45 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.sections;
+
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.SectionPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class EjbRefSection extends SectionPart {
+
+ WebAppType plan;
+
+ public EjbRefSection(Section section) {
+ super(section);
+ // TODO Auto-generated constructor stub
+ }
+
+ public EjbRefSection(Composite parent, FormToolkit toolkit, int style) {
+ super(parent, toolkit, style);
+ createClient(getSection(), toolkit);
+ }
+
+ public void setPlan(WebAppType plan) {
+ this.plan = plan;
+ }
+
+ private void createClient(Section section, FormToolkit toolkit) {
+
+ }
+}
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,83 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.sections;
+
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.xml.ns.naming.NamingFactory;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.apache.geronimo.xml.ns.web.WebFactory;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ResourceEnvRefSection extends DynamicTableSection {
+
+ public ResourceEnvRefSection(WebAppType plan, Composite parent,
+ FormToolkit toolkit, int style) {
+ super(plan, parent, toolkit, style);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTitle()
+ */
+ protected String getTitle() {
+ return Messages.editorResourceEnvRefTitle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getDescription()
+ */
+ protected String getDescription() {
+ return Messages.editorResourceEnvRefDescription;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEFactory()
+ */
+ protected EFactory getEFactory() {
+ return NamingFactory.eINSTANCE;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEReference()
+ */
+ protected EReference getEReference() {
+ return WebFactory.eINSTANCE.getWebPackage()
+ .getWebAppType_ResourceEnvRef();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnNames()
+ */
+ protected String[] getTableColumnNames() {
+ return new String[] { Messages.editorResEnvRefNameTitle,
+ Messages.editorResEnvRefMsgDestTitle };
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnEAttributes()
+ */
+ protected EAttribute[] getTableColumnEAttributes() {
+ return new EAttribute[] {
+ NamingPackage.eINSTANCE.getResourceEnvRefType_RefName(),
+ NamingPackage.eINSTANCE
+ .getResourceEnvRefType_MessageDestinationLink() };
+ }
+
+}
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
------------------------------------------------------------------------------
svn:executable = *
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java?rev=233044&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java Tue Aug 16 12:46:27 2005
@@ -0,0 +1,83 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * 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.ui.sections;
+
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.xml.ns.naming.NamingFactory;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.apache.geronimo.xml.ns.web.WebFactory;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ResourceRefSection extends DynamicTableSection {
+
+ public ResourceRefSection(WebAppType plan, Composite parent,
+ FormToolkit toolkit, int style) {
+ super(plan, parent, toolkit, style);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTitle()
+ */
+ protected String getTitle() {
+ return Messages.editorResourceRefTitle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getDescription()
+ */
+ protected String getDescription() {
+ return Messages.editorResourceRefDescription;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEFactory()
+ */
+ protected EFactory getEFactory() {
+ return NamingFactory.eINSTANCE;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEReference()
+ */
+ protected EReference getEReference() {
+ return WebFactory.eINSTANCE.getWebPackage().getWebAppType_ResourceRef();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnNames()
+ */
+ protected String[] getTableColumnNames() {
+ return new String[] { Messages.editorResRefNameTitle,
+ Messages.editorResRefLinkTitle,
+ Messages.editorResRefTargetNameTitle };
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnEAttributes()
+ */
+ protected EAttribute[] getTableColumnEAttributes() {
+ return new EAttribute[] {
+ NamingPackage.eINSTANCE.getResourceRefType_RefName(),
+ NamingPackage.eINSTANCE.getResourceRefType_ResourceLink(),
+ NamingPackage.eINSTANCE.getResourceRefType_TargetName() };
+ }
+
+}
Propchange: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
------------------------------------------------------------------------------
svn:executable = *