geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r818339 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui: META-INF/MANIFEST.MF src/org/apache/geronimo/st/v11/ui/editors/ src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
Date Thu, 24 Sep 2009 01:37:38 GMT
Author: delos
Date: Thu Sep 24 01:37:37 2009
New Revision: 818339

URL: http://svn.apache.org/viewvc?rev=818339&view=rev
Log:
GERONIMODEVTOOLS-578 adding new content loader for 11 server adapter

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF?rev=818339&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/META-INF/MANIFEST.MF
Thu Sep 24 01:37:37 2009
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Geronimo Server Tools V11 UI Plug-in
+Bundle-SymbolicName: org.apache.geronimo.st.v11.ui;singleton:=true
+Bundle-Version: 2.2.0
+Bundle-Activator: org.apache.geronimo.st.v21.ui.Activator
+Bundle-Vendor: Apache.org
+Require-Bundle: org.apache.geronimo.runtime.common,
+ org.apache.geronimo.runtime.v11;bundle-version="2.2.0",
+ org.apache.geronimo.st.ui,
+ org.apache.geronimo.st.v21.ui,
+ org.apache.geronimo.j2ee.v11.jaxbmodel,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.commands,
+ org.eclipse.ui.forms,
+ org.eclipse.core.resources,
+ org.eclipse.wst.common.project.facet.ui,
+ org.apache.geronimo.st.v11.core,
+ org.apache.geronimo.st.v21.core,
+ org.eclipse.wst.server.ui,
+ org.eclipse.wst.server.core
+Bundle-ActivationPolicy: lazy
+Import-Package: org.apache.geronimo.st.v21.core.jaxb

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java?rev=818339&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/editors/GeronimoFormContentLoader.java
Thu Sep 24 01:37:37 2009
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.editors;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader;
+import org.apache.geronimo.st.v11.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.core.GeronimoV11Utils;
+import org.apache.geronimo.st.v11.ui.pages.AppClientGeneralPage;
+import org.apache.geronimo.st.v11.ui.pages.AppGeneralPage;
+import org.apache.geronimo.st.v11.ui.pages.ConnectorOverviewPage;
+import org.apache.geronimo.st.v11.ui.pages.DeploymentPage;
+import org.apache.geronimo.st.v11.ui.pages.EjbOverviewPage;
+import org.apache.geronimo.st.v11.ui.pages.NamingFormPage;
+import org.apache.geronimo.st.v11.ui.pages.SecurityPage;
+import org.apache.geronimo.st.v11.ui.pages.WebGeneralPage;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoFormContentLoader extends AbstractGeronimoFormContentLoader {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addApplicationPlanPages(org.eclipse.ui.forms.editor.FormEditor)
+     */
+    public void addApplicationPlanPages(FormEditor editor) throws PartInitException {
+        editor.addPage(new AppGeneralPage(editor, "appgeneralpage", CommonMessages.editorTabGeneral));
+        editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addConnectorPlanPages(org.eclipse.ui.forms.editor.FormEditor)
+     */
+    public void addConnectorPlanPages(FormEditor editor) throws PartInitException {
+        editor.addPage(new ConnectorOverviewPage(editor, "connectoroverview", CommonMessages.editorTabGeneral));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addApplicationPlanPages(org.eclipse.ui.forms.editor.FormEditor)
+     */
+    public void addApplicationClientPlanPages(FormEditor editor) throws PartInitException
{
+        editor.addPage(new AppClientGeneralPage(editor, "appclientgeneralpage", CommonMessages.editorTabGeneral));
+        editor.addPage(createNamingFormPage(editor));
+        //editor.addPage(new AppClientSecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addOpenEjbPlanPages()
+     */
+    public void addOpenEjbPlanPages(FormEditor editor) throws PartInitException {
+        editor.addPage(new EjbOverviewPage(editor, "ejboverview", CommonMessages.editorTabGeneral));
+        editor.addPage(createNamingFormPage(editor));
+        editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader#addWebPlanPages()
+     */
+    public void addWebPlanPages(FormEditor editor) throws PartInitException {
+        AbstractGeronimoDeploymentPlanEditor geronimoEditor = (AbstractGeronimoDeploymentPlanEditor)editor;
+        JAXBElement plan = geronimoEditor.getDeploymentPlan();
+        editor.addPage(new WebGeneralPage(editor, "generalpage", CommonMessages.editorTabGeneral));
+        editor.addPage(createNamingFormPage(editor));
+        editor.addPage(new SecurityPage(editor, "securitypage", CommonMessages.editorTabSecurity));
+        editor.addPage(createDeploymentFormPage(editor));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.editors.IGeronimoFormContentLoader#loadDeploymentPlan(org.eclipse.core.resources.IFile)
+     */
+    public JAXBElement loadDeploymentPlan(IFile file) throws Exception {
+        return GeronimoV11Utils.getDeploymentPlan(file);
+    }
+    
+    public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws Exception
{
+        JAXBUtils.marshalDeploymentPlan(deploymentPlan, file);
+    }
+
+    private NamingFormPage createNamingFormPage(FormEditor editor) {
+        return new NamingFormPage(editor, "namingpage", CommonMessages.editorTabNaming);
+    }
+
+    private DeploymentPage createDeploymentFormPage(FormEditor editor) {
+        return new DeploymentPage(editor, "deploymentpage", CommonMessages.editorTabDeployment);
+    }
+
+    public void triggerGeronimoServerInfoUpdate() {
+        GeronimoServerInfo.getInstance().updateInfo();
+    }
+}



Mime
View raw message