geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r818883 [3/7] - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.runtime.v11/ org.apache.geronimo.st.v11.core/ org.apache.geronimo.st.v11.core/src/main/ org.apache.geronimo.st.v11.core/src/main/java/ org.apache.geroni...
Date Fri, 25 Sep 2009 15:26:17 GMT
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/EjbOverviewPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/EjbOverviewPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/EjbOverviewPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/EjbOverviewPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,49 @@
+/*
+ * 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.pages;
+
+import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.ui.sections.OpenEjbJarCMPSection;
+import org.apache.geronimo.st.v11.ui.sections.OpenEjbJarGeneralSection;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EjbOverviewPage extends AbstractGeronimoFormPage {
+
+    public EjbOverviewPage(FormEditor editor, String id, String title) {
+        super(editor, id, title);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
+     */
+    protected void fillBody(IManagedForm managedForm) {
+        managedForm.addPart(new OpenEjbJarGeneralSection(body, toolkit, getStyle(), getDeploymentPlan()));
+        managedForm.addPart(new OpenEjbJarCMPSection(body, toolkit, getStyle(), getDeploymentPlan()));
+    }
+
+    @Override
+    protected void triggerGeronimoServerInfoUpdate() {
+        GeronimoServerInfo.getInstance().updateInfo();
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/NamingFormPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/NamingFormPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/NamingFormPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/NamingFormPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,99 @@
+/*
+ * 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.pages;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.ui.sections.EjbLocalRefSection;
+import org.apache.geronimo.st.v11.ui.sections.EjbRefSection;
+import org.apache.geronimo.st.v11.ui.sections.EjbRelationSection;
+import org.apache.geronimo.st.v11.ui.sections.GBeanRefSection;
+import org.apache.geronimo.st.v11.ui.sections.MessageDestSection;
+import org.apache.geronimo.st.v11.ui.sections.ResourceEnvRefSection;
+import org.apache.geronimo.st.v11.ui.sections.ResourceRefSection;
+import org.apache.geronimo.st.v11.ui.sections.ServiceRefSection;
+import org.apache.geronimo.xml.ns.j2ee.application_client_1.ApplicationClientType;
+import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.openejb.xml.ns.openejb_jar_2.OpenejbJarType;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class NamingFormPage extends AbstractGeronimoFormPage {
+
+    public NamingFormPage(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) {
+        if (WebAppType.class.isInstance (getDeploymentPlan().getValue())) {
+            WebAppType webapp = (WebAppType)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
+            managedForm.addPart(new EjbRefSection(getDeploymentPlan(), body, toolkit, getStyle(), webapp.getEjbRef()));
+            managedForm.addPart(new ResourceRefSection(getDeploymentPlan(), body, toolkit, getStyle(), webapp.getResourceRef()));
+            managedForm.addPart(new ServiceRefSection(getDeploymentPlan(), body, toolkit, getStyle(), webapp.getServiceRef()));
+            managedForm.addPart(new ResourceEnvRefSection(getDeploymentPlan(), body, toolkit, getStyle(), webapp.getResourceEnvRef()));
+            managedForm.addPart(new EjbLocalRefSection(getDeploymentPlan(), body, toolkit, getStyle(), webapp.getEjbLocalRef()));
+            managedForm.addPart(new GBeanRefSection(getDeploymentPlan(), body, toolkit, getStyle(), webapp.getGbeanRef()));
+            managedForm.addPart(new MessageDestSection(getDeploymentPlan(), body, toolkit, getStyle(), webapp.getMessageDestination()));
+        }
+        else if (ApplicationClientType.class.isInstance (getDeploymentPlan().getValue())){
+        	ApplicationClientType appClient = (ApplicationClientType)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
+            managedForm.addPart(new EjbRefSection(getDeploymentPlan(), body, toolkit, getStyle(), appClient.getEjbRef()));
+            managedForm.addPart(new ResourceRefSection(getDeploymentPlan(), body, toolkit, getStyle(), appClient.getResourceRef()));
+            managedForm.addPart(new ServiceRefSection(getDeploymentPlan(), body, toolkit, getStyle(), appClient.getServiceRef()));
+            managedForm.addPart(new ResourceEnvRefSection(getDeploymentPlan(), body, toolkit, getStyle(), appClient.getResourceEnvRef()));
+            managedForm.addPart(new GBeanRefSection(getDeploymentPlan(), body, toolkit, getStyle(), appClient.getGbeanRef()));
+            managedForm.addPart(new MessageDestSection(getDeploymentPlan(), body, toolkit, getStyle(), appClient.getMessageDestination()));
+        }
+        else if (OpenejbJarType.class.isInstance (getDeploymentPlan().getValue())){
+        	OpenejbJarType ejbJar = (OpenejbJarType)((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan().getValue();
+            managedForm.addPart(new EjbRelationSection(getDeploymentPlan(), body, toolkit, getStyle(), ejbJar.getRelationships()));
+            managedForm.addPart(new MessageDestSection(getDeploymentPlan(), body, toolkit, getStyle(), ejbJar.getMessageDestination()));
+        }
+    }
+    
+    protected GridLayout getLayout() {
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 1;
+        layout.horizontalSpacing = 20;
+        return layout;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+     */
+    public String getFormTitle() {
+        return CommonMessages.namingFormPageTitle;
+    }
+
+    @Override
+    protected void triggerGeronimoServerInfoUpdate() {
+        GeronimoServerInfo.getInstance().updateInfo();
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/SecurityPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/SecurityPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/SecurityPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/SecurityPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,71 @@
+/*
+ * 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.pages;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.ui.sections.SecurityRoleMappingSection;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class SecurityPage extends AbstractGeronimoFormPage {
+
+    public SecurityPage(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 SecurityRoleMappingSection(getDeploymentPlan(), getDeploymentDescriptor(), body, toolkit, getStyle()));
+     //   managedForm.addPart(new SecurityAdvancedSection(getDeploymentPlan(), body, toolkit, getStyle()));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getLayout()
+     */
+    protected GridLayout getLayout() {
+        GridLayout layout = super.getLayout();
+        layout.numColumns = 1;
+        return layout;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+     */
+    public String getFormTitle() {
+        return CommonMessages.securityPageTitle;
+    }
+
+    @Override
+    protected void triggerGeronimoServerInfoUpdate() {
+        GeronimoServerInfo.getInstance().updateInfo();
+    }
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/WebGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/WebGeneralPage.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/WebGeneralPage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/pages/WebGeneralPage.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,59 @@
+/*
+ * 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.pages;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.ui.sections.WebContainerSection;
+import org.apache.geronimo.st.v11.ui.sections.WebGeneralSection;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WebGeneralPage extends AbstractGeronimoFormPage {
+
+    public WebGeneralPage(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 WebGeneralSection(body, toolkit, getStyle(), getDeploymentPlan()));
+        managedForm.addPart(new WebContainerSection(body, toolkit, getStyle(), getDeploymentPlan()));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#getFormTitle()
+     */
+    public String getFormTitle() {
+        return CommonMessages.webGeneralPageTitle;
+    }
+
+    @Override
+    protected void triggerGeronimoServerInfoUpdate() {
+        GeronimoServerInfo.getInstance().updateInfo();
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AdminObjectSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AdminObjectSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AdminObjectSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AdminObjectSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,163 @@
+/*
+ * 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.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.AdminObjectWizard;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.AdminobjectInstanceType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.AdminobjectType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ConfigPropertySettingType;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev: 705268 $ $Date: 2008-10-16 23:54:29 +0800 (Thu, 16 Oct 2008) $
+ */
+public class AdminObjectSection extends AbstractTreeSection {
+    public AdminObjectSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List adminObjects) {
+        super(plan, parent, toolkit, style);
+        this.objectContainer = adminObjects;
+        createClient();
+    }
+
+    @Override
+    public String getTitle() {
+        return CommonMessages.editorSectionAdminObjectTitle;
+    }
+
+    @Override
+    public String getDescription() {
+        return CommonMessages.editorSectionAdminObjectDescription;
+    }
+
+    @Override
+    public Wizard getWizard() {
+        return new AdminObjectWizard(this);
+    }
+
+    @Override
+    public Class getTableEntryObjectType() {
+        return AdminobjectType.class;
+    }
+
+    @Override
+    protected void activateAddButton() {
+        if (tree.getSelectionCount() == 0 || tree.getSelection()[0].getParentItem() == null ||
+            tree.getSelection()[0].getParentItem().getParentItem() == null) {
+            addButton.setEnabled(true);
+        } else {
+            addButton.setEnabled(false);
+        }
+    }
+
+    public Object getSelectedObject () {
+        if (tree.getSelection().length == 0) {
+            return null;
+        }
+        return tree.getSelection()[0].getData();
+    }
+
+    @Override
+    public void removeItem(Object anItem) {
+        if (AdminobjectType.class.isInstance(anItem)) {
+            getObjectContainer().remove(anItem);
+        }
+        else if (AdminobjectInstanceType.class.isInstance(anItem)) {
+        	AdminobjectType admin = (AdminobjectType)tree.getSelection()[0].getParentItem().getData();
+            admin.getAdminobjectInstance().remove(anItem);
+        }
+        else if (ConfigPropertySettingType.class.isInstance(anItem)) {
+        	AdminobjectInstanceType aoInstance = (AdminobjectInstanceType)tree.getSelection()[0].getParentItem().getData();
+            aoInstance.getConfigPropertySetting().remove(anItem);
+        }
+    }
+    
+    @Override
+    public Object getInput() {
+        if (objectContainer != null) {
+            return objectContainer;
+        }
+        return super.getInput();
+    }
+
+    @Override
+    public ITreeContentProvider getContentProvider() {
+        return new ContentProvider() {
+            @Override
+            public Object[] getElements(Object inputElement) {
+                return getChildren(inputElement);
+            }
+
+            @Override
+            public Object[] getChildren(Object parentElement) {
+                if (List.class.isInstance(parentElement)) {
+                    return ((List)parentElement).toArray();
+                }
+                if (AdminobjectType.class.isInstance(parentElement)) {
+                    AdminobjectType admin = (AdminobjectType)parentElement;
+                    return admin.getAdminobjectInstance().toArray();
+                }
+                if (AdminobjectInstanceType.class.isInstance(parentElement)) {
+                    AdminobjectInstanceType aoInstance = (AdminobjectInstanceType)parentElement;
+                    return aoInstance.getConfigPropertySetting().toArray();
+                }
+                return new String[] {};
+            }
+        };
+    }
+
+    @Override
+    public ILabelProvider getLabelProvider() {
+        return new LabelProvider() {
+            @Override
+            public String getText(Object element) {
+                if (AdminobjectType.class.isInstance(element)) {
+                	AdminobjectType admin = (AdminobjectType)element;
+                    return "Admin Object: interface = \"" + admin.getAdminobjectInterface() +
+                            "\", class = \"" + admin.getAdminobjectClass() + "\"";
+                }
+                if (AdminobjectInstanceType.class.isInstance(element)) {
+                	AdminobjectInstanceType aoInstance = (AdminobjectInstanceType)element;
+                    return "Admin Object Instance: message destination name = \"" + aoInstance.getMessageDestinationName() + "\"";
+                }
+                if (ConfigPropertySettingType.class.isInstance(element)) {
+                	ConfigPropertySettingType property = (ConfigPropertySettingType)element;
+                    return "Config Property Setting: name = \"" + property.getName() +
+                            "\", value = \"" + property.getValue() + "\"";
+                }
+
+                return null;
+            }
+
+            @Override
+            public Image getImage(Object arg0) {
+                return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee",
+                        "icons/full/obj16/module_web_obj.gif").createImage();
+            }
+        };
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientClientGeneralSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,95 @@
+/*
+ * 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.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.xml.ns.j2ee.application_client_1.ApplicationClientType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev: 672450 $ $Date: 2008-06-28 09:21:07 +0800 (Sat, 28 Jun 2008) $
+ */
+public class AppClientClientGeneralSection extends CommonGeneralSection {
+
+    protected Text callbackHandler;
+    protected Text realmName;
+    ApplicationClientType plan;
+
+    public AppClientClientGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+        super(parent, toolkit, style, plan);
+        this.plan = (ApplicationClientType) plan.getValue();
+        createClient();
+    }
+
+    protected void createClient() {
+        super.createClient();
+        Composite composite = (Composite) getSection().getClient();
+
+        createLabel(composite, CommonMessages.editorCallbackHandler);
+
+        callbackHandler = toolkit.createText(composite, plan.getCallbackHandler(), SWT.BORDER);
+        callbackHandler.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+        callbackHandler.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                plan.setCallbackHandler(callbackHandler.getText());
+                markDirty();
+            }
+        });
+
+        createLabel(composite, CommonMessages.editorRealmName);
+
+        realmName = toolkit.createText(composite, plan.getRealmName(), SWT.BORDER);
+        realmName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+        realmName.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                plan.setRealmName(realmName.getText());
+                markDirty();
+            }
+        });
+    }
+
+    protected EnvironmentType getEnvironment(boolean create) {
+        EnvironmentType type = null;
+        Object plan = getPlan().getValue();
+        if (ApplicationClientType.class.isInstance(plan)) {
+            type = ((ApplicationClientType) plan).getClientEnvironment();
+            if (type == null && create) {
+                type = getDeploymentObjectFactory().createEnvironmentType();
+                ((ApplicationClientType) plan).setClientEnvironment(type);
+            }
+        }
+
+        return type;
+    }
+
+    protected String getSectionGeneralTitle() {
+        return CommonMessages.editorSectionClientTitle;
+    }
+
+    protected String getSectionGeneralDescription() {
+        return CommonMessages.editorSectionClientDescription;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientSecuritySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientSecuritySection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientSecuritySection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientSecuritySection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,131 @@
+///*
+// * 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.sections;
+//
+//import javax.xml.bind.JAXBElement;
+//
+//import org.apache.geronimo.st.ui.CommonMessages;
+//import org.apache.geronimo.st.ui.sections.AbstractSectionPart;
+//import org.apache.geronimo.xml.ns.j2ee.application_client_1.ApplicationClientType;
+//import org.apache.geronimo.xml.ns.security_1.DescriptionType;
+//import org.apache.geronimo.xml.ns.security_1.ObjectFactory;
+//import org.eclipse.swt.SWT;
+//import org.eclipse.swt.events.ModifyEvent;
+//import org.eclipse.swt.events.ModifyListener;
+//import org.eclipse.swt.layout.GridData;
+//import org.eclipse.swt.layout.GridLayout;
+//import org.eclipse.swt.widgets.Composite;
+//import org.eclipse.swt.widgets.Text;
+//import org.eclipse.ui.forms.widgets.FormToolkit;
+//import org.eclipse.ui.forms.widgets.Section;
+//
+///**
+// * @version $Rev: 672450 $ $Date: 2008-06-28 09:21:07 +0800 (Sat, 28 Jun 2008) $
+// */
+//public class AppClientSecuritySection extends AbstractSectionPart {
+//
+//    protected Text realm;
+//
+//    protected Text subjectId;
+//
+//    protected Text description;
+//    
+//	ObjectFactory securityFactory;
+//    
+//    public AppClientSecuritySection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+//        super(parent, toolkit, style, plan);
+//        securityFactory = new ObjectFactory();
+//        createClient();
+//    }
+//
+//    protected void createClient() {
+//
+//        Section section = getSection();
+//
+//        section.setText(getSectionGeneralTitle());
+//        section.setDescription(getSectionGeneralDescription());
+//        section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+//
+//        Composite composite = toolkit.createComposite(section);
+//        GridLayout layout = new GridLayout();
+//        layout.numColumns = 2;
+//        layout.marginHeight = 5;
+//        layout.marginWidth = 10;
+//        layout.verticalSpacing = 5;
+//        layout.horizontalSpacing = 15;
+//        composite.setLayout(layout);
+//        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+//        section.setClient(composite);
+//
+//        createLabel(composite, CommonMessages.editorSubjectId);
+//
+//        subjectId = toolkit.createText(composite, getDefaultSubject().getId(), SWT.BORDER);
+//        subjectId.setLayoutData(createTextFieldGridData());
+//        subjectId.addModifyListener(new ModifyListener() {
+//            public void modifyText(ModifyEvent e) {
+//                getDefaultSubject().setId(subjectId.getText());
+//                markDirty();
+//            }
+//        });
+//
+//        createLabel(composite, CommonMessages.editorRealmName);
+//
+//        realm = toolkit.createText(composite, getDefaultSubject().getRealm(), SWT.BORDER);
+//        realm.setLayoutData(createTextFieldGridData());
+//        realm.addModifyListener(new ModifyListener() {
+//            public void modifyText(ModifyEvent e) {
+//                getDefaultSubject().setRealm(realm.getText());
+//                markDirty();
+//            }
+//        });
+//
+//        createLabel(composite, CommonMessages.description);
+//
+//        if (getDefaultSubject().getDescription().size() > 0)
+//            description = toolkit.createText(composite, getDefaultSubject().getDescription().get(0).getValue(), SWT.BORDER);
+//        else
+//            description = toolkit.createText(composite, "", SWT.BORDER);
+//        description.setLayoutData(createTextFieldGridData());
+//        description.addModifyListener(new ModifyListener() {
+//            public void modifyText(ModifyEvent e) {
+//            	DescriptionType descText = securityFactory.createDescription();
+//            	descText.setValue(description.getText());
+//            	getDefaultSubject().getDescription().clear();
+//                getDefaultSubject().getDescription().add(descText);
+//                markDirty();
+//            }
+//        });
+//    }
+//
+//    private SubjectInfo getDefaultSubject () {
+//    	ApplicationClientType client = (ApplicationClientType)getPlan().getValue();
+//    	SubjectInfo subjectInfo = client.getDefaultPrincipal().getLoginDomainPrincipal();
+//    	if (subjectInfo == null) {
+//    	    subjectInfo = securityFactory.createSubjectInfo();
+//    	    client.setDefaultSubject(subjectInfo);
+//    	}
+//    	return subjectInfo;
+//    }
+//
+//    protected String getSectionGeneralTitle() {
+//        return CommonMessages.editorSectionSecurityTitle;
+//    }
+//
+//    protected String getSectionGeneralDescription() {
+//        return CommonMessages.editorSectionSecurityDescription;
+//    }
+//}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppClientServerGeneralSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,61 @@
+/*
+ * 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.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.xml.ns.j2ee.application_client_1.ApplicationClientType;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev: 672450 $ $Date: 2008-06-28 09:21:07 +0800 (Sat, 28 Jun 2008) $
+ */
+public class AppClientServerGeneralSection extends CommonGeneralSection {
+
+	ApplicationClientType plan;
+
+	public AppClientServerGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+		super(parent, toolkit, style, plan);
+		this.plan = (ApplicationClientType) plan.getValue();
+		createClient();
+	}
+
+    protected EnvironmentType getEnvironment(boolean create) {
+    	EnvironmentType type = null;
+        Object plan = getPlan().getValue();
+        if (ApplicationClientType.class.isInstance(plan)) {
+            type = ((ApplicationClientType) plan).getServerEnvironment();
+            if (type == null && create) {
+                type = getDeploymentObjectFactory().createEnvironmentType();
+                ((ApplicationClientType) plan).setServerEnvironment(type);
+            }
+        }
+
+        return type;
+    }
+
+    protected String getSectionGeneralTitle() {
+        return CommonMessages.editorSectionServerTitle;
+    }
+
+    protected String getSectionGeneralDescription() {
+        return CommonMessages.editorSectionServerDescription;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,61 @@
+/*
+ * 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.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ApplicationType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class AppGeneralSection extends CommonGeneralSection {
+
+    protected Text applicationName;
+
+    ApplicationType plan;
+
+    public AppGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+        super(parent, toolkit, style, plan);
+        this.plan = (ApplicationType) plan.getValue();
+        createClient();
+    }
+
+    protected void createClient() {
+        super.createClient();
+        Composite composite = (Composite) getSection().getClient();
+
+        createLabel(composite, CommonMessages.editorApplicationName);
+
+        applicationName = toolkit.createText(composite, plan.getApplicationName(), SWT.BORDER);
+        applicationName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+        applicationName.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                plan.setApplicationName(applicationName.getText());
+                markDirty();
+            }
+        });
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ClassFilterSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,163 @@
+/*
+ * 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.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.ClassFilterWizard;
+import org.apache.geronimo.xml.ns.deployment_1.ClassFilterType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev: 688452 $ $Date: 2008-08-24 13:56:20 +0800 (Sun, 24 Aug 2008) $
+ */
+public class ClassFilterSection extends AbstractTableSection {
+
+    protected EnvironmentType environment;
+
+    protected boolean isServerEnvironment;
+
+    // isHiddenClasses = true for hidden classes or false for non overridable classes
+    protected boolean isHiddenClasses;
+
+    /**
+     * @param plan
+     * @param parent
+     * @param toolkit
+     * @param style
+     * @param envType
+     * @param classFilterType
+     */
+    public ClassFilterSection(JAXBElement plan, EnvironmentType environment, Composite parent, FormToolkit toolkit, int style, boolean isServerEnvironment, boolean isHiddenClasses) {
+        super(plan, parent, toolkit, style);
+        this.environment = environment;
+        this.isServerEnvironment = isServerEnvironment;
+        this.isHiddenClasses = isHiddenClasses; 
+        this.COLUMN_NAMES = new String[] {
+                CommonMessages.className
+        };
+        createClient();
+    }
+
+    public String getTitle() {
+        if (isServerEnvironment && isHiddenClasses)
+            return CommonMessages.editorSectionHiddenClassesTitle;
+        else if (!isServerEnvironment && isHiddenClasses)
+            return CommonMessages.editorSectionClientHiddenClassesTitle;
+        else if (isServerEnvironment && !isHiddenClasses)
+            return CommonMessages.editorSectionNonOverridableTitle;
+        else
+            return CommonMessages.editorSectionClientNonOverridableTitle;
+    }
+
+    public String getDescription() {
+        if (isServerEnvironment && isHiddenClasses)
+            return CommonMessages.editorSectionHiddenClassesDescription;
+        else if (!isServerEnvironment && isHiddenClasses)
+            return CommonMessages.editorSectionClientHiddenClassesDescription;
+        else if (isServerEnvironment && !isHiddenClasses)
+            return CommonMessages.editorSectionNonOverridableDescription;
+        else
+            return CommonMessages.editorSectionClientNonOverridableDescription;
+    }
+
+    public List getObjectContainer() {
+        if (environment == null) {
+            environment = (EnvironmentType)JAXBObjectFactoryImpl.getInstance().create(EnvironmentType.class);
+        }
+
+        if (getClassFilter() == null) {
+            ClassFilterType filter = (ClassFilterType)JAXBObjectFactoryImpl.getInstance().create(ClassFilterType.class);
+            setClassFilter (filter);
+        }
+        return getClassFilter().getFilter();
+    }
+
+    public Wizard getWizard() {
+        return new ClassFilterWizard(this, isServerEnvironment);
+    }
+
+    public ClassFilterType getClassFilter() {
+        if (isHiddenClasses == true)
+            return environment.getHiddenClasses();
+        else
+            return environment.getNonOverridableClasses();
+    }
+
+    public void setClassFilter (ClassFilterType filter) {
+        if (isHiddenClasses == true)
+            environment.setHiddenClasses (filter);
+        else
+            environment.setNonOverridableClasses (filter);
+    }
+    
+    public ImageDescriptor getImageDescriptor() {
+        return Activator.imageDescriptorFromPlugin("org.eclipse.jdt.ui", "icons/full/obj16/jar_obj.gif");
+    }
+
+    public Class getTableEntryObjectType() {
+        return String.class;
+    }
+
+    public Object getInput() {
+        if (environment != null) {
+            return getClassFilter();
+        }
+        return super.getInput();
+    }
+    
+    @Override
+    public IContentProvider getContentProvider() {
+        return new ContentProvider() {
+            @Override
+            public Object[] getElements(Object inputElement) {
+                if (!ClassFilterType.class.isInstance(inputElement)) {
+                    return new String[] { "" };
+                }
+                return ((ClassFilterType) inputElement).getFilter().toArray();
+            }
+        };
+    }
+
+    @Override
+    public ITableLabelProvider getLabelProvider() {
+        return new LabelProvider() {
+            @Override
+            public String getColumnText(Object element, int columnIndex) {
+                if (String.class.isInstance(element)) {
+                    switch (columnIndex) {
+                    case 0:
+                        return (String) element;
+                    }
+                }
+                return null;
+            }
+        };
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,363 @@
+/*
+ * 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.sections;
+
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.xml.ns.deployment_1.ObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractSectionPart;
+import org.apache.geronimo.xml.ns.deployment_1.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
+import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ApplicationType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType;
+import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+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.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.openejb.xml.ns.openejb_jar_2.OpenejbJarType;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class CommonGeneralSection extends AbstractSectionPart {
+
+    protected Text artifactTypeId;
+
+    protected Text groupId;
+
+    protected Text version;
+
+    protected Text type;
+
+    protected Button inverseClassLoading;
+
+    protected Button suppressDefaultEnv;
+    
+    protected Button sharedLibDepends;
+    
+    protected ObjectFactory deploymentObjectFactory = null;
+
+    public CommonGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+        super(parent, toolkit, style, plan);
+    }
+
+    protected void createClient() {
+
+        Section section = getSection();
+
+        section.setText(getSectionGeneralTitle());
+        section.setDescription(getSectionGeneralDescription());
+        section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+        Composite composite = toolkit.createComposite(section);
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        layout.marginHeight = 5;
+        layout.marginWidth = 10;
+        layout.verticalSpacing = 5;
+        layout.horizontalSpacing = 15;
+        composite.setLayout(layout);
+        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+        section.setClient(composite);
+
+        createLabel(composite, CommonMessages.groupId);
+
+        groupId = toolkit.createText(composite, getGroupId(), SWT.BORDER);
+        groupId.setLayoutData(createTextFieldGridData());
+        groupId.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getModuleId(true).setGroupId(groupId.getText());
+                markDirty();
+            }
+        });
+
+        createLabel(composite, CommonMessages.artifactType);
+
+        artifactTypeId = toolkit.createText(composite, getArtifactTypeId(), SWT.BORDER);
+        artifactTypeId.setLayoutData(createTextFieldGridData());
+        artifactTypeId.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getModuleId(true).setArtifactId(artifactTypeId.getText());
+                markDirty();
+            }
+        });
+
+        createLabel(composite, CommonMessages.version);
+
+        version = toolkit.createText(composite, getVersion(), SWT.BORDER);
+        version.setLayoutData(createTextFieldGridData());
+        version.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getModuleId(true).setVersion(version.getText());
+                markDirty();
+            }
+        });
+
+        createLabel(composite, CommonMessages.artifactType);
+
+        type = toolkit.createText(composite, getArtifactType(), SWT.BORDER);
+        type.setLayoutData(createTextFieldGridData());
+        type.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getModuleId(true).setType(type.getText());
+                markDirty();
+            }
+        });
+
+        inverseClassLoading = toolkit.createButton(composite, CommonMessages.inverseClassloading, SWT.CHECK);
+        inverseClassLoading.setSelection(isInverseClassloading());
+        GridData data = new GridData();
+        data.horizontalSpan = 2;
+        inverseClassLoading.setLayoutData(data);
+
+        inverseClassLoading.addSelectionListener(new SelectionListener() {
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+
+            public void widgetSelected(SelectionEvent e) {
+                setInverseClassloading(inverseClassLoading.getSelection());
+                markDirty();
+            }
+        });
+
+        suppressDefaultEnv = toolkit.createButton(composite, CommonMessages.supressDefaultEnv, SWT.CHECK);
+        suppressDefaultEnv.setSelection(isSuppressDefaultEnvironmentType());
+        data = new GridData();
+        data.horizontalSpan = 2;
+        suppressDefaultEnv.setLayoutData(data);
+
+        suppressDefaultEnv.addSelectionListener(new SelectionListener() {
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+
+            public void widgetSelected(SelectionEvent e) {
+                setSuppressDefaultEnvironmentType(suppressDefaultEnv.getSelection());
+                markDirty();
+            }
+        });
+        
+        sharedLibDepends = toolkit.createButton(composite, CommonMessages.sharedLibDepends, SWT.CHECK);
+        sharedLibDepends.setSelection(isSharedLibDependency());
+        data = new GridData();
+        data.horizontalSpan = 2;
+        sharedLibDepends.setLayoutData(data);
+
+        sharedLibDepends.addSelectionListener(new SelectionListener() {
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+
+            public void widgetSelected(SelectionEvent e) {
+                setSharedLibDependency(sharedLibDepends.getSelection());
+                markDirty();
+            }
+        });
+    }
+
+    protected String getGroupId() {
+        ArtifactType moduleId = getModuleId(false);
+        if (moduleId != null
+                && moduleId.getGroupId() != null)
+            return moduleId.getGroupId();
+        return "";
+    }
+
+    protected String getArtifactTypeId() {
+        ArtifactType moduleId = getModuleId(false);
+        if (moduleId != null
+                && moduleId.getArtifactId() != null)
+            return moduleId.getArtifactId();
+        return "";
+    }
+
+    protected String getVersion() {
+        ArtifactType moduleId = getModuleId(false);
+        if (moduleId != null
+                && moduleId.getVersion() != null)
+            return moduleId.getVersion();
+        return "";
+    }
+
+    protected String getArtifactType() {
+        ArtifactType moduleId = getModuleId(false);
+        if (moduleId != null
+                && moduleId.getType() != null)
+            return moduleId.getType();
+        return "";
+    }
+
+    protected boolean isInverseClassloading() {
+        EnvironmentType type = getEnvironmentType(false);
+        return type != null && type.getInverseClassloading() != null;
+    }
+
+    protected boolean isSuppressDefaultEnvironmentType() {
+        EnvironmentType type = getEnvironmentType(false);
+        return type != null && type.getSuppressDefaultEnvironment() != null;
+    }
+    
+    protected boolean isSharedLibDependency() {
+        DependenciesType depType = getDependencies(false);
+        if(depType != null) {
+            return getSharedLibDependency(depType) != null;
+        }
+        return false;
+    }
+
+    protected void setInverseClassloading(boolean enable) {
+        if (enable) {
+            EnvironmentType type = getEnvironmentType(true);
+            type.setInverseClassloading(getDeploymentObjectFactory().createEmptyType());
+        } else {
+            EnvironmentType type = getEnvironmentType(false);
+            if (type != null) {
+                type.setInverseClassloading(null);
+            }
+        }
+    }
+
+    protected void setSuppressDefaultEnvironmentType(boolean enable) {
+        if (enable) {
+            EnvironmentType type = getEnvironmentType(true);
+            type.setSuppressDefaultEnvironment(getDeploymentObjectFactory().createEmptyType());
+        } else {
+            EnvironmentType type = getEnvironmentType(false);
+            if (type != null) {
+                type.setSuppressDefaultEnvironment(null);
+            }
+        }
+    }
+    
+    protected void setSharedLibDependency(boolean enable) {
+        if (enable) {
+            DependenciesType deptype = getDependencies(true);
+            DependencyType sharedLib = getDeploymentObjectFactory().createDependencyType();
+            sharedLib.setGroupId("org.apache.geronimo.configs");
+            sharedLib.setArtifactId("sharedlib");
+            sharedLib.setType("car");
+            deptype.getDependency().add(sharedLib);
+        } else {
+        	DependenciesType deptype = getDependencies(false);
+            if (deptype != null) {
+                ArtifactType ArtifactType = getSharedLibDependency(deptype);
+                if(ArtifactType != null) {
+                    deptype.getDependency().remove(ArtifactType);
+                }
+            }
+        }
+    }
+    
+    private ArtifactType getSharedLibDependency(DependenciesType dependencies) {
+    	DependenciesType depType = getDependencies(false);
+        List dependenciesList = depType.getDependency();
+        Iterator i = dependenciesList.iterator();
+        while(i.hasNext()) {
+            ArtifactType ArtifactType = (ArtifactType) i.next();
+            if("org.apache.geronimo.configs".equals(ArtifactType.getGroupId()) && "sharedlib".equals(ArtifactType.getArtifactId()) && "car".equals(ArtifactType.getType())) {
+                return ArtifactType;
+            }
+        }
+        return null;
+    }
+
+    protected EnvironmentType getEnvironmentType(boolean create) {
+        EnvironmentType type = null;
+        Object plan = getPlan().getValue();
+        if (WebAppType.class.isInstance(plan)) {
+            type = ((WebAppType) plan).getEnvironment();
+            if (type == null && create) {
+                type = getDeploymentObjectFactory().createEnvironmentType();
+                ((WebAppType) plan).setEnvironment(type);
+            }
+        } else if (ConnectorType.class.isInstance(plan)) {
+            type = ((ConnectorType) plan).getEnvironment();
+            if (type == null && create) {
+                type = getDeploymentObjectFactory().createEnvironmentType();
+                ((ConnectorType) plan).setEnvironment(type);
+            }
+        } else if (ApplicationType.class.isInstance(plan)) {
+            type = ((ApplicationType) plan).getEnvironment();
+            if (type == null && create) {
+                type = getDeploymentObjectFactory().createEnvironmentType();
+                ((ApplicationType) plan).setEnvironment(type);
+            }
+        } else if (OpenejbJarType.class.isInstance(plan)) {
+            type = ((OpenejbJarType) plan).getEnvironment();
+            if (type == null && create) {
+                type = getDeploymentObjectFactory().createEnvironmentType();
+                ((OpenejbJarType) plan).setEnvironment(type);
+            }
+        }
+
+        return type;
+    }
+    
+    private DependenciesType getDependencies(boolean create) {
+        EnvironmentType env = getEnvironmentType(create);
+        if(env != null) {
+            DependenciesType dep = env.getDependencies();
+            if (dep == null && create) {
+                dep = getDeploymentObjectFactory().createDependenciesType();
+                env.setDependencies(dep);
+            }
+            return dep;
+        }
+        return null;
+    }
+
+    private ArtifactType getModuleId(boolean create) {
+        EnvironmentType type = getEnvironmentType(create);
+        if (type != null) {
+            ArtifactType moduleId = type.getModuleId();
+            if (moduleId == null && create) {
+                moduleId = getDeploymentObjectFactory().createArtifactType();
+                type.setModuleId(moduleId);
+            }
+            return moduleId;
+        }
+        return null;
+    }
+    
+    protected org.apache.geronimo.xml.ns.deployment_1.ObjectFactory getDeploymentObjectFactory() {
+        if ( deploymentObjectFactory == null ) {
+            deploymentObjectFactory = new org.apache.geronimo.xml.ns.deployment_1.ObjectFactory();
+        }
+        return deploymentObjectFactory;
+    }
+
+    protected String getSectionGeneralTitle() {
+        return CommonMessages.editorSectionGeneralTitle;
+    }
+
+    protected String getSectionGeneralDescription() {
+        return CommonMessages.editorSectionGeneralDescription;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,37 @@
+/*
+ * 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.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ConnectorType;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ConnectorGeneralSection extends CommonGeneralSection {
+
+	ConnectorType plan;
+
+	public ConnectorGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+		super(parent, toolkit, style, plan);
+		this.plan = (ConnectorType) plan.getValue();
+		createClient();
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/DependencySection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/DependencySection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/DependencySection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,142 @@
+/*
+ * 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.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.DependencyWizard;
+import org.apache.geronimo.xml.ns.deployment_1.DependenciesType;
+import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DependencySection extends AbstractTableSection {
+
+    boolean isServerEnvironment;
+    protected EnvironmentType environment;
+
+    public DependencySection(JAXBElement plan, EnvironmentType environment, Composite parent, FormToolkit toolkit, int style) {
+        this(plan, environment, parent, toolkit, style, true);
+    }
+
+    public DependencySection(JAXBElement plan, EnvironmentType environment, Composite parent, FormToolkit toolkit, int style, boolean isServerEnvironment) {
+        super(plan, parent, toolkit, style);
+        this.environment = environment;
+        this.isServerEnvironment = isServerEnvironment; 
+        this.COLUMN_NAMES = new String[] {
+                CommonMessages.groupId, CommonMessages.artifactId, CommonMessages.version, CommonMessages.artifactType
+        };
+        createClient();
+        getSection().setExpanded(false);
+    }
+
+    public String getTitle() {
+        if (isServerEnvironment) {
+            return CommonMessages.editorSectionDependenciesTitle;
+        } else {
+            return CommonMessages.editorSectionClientDependenciesTitle;
+        }
+    }
+
+    public String getDescription() {
+        if (isServerEnvironment) {
+            return CommonMessages.editorSectionDependenciesDescription;
+        } else {
+            return CommonMessages.editorSectionClientDependenciesDescription;
+        }
+    }
+
+    public List getObjectContainer() {
+        return getDependencies().getDependency();
+    }
+
+    private DependenciesType getDependencies() {
+        if (environment == null) {
+            environment = new EnvironmentType();
+        }
+        if (environment.getDependencies() == null) {
+            environment.setDependencies(new DependenciesType());
+        }
+        return environment.getDependencies();
+    }
+
+    @Override
+    public Wizard getWizard() {
+        return new DependencyWizard(this);
+    }
+
+    public ImageDescriptor getImageDescriptor() {
+        return Activator.imageDescriptorFromPlugin("org.eclipse.jdt.ui", "icons/full/obj16/jar_obj.gif");
+    }
+
+    public Class getTableEntryObjectType() {
+        return DependencyType.class;
+    }
+
+    public Object getInput() {
+        return getDependencies();
+    }
+
+    @Override
+    public IContentProvider getContentProvider() {
+        return new ContentProvider() {
+            @Override
+            public Object[] getElements(Object inputElement) {
+                if (!DependenciesType.class.isInstance(inputElement)) {
+                    return new String[] { "" };
+                }
+                return ((DependenciesType) inputElement).getDependency().toArray();
+            }
+        };
+    }
+
+    @Override
+    public ITableLabelProvider getLabelProvider() {
+        return new LabelProvider() {
+            @Override
+            public String getColumnText(Object element, int columnIndex) {
+                if (DependencyType.class.isInstance(element)) {
+                	DependencyType dependency = (DependencyType) element;
+                    switch (columnIndex) {
+                    case 0:
+                        return dependency.getGroupId();
+                    case 1:
+                        return dependency.getArtifactId();
+                    case 2:
+                        return dependency.getVersion();
+                    case 3:
+                        return dependency.getType();
+                    }
+                }
+                return "";
+            }
+        };
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,85 @@
+/*
+ * 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.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.EjbLocalRefWizard;
+import org.apache.geronimo.xml.ns.naming_1.EjbLocalRefType;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EjbLocalRefSection extends AbstractTableSection {
+
+    public EjbLocalRefSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List ejbLocalRefs) {
+        super(plan, parent, toolkit, style);
+        this.objectContainer = ejbLocalRefs;
+        COLUMN_NAMES = new String[] {
+                CommonMessages.name, CommonMessages.editorEjbRefEjbLink };
+        createClient();
+    }
+
+    public String getTitle() {
+        return CommonMessages.editorEjbLocalRefTitle;
+    }
+
+    public String getDescription() {
+        return CommonMessages.editorEjbLocalRefDescription;
+    }
+
+    public Wizard getWizard() {
+        return new EjbLocalRefWizard(this);
+    }
+
+    public ImageDescriptor getImageDescriptor() {
+        return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee", "icons/full/obj16/ejb_local_ref_obj.gif");
+    }
+
+    public Class getTableEntryObjectType() {
+        return EjbLocalRefType.class;
+    }
+
+    @Override
+    public ITableLabelProvider getLabelProvider() {
+        return new LabelProvider() {
+            @Override
+            public String getColumnText(Object element, int columnIndex) {
+                if (EjbLocalRefType.class.isInstance(element)) {
+                	EjbLocalRefType ejbLocalRef = (EjbLocalRefType) element;
+                    switch (columnIndex) {
+                    case 0:
+                        return ejbLocalRef.getRefName();
+                    case 1:
+                        return ejbLocalRef.getEjbLink();
+                    }
+                }
+                return null;
+            }
+        };
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,92 @@
+/*
+ * 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.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.EjbRefWizard;
+import org.apache.geronimo.xml.ns.naming_1.EjbRefType;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EjbRefSection extends AbstractTableSection {
+
+    /**
+     * @param plan
+     * @param parent
+     * @param toolkit
+     * @param style
+     */
+    public EjbRefSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List ejbRefs) {
+        super(plan, parent, toolkit, style);
+        this.objectContainer = ejbRefs;
+        COLUMN_NAMES = new String[] {
+                CommonMessages.name, CommonMessages.editorEjbRefEjbLink };
+        createClient();
+        getSection().setExpanded(false);
+    }
+
+    public String getTitle() {
+        return CommonMessages.editorEjbRefTitle;
+    }
+
+    public String getDescription() {
+        return CommonMessages.editorEjbRefDescription;
+    }
+
+    public Wizard getWizard() {
+        return new EjbRefWizard(this);
+    }
+
+    public ImageDescriptor getImageDescriptor() {
+        return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee", "icons/full/obj16/ejbRef_obj.gif");
+    }
+
+    public Class getTableEntryObjectType() {
+        return EjbRefType.class;
+    }
+
+    @Override
+    public ITableLabelProvider getLabelProvider() {
+        return new LabelProvider() {
+            @Override
+            public String getColumnText(Object element, int columnIndex) {
+                if (EjbRefType.class.isInstance(element)) {
+                	EjbRefType ejbRef = (EjbRefType) element;
+                    switch (columnIndex) {
+                    case 0:
+                        return ejbRef.getRefName();
+                    case 1:
+                        return ejbRef.getEjbLink();
+                    }
+                }
+                return null;
+            }
+        };
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/EjbRelationSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,173 @@
+/*
+ * 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.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.EjbRelationWizard;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.openejb.xml.ns.openejb_jar_2.EjbRelationType;
+import org.openejb.xml.ns.openejb_jar_2.EjbRelationshipRoleType;
+import org.openejb.xml.ns.openejb_jar_2.RelationshipsType;
+
+/**
+ * @version $Rev: 705002 $ $Date: 2008-10-16 03:34:27 +0800 (Thu, 16 Oct 2008) $
+ */
+public class EjbRelationSection extends AbstractTreeSection {
+    public EjbRelationSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, RelationshipsType relationships) {
+        super(plan, parent, toolkit, style);
+        this.objectContainer = relationships == null ? null : relationships.getEjbRelation();
+        createClient();
+    }
+
+    @Override
+    public String getTitle() {
+        return CommonMessages.editorEjbRelationTitle;
+    }
+
+    @Override
+    public String getDescription() {
+        return CommonMessages.editorEjbRelationDescription;
+    }
+
+    @Override
+    public Wizard getWizard() {
+        return new EjbRelationWizard(this);
+    }
+
+    @Override
+    public Class getTableEntryObjectType() {
+        return EjbRelationType.class;
+    }
+
+    @Override
+    protected void activateAddButton() {
+        if (tree.getSelectionCount() == 0 || tree.getSelection()[0].getParentItem() == null ||
+            tree.getSelection()[0].getParentItem().getParentItem() == null) {
+            addButton.setEnabled(true);
+        } else {
+            addButton.setEnabled(false);
+        }
+    }
+
+    public Object getSelectedObject () {
+        if (tree.getSelection().length == 0) {
+            return null;
+        }
+        return tree.getSelection()[0].getData();
+    }
+
+    @Override
+    public void removeItem(Object anItem) {
+        if (EjbRelationType.class.isInstance(anItem)) {
+            getObjectContainer().remove(anItem);
+        }
+        else if (EjbRelationshipRoleType.class.isInstance(anItem)) {
+        	EjbRelationType relation = (EjbRelationType)tree.getSelection()[0].getParentItem().getData();
+            relation.getEjbRelationshipRole().remove(anItem);
+        }
+        else if (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class.isInstance(anItem)) {
+        	EjbRelationshipRoleType role = (EjbRelationshipRoleType)tree.getSelection()[0].getParentItem().getData();
+            role.getRoleMapping().getCmrFieldMapping().remove(anItem);
+        }
+    }
+    
+    @Override
+    public Object getInput() {
+        if (objectContainer != null) {
+            return objectContainer;
+        }
+        return super.getInput();
+    }
+
+    public void resetInput (RelationshipsType relationships) {
+        objectContainer = relationships.getEjbRelation();
+        getViewer().setInput(objectContainer);
+    }
+
+    @Override
+    public ITreeContentProvider getContentProvider() {
+        return new ContentProvider() {
+            @Override
+            public Object[] getElements(Object inputElement) {
+                return getChildren(inputElement);
+            }
+
+            @Override
+            public Object[] getChildren(Object parentElement) {
+                if (List.class.isInstance(parentElement)) {
+                    return ((List)parentElement).toArray();
+                }
+                if (EjbRelationType.class.isInstance(parentElement)) {
+                	EjbRelationType relation = (EjbRelationType)parentElement;
+                    return relation.getEjbRelationshipRole().toArray();
+                }
+                if (EjbRelationshipRoleType.class.isInstance(parentElement)) {
+                	EjbRelationshipRoleType role = (EjbRelationshipRoleType)parentElement;
+                    if (role.getRoleMapping() != null) {
+                        return role.getRoleMapping().getCmrFieldMapping().toArray();
+                    }
+                }
+                return new String[] {};
+            }
+        };
+    }
+
+    @Override
+    public ILabelProvider getLabelProvider() {
+        return new LabelProvider() {
+            @Override
+            public String getText(Object element) {
+                if (EjbRelationType.class.isInstance(element)) {
+                	EjbRelationType relation = (EjbRelationType)element;
+                    return "EJB Relation: name = \"" + relation.getEjbRelationName() +
+                            "\", MTM table name = \"" + relation.getManyToManyTableName() + "\"";
+                }
+                if (EjbRelationshipRoleType.class.isInstance(element)) {
+                	EjbRelationshipRoleType role = (EjbRelationshipRoleType)element;
+                    return "EJB Relationship Role: name = \"" + role.getEjbRelationshipRoleName() +
+                            "\", source = \"" + role.getRelationshipRoleSource().getEjbName() +
+                            "\", CMR field name = \"" + role.getCmrField().getCmrFieldName() + "\"";
+                }
+                if (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class.isInstance(element)) {
+                	EjbRelationshipRoleType.RoleMapping.CmrFieldMapping fieldMapping =
+                            (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping)element;
+                    return "CMR Field Mapping: key column = \"" + fieldMapping.getKeyColumn() +
+                            "\", foreign key column = \"" + fieldMapping.getForeignKeyColumn() + "\"";
+                }
+
+                return null;
+            }
+
+            @Override
+            public Image getImage(Object arg0) {
+                return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee",
+                        "icons/full/obj16/module_web_obj.gif").createImage();
+            }
+        };
+    }
+}



Mime
View raw message