You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2008/06/18 03:40:31 UTC
svn commit: r669048 - in /geronimo/devtools/eclipse-plugin/trunk/plugins:
org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/
org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/
org.apache.geronim...
Author: mcconne
Date: Tue Jun 17 18:40:31 2008
New Revision: 669048
URL: http://svn.apache.org/viewvc?rev=669048&view=rev
Log:
GERONIMODEVTOOLS-369 Add ability to add dependencies for server-sode in the app client deployment plan editor -- Thanks to BJ Reed for the patch !!
Added:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientDeploymentPage.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientClientDependencySection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerDependencySection.java (with props)
Modified:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.properties
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerGeneralSection.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.java?rev=669048&r1=669047&r2=669048&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.java Tue Jun 17 18:40:31 2008
@@ -134,6 +134,10 @@
//
public static String editorSectionDependenciesTitle;
public static String editorSectionDependenciesDescription;
+ public static String editorSectionClientDependenciesTitle;
+ public static String editorSectionClientDependenciesDescription;
+ public static String editorSectionServerDependenciesTitle;
+ public static String editorSectionServerDependenciesDescription;
//
public static String editorSectionImportTitle;
public static String editorSectionImportDescription;
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.properties?rev=669048&r1=669047&r2=669048&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.properties (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Messages.properties Tue Jun 17 18:40:31 2008
@@ -41,6 +41,10 @@
editorSectionDependenciesTitle=Dependencies
editorSectionDependenciesDescription=The following dependencies are defined as common libraries.
+editorSectionClientDependenciesTitle=Client Dependencies
+editorSectionClientDependenciesDescription=The following client dependencies are defined as common libraries.
+editorSectionServerDependenciesTitle=Server Dependencies
+editorSectionServerDependenciesDescription=The following server dependencies are defined as common libraries.
editorSectionImportTitle=Imports
editorSectionImportDescription=The following configurations are imported into this plan.
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java?rev=669048&r1=669047&r2=669048&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/jaxb/JAXBModelUtils.java Tue Jun 17 18:40:31 2008
@@ -92,9 +92,6 @@
else if (Connector.class.isInstance (plan)) {
return ((Connector)plan).getEnvironment() == null ? null : ((Connector)plan).getEnvironment();
}
- else if (ApplicationClient.class.isInstance (plan)) {
- return ((ApplicationClient)plan).getClientEnvironment() == null ? null : ((ApplicationClient)plan).getClientEnvironment();
- }
return null;
}
@@ -112,11 +109,38 @@
else if (Connector.class.isInstance (plan)) {
((Connector)plan).setEnvironment (environment);
}
- else if (ApplicationClient.class.isInstance (plan)) {
+ }
+
+ public static Environment getClientEnvironment(JAXBElement element) {
+ Object plan = element.getValue();
+ if (ApplicationClient.class.isInstance (plan)) {
+ return ((ApplicationClient)plan).getClientEnvironment() == null ? null : ((ApplicationClient)plan).getClientEnvironment();
+ }
+ return null;
+ }
+
+ public static void setClientEnvironment (JAXBElement element, Environment environment) {
+ Object plan = element.getValue();
+ if (ApplicationClient.class.isInstance (plan)) {
((ApplicationClient)plan).setClientEnvironment (environment);
}
}
+ public static Environment getServerEnvironment(JAXBElement element) {
+ Object plan = element.getValue();
+ if (ApplicationClient.class.isInstance (plan)) {
+ return ((ApplicationClient)plan).getServerEnvironment() == null ? null : ((ApplicationClient)plan).getServerEnvironment();
+ }
+ return null;
+ }
+
+ public static void setServerEnvironment (JAXBElement element, Environment environment) {
+ Object plan = element.getValue();
+ if (ApplicationClient.class.isInstance (plan)) {
+ ((ApplicationClient)plan).setServerEnvironment (environment);
+ }
+ }
+
public static List getGbeans (JAXBElement element) {
Object plan = element.getValue();
if (WebApp.class.isInstance (plan)) {
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java?rev=669048&r1=669047&r2=669048&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java Tue Jun 17 18:40:31 2008
@@ -26,6 +26,7 @@
import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
import org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader;
import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
+import org.apache.geronimo.st.v21.ui.pages.AppClientDeploymentPage;
import org.apache.geronimo.st.v21.ui.pages.AppClientGeneralPage;
import org.apache.geronimo.st.v21.ui.pages.AppGeneralPage;
import org.apache.geronimo.st.v21.ui.pages.ConnectorOverviewPage;
@@ -70,7 +71,7 @@
editor.addPage(new AppClientGeneralPage(editor, "appgeneralpage", CommonMessages.editorTabGeneral));
editor.addPage(createNamingFormPage(editor));
//editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
- editor.addPage(createDeploymentFormPage(editor));
+ editor.addPage(new AppClientDeploymentPage(editor, "deploymentpage", CommonMessages.editorTabDeployment));
}
/*
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientDeploymentPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientDeploymentPage.java?rev=669048&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientDeploymentPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientDeploymentPage.java Tue Jun 17 18:40:31 2008
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.pages;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v21.ui.sections.AppClientClientDependencySection;
+import org.apache.geronimo.st.v21.ui.sections.AppClientServerDependencySection;
+import org.apache.geronimo.st.v21.ui.sections.GBeanSection;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+public class AppClientDeploymentPage extends DeploymentPage {
+
+ public AppClientDeploymentPage(FormEditor editor, String id, String title) {
+ super(editor, id, title);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void fillBody(IManagedForm managedForm) {
+ managedForm.addPart(new AppClientClientDependencySection(getDeploymentPlan(), JAXBModelUtils.getClientEnvironment(getDeploymentPlan()), body, toolkit, getStyle()));
+ managedForm.addPart(new AppClientServerDependencySection(getDeploymentPlan(), JAXBModelUtils.getServerEnvironment(getDeploymentPlan()), body, toolkit, getStyle()));
+ managedForm.addPart(new GBeanSection(getDeploymentPlan(), JAXBModelUtils.getGbeans(getDeploymentPlan()), body, toolkit, getStyle()));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+ */
+ public String getFormTitle() {
+ return CommonMessages.deploymentPageTitle;
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientDeploymentPage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientDeploymentPage.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientDeploymentPage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientClientDependencySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientClientDependencySection.java?rev=669048&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientClientDependencySection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientClientDependencySection.java Tue Jun 17 18:40:31 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.jee.deployment.Environment;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class AppClientClientDependencySection extends DependencySection {
+
+ /**
+ * @param plan
+ * @param parent
+ * @param toolkit
+ * @param style
+ */
+ public AppClientClientDependencySection(JAXBElement plan, Environment environment, Composite parent, FormToolkit toolkit, int style) {
+ super(plan, environment, parent, toolkit, style);
+ }
+
+ public String getTitle() {
+ return CommonMessages.editorSectionClientDependenciesTitle;
+ }
+
+ public String getDescription() {
+ return CommonMessages.editorSectionClientDependenciesDescription;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientClientDependencySection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientClientDependencySection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientClientDependencySection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerDependencySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerDependencySection.java?rev=669048&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerDependencySection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerDependencySection.java Tue Jun 17 18:40:31 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.jee.deployment.Environment;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class AppClientServerDependencySection extends DependencySection {
+
+ /**
+ * @param plan
+ * @param parent
+ * @param toolkit
+ * @param style
+ */
+ public AppClientServerDependencySection(JAXBElement plan, Environment environment, Composite parent, FormToolkit toolkit, int style) {
+ super(plan, environment, parent, toolkit, style);
+ }
+
+ public String getTitle() {
+ return CommonMessages.editorSectionServerDependenciesTitle;
+ }
+
+ public String getDescription() {
+ return CommonMessages.editorSectionServerDependenciesDescription;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerDependencySection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerDependencySection.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerDependencySection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerGeneralSection.java?rev=669048&r1=669047&r2=669048&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AppClientServerGeneralSection.java Tue Jun 17 18:40:31 2008
@@ -34,15 +34,6 @@
createClient();
}
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.v21.ui.sections.CommonGeneralSection#getEnvironmentEReference()
- */
- protected JAXBElement getEnvironmentEReference() {
- return null; //ApplicationPackage.eINSTANCE.getApplicationType_Environment();
- }
-
protected Environment getEnvironment(boolean create) {
Environment type = null;
Object plan = getPlan().getValue();
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java?rev=669048&r1=669047&r2=669048&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ConnectorGeneralSection.java Tue Jun 17 18:40:31 2008
@@ -1,38 +1,34 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.st.v21.ui.sections;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.jee.connector.Connector;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-public class ConnectorGeneralSection extends CommonGeneralSection {
-
- Connector plan;
-
- public ConnectorGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
- super(parent, toolkit, style, plan);
- this.plan = (Connector) plan.getValue();
- createClient();
- }
-
- protected JAXBElement getEnvironmentEReference() {
- return null; //ConnectorPackage.eINSTANCE.getConnectorType_Environment();
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.jee.connector.Connector;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ConnectorGeneralSection extends CommonGeneralSection {
+
+ Connector plan;
+
+ public ConnectorGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+ super(parent, toolkit, style, plan);
+ this.plan = (Connector) plan.getValue();
+ createClient();
+ }
+}
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java?rev=669048&r1=669047&r2=669048&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java Tue Jun 17 18:40:31 2008
@@ -36,7 +36,7 @@
public class DependencySection extends AbstractTableSection {
- private Environment environment;
+ protected Environment environment;
/**
* @param plan
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java?rev=669048&r1=669047&r2=669048&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java Tue Jun 17 18:40:31 2008
@@ -24,6 +24,8 @@
import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
import org.apache.geronimo.st.v21.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v21.ui.sections.AppClientClientDependencySection;
+import org.apache.geronimo.st.v21.ui.sections.AppClientServerDependencySection;
import org.apache.geronimo.jee.deployment.Dependency;
import org.apache.geronimo.jee.deployment.Dependencies;
import org.apache.geronimo.jee.deployment.Environment;
@@ -68,10 +70,21 @@
eObject = getEFactory().create(Dependency.class);
JAXBElement plan = section.getPlan();
- Environment environment = JAXBModelUtils.getEnvironment(plan);
+ Environment environment = null;
+ if (AppClientClientDependencySection.class.isInstance(section))
+ environment = JAXBModelUtils.getClientEnvironment(plan);
+ else if (AppClientServerDependencySection.class.isInstance(section))
+ environment = JAXBModelUtils.getServerEnvironment(plan);
+ else
+ environment = JAXBModelUtils.getEnvironment(plan);
if (environment == null) {
environment = (Environment)getEFactory().create(Environment.class);
- JAXBModelUtils.setEnvironment (plan, environment);
+ if (AppClientClientDependencySection.class.isInstance(section))
+ JAXBModelUtils.setClientEnvironment (plan, environment);
+ else if (AppClientServerDependencySection.class.isInstance(section))
+ JAXBModelUtils.setServerEnvironment (plan, environment);
+ else
+ JAXBModelUtils.setEnvironment (plan, environment);
}
Dependencies dependencies = environment.getDependencies();