Author: sppatel
Date: Thu Jun 1 12:17:16 2006
New Revision: 410918
URL: http://svn.apache.org/viewvc?rev=410918&view=rev
Log:
missed checking these on last commit
Added:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/EMFEditorContext.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ImportSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/OpenEjbJarGeneralSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceEnvRefSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceRefSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecurityRootSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java (with props)
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/EMFEditorContext.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/EMFEditorContext.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/EMFEditorContext.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/EMFEditorContext.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,54 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.geronimo.xml.ns.deployment.provider.DeploymentItemProviderAdapterFactory;
+import org.apache.geronimo.xml.ns.j2ee.application.client.provider.ClientItemProviderAdapterFactory;
+import org.apache.geronimo.xml.ns.j2ee.application.provider.ApplicationItemProviderAdapterFactory;
+import org.apache.geronimo.xml.ns.j2ee.connector.provider.ConnectorItemProviderAdapterFactory;
+import org.apache.geronimo.xml.ns.j2ee.web.provider.WebItemProviderAdapterFactory;
+import org.apache.geronimo.xml.ns.naming.provider.NamingItemProviderAdapterFactory;
+import org.apache.geronimo.xml.ns.security.provider.SecurityItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.openejb.xml.ns.openejb.jar.provider.JarItemProviderAdapterFactory;
+import org.openejb.xml.ns.pkgen.provider.PkgenItemProviderAdapterFactory;
+
+public class EMFEditorContext {
+
+ private static ComposedAdapterFactory factory;
+
+ static {
+ List factories = new ArrayList();
+ factories.add(new DeploymentItemProviderAdapterFactory());
+ factories.add(new ClientItemProviderAdapterFactory());
+ factories.add(new ApplicationItemProviderAdapterFactory());
+ factories.add(new ConnectorItemProviderAdapterFactory());
+ factories.add(new WebItemProviderAdapterFactory());
+ factories.add(new NamingItemProviderAdapterFactory());
+ factories.add(new SecurityItemProviderAdapterFactory());
+ factories.add(new JarItemProviderAdapterFactory());
+ factories.add(new PkgenItemProviderAdapterFactory());
+ factory = new ComposedAdapterFactory(factories);
+ }
+
+ public static ComposedAdapterFactory getFactory() {
+ return factory;
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/EMFEditorContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/EMFEditorContext.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/EMFEditorContext.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/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/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,43 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationPackage;
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class AppGeneralSection extends CommonGeneralSection {
+
+ ApplicationType plan;
+
+ public AppGeneralSection(Composite parent, FormToolkit toolkit, int style, EObject plan) {
+ super(parent, toolkit, style, plan);
+ this.plan = (ApplicationType) plan;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.v11.ui.sections.CommonGeneralSection#getEnvironmentEReference()
+ */
+ protected EReference getEnvironmentEReference() {
+ return ApplicationPackage.eINSTANCE.getApplicationType_Environment();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/AppGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/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/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,78 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractSectionPart;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+public abstract class CommonGeneralSection extends AbstractSectionPart {
+
+ protected Text configId;
+
+ protected Text parentId;
+
+ public CommonGeneralSection(Composite parent, FormToolkit toolkit, int style, EObject plan) {
+ super(parent, toolkit, style, plan);
+ }
+
+ protected void createClient() {
+
+ Section section = getSection();
+
+ section.setText(CommonMessages.editorSectionGeneralTitle);
+ section.setDescription(CommonMessages.editorSectionGeneralDescription);
+ 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);
+
+ }
+
+ protected Label createLabel(Composite parent, String text, FormToolkit toolkit) {
+ Label label = toolkit.createLabel(parent, text);
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
+ label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+ return label;
+ }
+
+ protected GridData createTextFieldGridData() {
+ GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ data.widthHint = 150;
+ return data;
+ }
+
+ protected abstract EReference getEnvironmentEReference();
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/CommonGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/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/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,38 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorPackage;
+import org.apache.geronimo.xml.ns.j2ee.connector.ConnectorType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ConnectorGeneralSection extends CommonGeneralSection {
+
+ ConnectorType plan;
+
+ public ConnectorGeneralSection(Composite parent, FormToolkit toolkit, int style, EObject plan) {
+ super(parent, toolkit, style, plan);
+ this.plan = (ConnectorType) plan;
+ createClient();
+ }
+
+ protected EReference getEnvironmentEReference() {
+ return ConnectorPackage.eINSTANCE.getConnectorType_Environment();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ConnectorGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/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/org/apache/geronimo/st/v11/ui/sections/DependencySection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,133 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+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.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.DependencyWizard;
+import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class DependencySection extends AbstractTableSection {
+
+ /**
+ * Must be a set to a ERef type of XPackage.eINSTANCE.getXType_Dependency();
+ */
+ private EReference dependenciesERef;
+
+ /**
+ * @param plan
+ * @param parent
+ * @param toolkit
+ * @param style
+ */
+ public DependencySection(EObject plan, EReference dependenciesERef, Composite parent, FormToolkit toolkit, int style) {
+ super(plan, parent, toolkit, style);
+ this.dependenciesERef = dependenciesERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorSectionDependenciesTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorSectionDependenciesDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return dependenciesERef;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new DependencyWizard(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#isHeaderVisible()
+ */
+ public boolean isHeaderVisible() {
+ return false;
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return Activator.imageDescriptorFromPlugin("org.eclipse.jdt.ui", "icons/full/obj16/jar_obj.gif");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return DeploymentPackage.eINSTANCE.getArtifactType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#filter(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ protected boolean filter(Viewer viewer, Object parentElement, Object element) {
+ if (super.filter(viewer, parentElement, element)) {
+ return ((EList) getPlan().eGet(getEReference())).contains(element);
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/DependencySection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/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/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,113 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+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.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.EjbLocalRefWizard;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class EjbLocalRefSection extends AbstractTableSection {
+
+ EReference ejbLocalRefERef;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ CommonMessages.editorEjbRefTargetName,
+ CommonMessages.editorEjbRefEjbLink };
+
+ public EjbLocalRefSection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference ejbLocalRefERef) {
+ super(plan, parent, toolkit, style);
+ this.ejbLocalRefERef = ejbLocalRefERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorEjbLocalRefTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorEjbLocalRefDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableColumnNames()
+ */
+ public String[] getTableColumnNames() {
+ return COLUMN_NAMES;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return ejbLocalRefERef;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ 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");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return NamingPackage.eINSTANCE.getEjbLocalRefType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbLocalRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/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/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,119 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+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.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.EjbRefWizard;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class EjbRefSection extends AbstractTableSection {
+
+ EReference ejbRefERef;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ CommonMessages.editorEjbRefTargetName,
+ CommonMessages.editorEjbRefEjbLink };
+
+ /**
+ * @param plan
+ * @param parent
+ * @param toolkit
+ * @param style
+ */
+ public EjbRefSection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference ejbRefERef) {
+ super(plan, parent, toolkit, style);
+ this.ejbRefERef = ejbRefERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorEjbRefTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorEjbRefDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableColumnNames()
+ */
+ public String[] getTableColumnNames() {
+ return COLUMN_NAMES;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return ejbRefERef;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new EjbRefWizard(this);
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee", "icons/full/obj16/ejbRef_obj.gif");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return NamingPackage.eINSTANCE.getEjbRefType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/EjbRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.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/sections/GBeanRefSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,108 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.GBeanRefWizard;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class GBeanRefSection extends AbstractTableSection {
+
+ EReference gbeanERef;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ CommonMessages.editorGBeanRefName,
+ CommonMessages.editorGBeanRefType,
+ CommonMessages.editorGBeanRefProxyType };
+
+ public GBeanRefSection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference gbeanERef) {
+ super(plan, parent, toolkit, style);
+ this.gbeanERef = gbeanERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorGBeanRefTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorGBeanRefDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableColumnNames()
+ */
+ public String[] getTableColumnNames() {
+ return COLUMN_NAMES;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return gbeanERef;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new GBeanRefWizard(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return NamingPackage.eINSTANCE.getGbeanRefType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanSection.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/sections/GBeanSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,113 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.GBeanWizard;
+import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class GBeanSection extends AbstractTableSection {
+
+ private EReference gBeanERef;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ CommonMessages.name, CommonMessages.GbeanName,
+ CommonMessages.className };
+
+ /**
+ * @param plan
+ * @param parent
+ * @param toolkit
+ * @param style
+ */
+ public GBeanSection(EObject plan, EReference gBeanERef, Composite parent, FormToolkit toolkit, int style) {
+ super(plan, parent, toolkit, style);
+ this.gBeanERef = gBeanERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorSectionGBeanTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorSectionGBeanDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableColumnNames()
+ */
+ public String[] getTableColumnNames() {
+ return COLUMN_NAMES;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return gBeanERef;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new GBeanWizard(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return DeploymentPackage.eINSTANCE.getGbeanType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/GBeanSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ImportSection.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/sections/ImportSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ImportSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ImportSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,59 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.v11.ui.wizards.ImportWizard;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ImportSection extends DependencySection {
+
+ public ImportSection(EObject plan, EReference dependenciesERef, Composite parent, FormToolkit toolkit, int style) {
+ super(plan, dependenciesERef, parent, toolkit, style);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorSectionImportTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorSectionImportDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new ImportWizard(this);
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ImportSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ImportSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ImportSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/OpenEjbJarGeneralSection.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/sections/OpenEjbJarGeneralSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/OpenEjbJarGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/OpenEjbJarGeneralSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,43 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.openejb.xml.ns.openejb.jar.JarPackage;
+import org.openejb.xml.ns.openejb.jar.OpenejbJarType;
+
+public class OpenEjbJarGeneralSection extends CommonGeneralSection {
+
+ OpenejbJarType plan;
+
+ public OpenEjbJarGeneralSection(Composite parent, FormToolkit toolkit, int style, EObject plan) {
+ super(parent, toolkit, style, plan);
+ this.plan = (OpenejbJarType) plan;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.v11.ui.sections.CommonGeneralSection#getEnvironmentEReference()
+ */
+ protected EReference getEnvironmentEReference() {
+ return JarPackage.eINSTANCE.getOpenejbJarType_Environment();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/OpenEjbJarGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/OpenEjbJarGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/OpenEjbJarGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceEnvRefSection.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/sections/ResourceEnvRefSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceEnvRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceEnvRefSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,113 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+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.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.ResourceEnvRefWizard;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ResourceEnvRefSection extends AbstractTableSection {
+
+ EReference resourceEnvRefERef;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ CommonMessages.editorResEnvRefNameTitle,
+ CommonMessages.editorResEnvRefMsgDestTitle };
+
+ public ResourceEnvRefSection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference resourceEnvRefERef) {
+ super(plan, parent, toolkit, style);
+ this.resourceEnvRefERef = resourceEnvRefERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorResourceEnvRefTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorResourceEnvRefDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableColumnNames()
+ */
+ public String[] getTableColumnNames() {
+ return COLUMN_NAMES;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return resourceEnvRefERef;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new ResourceEnvRefWizard(this);
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee", "icons/full/obj16/res_env_ref_obj.gif");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return NamingPackage.eINSTANCE.getResourceEnvRefType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceEnvRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceEnvRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceEnvRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceRefSection.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/sections/ResourceRefSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceRefSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,114 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+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.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.ResourceRefWizard;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ResourceRefSection extends AbstractTableSection {
+
+ EReference resourceRefERef;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ CommonMessages.editorResRefNameTitle,
+ CommonMessages.editorResRefLinkTitle,
+ CommonMessages.editorResRefTargetNameTitle };
+
+ public ResourceRefSection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference resourceRefERef) {
+ super(plan, parent, toolkit, style);
+ this.resourceRefERef = resourceRefERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorResourceRefTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorResourceRefDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableColumnNames()
+ */
+ public String[] getTableColumnNames() {
+ return COLUMN_NAMES;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return resourceRefERef;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.DynamicTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new ResourceRefWizard(this);
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee", "icons/full/obj16/resourceRef_obj.gif");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return NamingPackage.eINSTANCE.getResourceRefType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ResourceRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecurityRootSection.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/sections/SecurityRootSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecurityRootSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecurityRootSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,155 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractSectionPart;
+import org.apache.geronimo.xml.ns.security.SecurityFactory;
+import org.apache.geronimo.xml.ns.security.SecurityPackage;
+import org.apache.geronimo.xml.ns.security.SecurityType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+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.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class SecurityRootSection extends AbstractSectionPart {
+
+ EReference secERef;
+
+ Text defaultRole;
+
+ Button doas;
+
+ Button useCtxHdl;
+
+ /**
+ * @param section
+ */
+ public SecurityRootSection(Section section) {
+ super(section);
+ }
+
+ /**
+ * @param parent
+ * @param toolkit
+ * @param style
+ */
+ public SecurityRootSection(Composite parent, FormToolkit toolkit, int style, EObject plan, EReference secERef) {
+ super(parent, toolkit, style, plan);
+ this.secERef = secERef;
+ createClient();
+ }
+
+ protected void createClient() {
+ Section section = getSection();
+
+ section.setText(CommonMessages.editorSectionGeneralTitle);
+ section.setDescription(CommonMessages.editorSectionGeneralDescription);
+ 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, false, false));
+ section.setClient(composite);
+
+ createLabel(composite, CommonMessages.defaultRole, toolkit);
+ defaultRole = toolkit.createText(composite, getDefaultRole(), SWT.BORDER);
+ GridData gd = new GridData();
+ gd.widthHint = 150;
+ defaultRole.setLayoutData(gd);
+ defaultRole.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ getSecurityType().setDefaultRole(defaultRole.getText());
+ markDirty();
+ }
+ });
+
+ doas = toolkit.createButton(composite, CommonMessages.doasCurrentCaller, SWT.CHECK);
+ doas.setLayoutData(createGridData());
+ doas.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ getSecurityType().setDoasCurrentCaller(doas.getSelection());
+ markDirty();
+ }
+ });
+
+ useCtxHdl = toolkit.createButton(composite, CommonMessages.useContextHandler, SWT.CHECK);
+ useCtxHdl.setLayoutData(createGridData());
+ useCtxHdl.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ getSecurityType().setUseContextHandler(useCtxHdl.getSelection());
+ markDirty();
+ }
+ });
+
+ }
+
+ protected GridData createGridData() {
+ GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ gd.horizontalSpan = 2;
+ return gd;
+ }
+
+ protected Label createLabel(Composite parent, String text, FormToolkit toolkit) {
+ Label label = toolkit.createLabel(parent, text);
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
+ label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+ return label;
+ }
+
+ private String getDefaultRole() {
+ SecurityType secType = (SecurityType) getPlan().eGet(secERef);
+ if (secType != null
+ && secType.eIsSet(SecurityPackage.eINSTANCE.getSecurityType_DefaultRole())) {
+ return secType.getDefaultRole();
+ }
+ return "";
+ }
+
+ private SecurityType getSecurityType() {
+ SecurityType secType = (SecurityType) getPlan().eGet(secERef);
+ if (secType == null) {
+ secType = SecurityFactory.eINSTANCE.createSecurityType();
+ getPlan().eSet(secERef, secType);
+ }
+ return secType;
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecurityRootSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecurityRootSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecurityRootSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.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/sections/SecuritySection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,224 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+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.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.SecurityRoleWizard;
+import org.apache.geronimo.xml.ns.security.DescriptionType;
+import org.apache.geronimo.xml.ns.security.RoleType;
+import org.apache.geronimo.xml.ns.security.SecurityPackage;
+import org.apache.geronimo.xml.ns.security.SecurityType;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+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.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class SecuritySection extends AbstractTableSection {
+
+ public EReference securityERef;
+
+ Text roleNameText;
+
+ Text roleDescriptionText;
+
+ private static final String[] COLUMN_NAMES = new String[] { CommonMessages.name };
+
+ /**
+ * @param plan
+ * @param parent
+ * @param toolkit
+ * @param style
+ */
+ public SecuritySection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference securityERef) {
+ super(plan, parent, toolkit, style);
+ this.securityERef = securityERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorSectionSecurityRolesTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorSectionSecurityRolesDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableColumnNames()
+ */
+ public String[] getTableColumnNames() {
+ return COLUMN_NAMES;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return SecurityPackage.eINSTANCE.getRoleMappingsType_Role();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new SecurityRoleWizard(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return SecurityPackage.eINSTANCE.getRoleType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#isHeaderVisible()
+ */
+ public boolean isHeaderVisible() {
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#createClient()
+ */
+ public void createClient() {
+
+ super.createClient();
+
+ Composite detail = toolkit.createComposite(getTable().getParent());
+ GridLayout gl = new GridLayout();
+ gl.marginWidth = 4;
+ gl.marginHeight = 8;
+ gl.numColumns = 2;
+ detail.setLayout(gl);
+ detail.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ Label roleNameLabel = toolkit.createLabel(detail, CommonMessages.name
+ + ":");
+ roleNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ roleNameLabel.setEnabled(true);
+
+ roleNameText = toolkit.createText(detail, "", SWT.BORDER);
+ roleNameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ roleNameText.setEnabled(true);
+
+ Label roleDescriptionLabel = toolkit.createLabel(detail, CommonMessages.description
+ + ":");
+ roleDescriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ roleDescriptionLabel.setEnabled(true);
+
+ roleDescriptionText = toolkit.createText(detail, "", SWT.MULTI
+ | SWT.BORDER);
+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
+ data.heightHint = 50;
+ roleDescriptionText.setLayoutData(data);
+ roleDescriptionText.setEnabled(true);
+
+ getTable().addSelectionListener(new TableSelectionListener());
+
+ removeButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ roleNameText.setText("");
+ roleDescriptionText.setText("");
+ }
+ });
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getInput()
+ */
+ public Object getInput() {
+ SecurityType secType = (SecurityType) getPlan().eGet(securityERef);
+ if (secType != null) {
+ return secType.getRoleMappings();
+ }
+ return super.getInput();
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee", "icons/full/obj16/security_role.gif");
+ }
+
+ class TableSelectionListener implements SelectionListener {
+
+ public void widgetSelected(SelectionEvent e) {
+ TableItem item = (TableItem) e.item;
+ RoleType roleType = (RoleType) item.getData();
+ roleNameText.setText(roleType.getRoleName());
+
+ if (!roleType.getDescription().isEmpty()) {
+ roleDescriptionText.setText(((DescriptionType) roleType.getDescription().get(0)).getValue());
+ } else {
+ roleDescriptionText.setText("");
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/SecuritySection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.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/sections/ServiceRefSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,105 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.v11.ui.internal.EMFEditorContext;
+import org.apache.geronimo.st.v11.ui.wizards.ServiceRefWizard;
+import org.apache.geronimo.xml.ns.naming.NamingPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class ServiceRefSection extends AbstractTableSection {
+
+ EReference serviceRefERef;
+
+ private static final String[] COLUMN_NAMES = new String[] { CommonMessages.editorServiceRefName };
+
+ public ServiceRefSection(EObject plan, Composite parent, FormToolkit toolkit, int style, EReference serviceRefERef) {
+ super(plan, parent, toolkit, style);
+ this.serviceRefERef = serviceRefERef;
+ createClient();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTitle()
+ */
+ public String getTitle() {
+ return CommonMessages.editorServiceRefTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getDescription()
+ */
+ public String getDescription() {
+ return CommonMessages.editorServiceRefDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableColumnNames()
+ */
+ public String[] getTableColumnNames() {
+ return COLUMN_NAMES;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getEReference()
+ */
+ public EReference getEReference() {
+ return serviceRefERef;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getWizard()
+ */
+ public Wizard getWizard() {
+ return new ServiceRefWizard(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.ui.sections.AbstractTableSection#getTableEntryObjectType()
+ */
+ public EClass getTableEntryObjectType() {
+ return NamingPackage.eINSTANCE.getServiceRefType();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.ui.sections.AbstractTableSection#getAdapterFactory()
+ */
+ public AdapterFactory getAdapterFactory() {
+ return EMFEditorContext.getFactory();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.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/sections/WebGeneralSection.java?rev=410918&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java Thu Jun 1 12:17:16 2006
@@ -0,0 +1,67 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.ui.sections;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.xml.ns.j2ee.web.WebAppType;
+import org.apache.geronimo.xml.ns.j2ee.web.WebPackage;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+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;
+
+public class WebGeneralSection extends CommonGeneralSection {
+
+ protected Text contextRoot;
+
+ WebAppType plan;
+
+ public WebGeneralSection(Composite parent, FormToolkit toolkit, int style, EObject plan) {
+ super(parent, toolkit, style, plan);
+ this.plan = (WebAppType) plan;
+ createClient();
+ }
+
+ protected void createClient() {
+ super.createClient();
+ Composite composite = (Composite) getSection().getClient();
+
+ createLabel(composite, CommonMessages.editorContextRoot, toolkit);
+
+ contextRoot = toolkit.createText(composite, plan.getContextRoot(), SWT.BORDER);
+ contextRoot.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+ contextRoot.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ plan.setContextRoot(contextRoot.getText());
+ markDirty();
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.v11.ui.sections.CommonGeneralSection#getEnvironmentEReference()
+ */
+ protected EReference getEnvironmentEReference() {
+ return WebPackage.eINSTANCE.getWebAppType_Environment();
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
|