geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r293593 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui: internal/ pages/ sections/ wizards/
Date Tue, 04 Oct 2005 12:41:32 GMT
Author: sppatel
Date: Tue Oct  4 05:41:13 2005
New Revision: 293593

URL: http://svn.apache.org/viewcvs?rev=293593&view=rev
Log:
- add dependency wizard
- refactor due to return type change from DynamicAddEditWizard 
to Wizard

Added:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/AppGeneralPage.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.java
Tue Oct  4 05:41:13 2005
@@ -61,6 +61,12 @@
     public static String name;
 
     public static String description;
+    
+    //
+    
+    public static String editorSectionDependenciesTitle;
+
+    public static String editorSectionDependenciesDescription;
 
     //
 
@@ -147,6 +153,30 @@
     public static String wizardPageTitle_EjbLocalRef;
 
     public static String wizardPageDescription_EjbLocalRef;
+
+    //
+
+    public static String wizardNewTitle_Dependency;
+
+    public static String wizardEditTitle_Dependency;
+
+    public static String wizardPageTitle_Dependency;
+
+    public static String wizardPageDescription_Dependency;
+    
+    public static String dependencyGroupLabel;
+    
+    public static String serverRepos;
+    
+    public static String uri;
+    
+    public static String mavenArtifact;
+    
+    public static String groupId;
+    
+    public static String artifactId;
+    
+    public static String version;
 
     //
 

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/internal/Messages.properties
Tue Oct  4 05:41:13 2005
@@ -7,6 +7,9 @@
 editorSectionSecurityRolesTitle=Security Roles
 editorSectionSecurityRolesDescription=The following security roles are defined:
 
+editorSectionDependenciesTitle=Dependencies
+editorSectionDependenciesDescription=The following dependencies are defined as common libraries.
+
 editorSectionSecurityTitle=Security
 editorSectionSecurityDescription=Specify the security settings.
 username=User ID:
@@ -65,8 +68,21 @@
 
 wizardNewTitle_SecurityRole=New Security Role
 wizardEditTitle_SecurityRole=Edit Security Role
-wizardPageTitle_SecurityRole=Security Rolel Details
+wizardPageTitle_SecurityRole=Security Role Details
 wizardPageDescription_SecurityRole=Provide details for this security role.
+
+wizardNewTitle_Dependency=New Dependency
+wizardEditTitle_Dependency=Edit Dependency
+wizardPageTitle_Dependency=Dependency Details
+wizardPageDescription_Dependency=Provide details for this dependency.
+
+dependencyGroupLabel=Dependency type and location    
+serverRepos=Server repository    
+uri=URI:
+mavenArtifact=Maven artifact
+groupId=Group Id:
+artifactId=Artifact Id:
+version=Version:
 
 editorTabGeneral=General
 editorTabNaming=Naming

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/AppGeneralPage.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/AppGeneralPage.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/AppGeneralPage.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/pages/AppGeneralPage.java
Tue Oct  4 05:41:13 2005
@@ -17,8 +17,11 @@
 
 import org.apache.geronimo.ui.editors.ApplicationPlanEditor;
 import org.apache.geronimo.ui.sections.AppGeneralSection;
+import org.apache.geronimo.ui.sections.DependencySection;
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationPackage;
 import org.apache.geronimo.xml.ns.j2ee.application.ApplicationType;
 import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
 import org.eclipse.ui.forms.editor.FormPage;
@@ -26,10 +29,6 @@
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 import org.eclipse.ui.forms.widgets.Section;
 
-/**
- * 
- * 
- */
 public class AppGeneralPage extends FormPage {
 
     /**
@@ -56,21 +55,38 @@
      */
     protected void createFormContent(IManagedForm managedForm) {
 
-        ApplicationType plan = (ApplicationType) ((ApplicationPlanEditor) getEditor())
-                .getDeploymentPlan();
-
         ScrolledForm form = managedForm.getForm();
         form.setText(getTitle());
-        form.getBody().setLayout(new GridLayout());
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        layout.horizontalSpacing = 20;
+        layout.makeColumnsEqualWidth = true;
 
-        AppGeneralSection sec = new AppGeneralSection(form.getBody(),
-                managedForm.getToolkit(), ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED
-                        | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
-                        | ExpandableComposite.FOCUS_TITLE, plan);
-        managedForm.addPart(sec);
+        form.getBody().setLayout(layout);
+
+        fillBody(managedForm);
 
         form.reflow(true);
+
+    }
+
+    private void fillBody(IManagedForm managedForm) {
+
+        ApplicationType plan = (ApplicationType) ((ApplicationPlanEditor) getEditor())
+                .getDeploymentPlan();
+
+        Composite body = managedForm.getForm().getBody();
+
+        int style = ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+                | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+                | ExpandableComposite.FOCUS_TITLE;
+
+        managedForm.addPart(new AppGeneralSection(body, managedForm
+                .getToolkit(), style, plan));
+
+        managedForm.addPart(new DependencySection(plan,
+                ApplicationPackage.eINSTANCE.getApplicationType_Dependency(),
+                body, managedForm.getToolkit(), style));
     }
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java
Tue Oct  4 05:41:13 2005
@@ -15,19 +15,15 @@
  */
 package org.apache.geronimo.ui.sections;
 
-import org.apache.geronimo.ui.wizards.DynamicAddEditWizard;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.Section;
 
-/**
- * 
- *
- */
 public class BeansSection extends DynamicTableSection {
 
     /**
@@ -101,7 +97,7 @@
     /* (non-Javadoc)
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getWizard()
      */
-    public DynamicAddEditWizard getWizard() {
+    public Wizard getWizard() {
         // TODO Auto-generated method stub
         return null;
     }

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java?rev=293593&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java
(added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java
Tue Oct  4 05:41:13 2005
@@ -0,0 +1,140 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.ui.sections;
+
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.ui.wizards.DependencyWizard;
+import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationFactory;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class DependencySection extends DynamicTableSection {
+
+    /**
+     * Must be a set to a ERef type of XPackage.eINSTANCE.getXType_Dependency();
+     */
+    public EReference dependenciesERef;
+
+    /**
+     * @param section
+     */
+    public DependencySection(Section section) {
+        super(section);
+    }
+
+    /**
+     * @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;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTitle()
+     */
+    public String getTitle() {
+        return Messages.editorSectionDependenciesTitle;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#getDescription()
+     */
+    public String getDescription() {
+        return Messages.editorSectionDependenciesDescription;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEFactory()
+     */
+    public EFactory getEFactory() {
+        return DeploymentFactory.eINSTANCE;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#getEReference()
+     */
+    public EReference getEReference() {
+        return ApplicationFactory.eINSTANCE.getApplicationPackage().getApplicationType_Dependency();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnNames()
+     */
+    public String[] getTableColumnNames() {
+        return new String[] { Messages.name };
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnEAttributes()
+     */
+    public EAttribute[] getTableColumnEAttributes() {
+        return new EAttribute[]{};
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#getWizard()
+     */
+    public Wizard getWizard() {
+        return new DependencyWizard(this);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#configureSection(org.eclipse.ui.forms.widgets.Section)
+     */
+    protected void configureSection(Section section) {
+        section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.sections.DynamicTableSection#showTableColumNames()
+     */
+    public boolean isHeaderVisible() {
+        return false;
+    }
+
+}

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
Tue Oct  4 05:41:13 2005
@@ -33,6 +33,7 @@
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableLayout;
 import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -201,7 +202,7 @@
 
         add.addSelectionListener(new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
-                DynamicAddEditWizard wizard = getWizard();
+                Wizard wizard = getWizard();
                 if (wizard != null) {
                     WizardDialog dialog = new WizardDialog(Display.getCurrent()
                             .getActiveShell(), wizard);
@@ -225,26 +226,24 @@
             public void widgetSelected(SelectionEvent e) {
                 Object o = ((StructuredSelection) getTableViewer()
                         .getSelection()).getFirstElement();
-
                 if (o != null) {
-
-                    DynamicAddEditWizard wizard = getWizard();
+                    Wizard wizard = getWizard();
                     if (wizard != null) {
-                        wizard.setEObject((EObject) o);
-
+                        if (wizard instanceof DynamicAddEditWizard) {
+                            ((DynamicAddEditWizard) wizard)
+                                    .setEObject((EObject) o);
+                        }
                         WizardDialog dialog = new WizardDialog(Display
                                 .getCurrent().getActiveShell(), wizard);
-
                         dialog.open();
-
                         if (dialog.getReturnCode() == Dialog.OK) {
                             markDirty();
                         }
                     }
                 }
-
             }
         });
+        
         add.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
     }
 
@@ -314,6 +313,6 @@
     /**
      * @return
      */
-    abstract public DynamicAddEditWizard getWizard();
+    abstract public Wizard getWizard();
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
Tue Oct  4 05:41:13 2005
@@ -16,7 +16,6 @@
 package org.apache.geronimo.ui.sections;
 
 import org.apache.geronimo.ui.internal.Messages;
-import org.apache.geronimo.ui.wizards.DynamicAddEditWizard;
 import org.apache.geronimo.ui.wizards.EjbLocalRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
@@ -25,6 +24,7 @@
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EFactory;
 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;
 
@@ -98,7 +98,7 @@
      * 
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getWizard()
      */
-    public DynamicAddEditWizard getWizard() {
+    public Wizard getWizard() {
         return new EjbLocalRefWizard(this);
     }
 

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
Tue Oct  4 05:41:13 2005
@@ -16,7 +16,6 @@
 package org.apache.geronimo.ui.sections;
 
 import org.apache.geronimo.ui.internal.Messages;
-import org.apache.geronimo.ui.wizards.DynamicAddEditWizard;
 import org.apache.geronimo.ui.wizards.EjbRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
@@ -25,6 +24,7 @@
 import org.eclipse.emf.ecore.EFactory;
 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;
 import org.eclipse.ui.forms.widgets.Section;
@@ -111,7 +111,7 @@
      * 
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getWizard()
      */
-    public DynamicAddEditWizard getWizard() {
+    public Wizard getWizard() {
         return new EjbRefWizard(this);
     }
 

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
Tue Oct  4 05:41:13 2005
@@ -16,7 +16,6 @@
 package org.apache.geronimo.ui.sections;
 
 import org.apache.geronimo.ui.internal.Messages;
-import org.apache.geronimo.ui.wizards.DynamicAddEditWizard;
 import org.apache.geronimo.ui.wizards.ResourceEnvRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
@@ -25,6 +24,7 @@
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EFactory;
 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;
 
@@ -99,7 +99,7 @@
      * 
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getWizard()
      */
-    public DynamicAddEditWizard getWizard() {
+    public Wizard getWizard() {
         return new ResourceEnvRefWizard(this);
     }
 

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
Tue Oct  4 05:41:13 2005
@@ -16,7 +16,6 @@
 package org.apache.geronimo.ui.sections;
 
 import org.apache.geronimo.ui.internal.Messages;
-import org.apache.geronimo.ui.wizards.DynamicAddEditWizard;
 import org.apache.geronimo.ui.wizards.ResourceRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
@@ -25,6 +24,7 @@
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EFactory;
 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;
 
@@ -103,7 +103,7 @@
      * 
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getWizard()
      */
-    public DynamicAddEditWizard getWizard() {
+    public Wizard getWizard() {
         return new ResourceRefWizard(this);
     }
 

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java?rev=293593&r1=293592&r2=293593&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java
Tue Oct  4 05:41:13 2005
@@ -16,7 +16,6 @@
 package org.apache.geronimo.ui.sections;
 
 import org.apache.geronimo.ui.internal.Messages;
-import org.apache.geronimo.ui.wizards.DynamicAddEditWizard;
 import org.apache.geronimo.ui.wizards.SecurityRoleWizard;
 import org.apache.geronimo.xml.ns.security.DescriptionType;
 import org.apache.geronimo.xml.ns.security.RoleType;
@@ -30,6 +29,7 @@
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
@@ -111,7 +111,7 @@
     /**
      * @return
      */
-    public DynamicAddEditWizard getWizard() {
+    public Wizard getWizard() {
         return new SecurityRoleWizard(this);
     }
 

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java?rev=293593&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
(added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
Tue Oct  4 05:41:13 2005
@@ -0,0 +1,184 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.ui.wizards;
+
+import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.ui.sections.DynamicTableSection;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+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.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class DependencyWizard extends DynamicAddEditWizard {
+
+    public static String wizardNewTitle_Dependency;
+
+    public static String wizardEditTitle_Dependency;
+
+    public static String wizardPageTitle_Dependency;
+
+    public static String wizardPageDescription_Dependency;
+
+    /**
+     * @param section
+     */
+    public DependencyWizard(DynamicTableSection section) {
+        super(section);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getAddWizardWindowTitle()
+     */
+    public String getAddWizardWindowTitle() {
+        return Messages.wizardNewTitle_Dependency;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getEditWizardWindowTitle()
+     */
+    public String getEditWizardWindowTitle() {
+        return Messages.wizardEditTitle_Dependency;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getWizardFirstPageTitle()
+     */
+    public String getWizardFirstPageTitle() {
+        return Messages.wizardPageDescription_Dependency;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.geronimo.ui.wizards.DynamicAddEditWizard#getWizardFirstPageDescription()
+     */
+    public String getWizardFirstPageDescription() {
+        return Messages.wizardNewTitle_Dependency;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#performFinish()
+     */
+    public boolean performFinish() {
+        return true;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        WizardPage page = new DependencyWizardPage("Page0");
+        addPage(page);
+    }
+
+    public class DependencyWizardPage extends WizardPage {
+
+        Text[] textEntries = new Text[section.getTableColumnEAttributes().length];
+
+        public DependencyWizardPage(String pageName) {
+            super(pageName);
+            setTitle(getWizardFirstPageTitle());
+            setDescription(getWizardFirstPageDescription());
+        }
+
+        public DependencyWizardPage(String pageName, String title,
+                ImageDescriptor titleImage) {
+            super(pageName, title, titleImage);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = new Composite(parent, SWT.NULL);
+
+            GridLayout layout = new GridLayout();
+            layout.numColumns = 2;
+            layout.horizontalSpacing = 15;
+            composite.setLayout(layout);
+            composite
+                    .setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+
+            GridData data = new GridData();
+            data = new GridData(GridData.FILL_HORIZONTAL);
+            data.horizontalSpan = 2;
+
+            Group group = new Group(composite, SWT.NONE);
+            group.setText(Messages.dependencyGroupLabel);
+            group.setLayoutData(data);
+            group.setLayout(layout);
+
+            Button button = new Button(group, SWT.LEFT | SWT.RADIO);
+            button.setSelection(true);
+            button.setText(Messages.serverRepos);
+            button.setLayoutData(data);
+
+            Label label = new Label(group, SWT.LEFT);
+            label.setText(Messages.uri);
+            GridData labelData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+            labelData.grabExcessHorizontalSpace = true;
+            labelData.horizontalIndent = 20;
+            label.setLayoutData(labelData);
+
+            Text text = new Text(group, SWT.SINGLE | SWT.BORDER);
+            text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+            Button button2 = new Button(group, SWT.LEFT | SWT.RADIO);
+            button2.setSelection(false);
+            button2.setText(Messages.mavenArtifact);
+            button2.setLayoutData(data);
+
+            Label groupIdLabel = new Label(group, SWT.LEFT);
+            groupIdLabel.setText(Messages.groupId);
+            groupIdLabel.setLayoutData(labelData);
+
+            Text groupIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
+            groupIdText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+            Label artifactIdLabel = new Label(group, SWT.LEFT);
+            artifactIdLabel.setText(Messages.artifactId);
+            artifactIdLabel.setLayoutData(labelData);
+
+            Text artifactIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
+            artifactIdText
+                    .setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+            Label versionLabel = new Label(group, SWT.LEFT);
+            versionLabel.setText(Messages.version);
+            versionLabel.setLayoutData(labelData);
+
+            Text versionText = new Text(group, SWT.SINGLE | SWT.BORDER);
+            versionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+            setControl(composite);
+
+        }
+    }
+
+}



Mime
View raw message