geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r938593 [6/8] - in /geronimo/devtools/eclipse-plugin/trunk: plugins/org.apache.geronimo.st.ui/ plugins/org.apache.geronimo.st.v21.ui/ plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ plugins/org.ap...
Date Tue, 27 Apr 2010 18:20:24 GMT
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,200 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.jee.naming.GbeanRef;
+import org.apache.geronimo.jee.naming.ObjectFactory;
+import org.apache.geronimo.jee.naming.Pattern;
+import org.apache.geronimo.jee.web.WebApp;
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GBeanRefWizard extends AbstractTreeWizard {
+
+    private final int GBEAN_REF = 0;
+    private final int GBEAN_TYPE = 1;
+    private final int PATTERN = 2;
+    
+    public GBeanRefWizard(AbstractTreeSection section) {
+        super(section, 3, 5);
+        elementTypes[GBEAN_REF] = "GBean Reference";
+        elementTypes[GBEAN_TYPE] = "Gbean type";
+        elementTypes[PATTERN] = "Pattern";
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_GBeanRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_GBeanRef;
+    }
+ 
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new GbeanRefWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class GbeanRefWizardPage extends AbstractTreeWizardPage {
+        public GbeanRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        protected void initControl () {
+            if (eObject == null) {
+                element.select(GBEAN_REF);
+                GbeanRef gbeanRef = (GbeanRef)section.getSelectedObject();
+                if (gbeanRef == null) {
+                    element.setEnabled(false);
+                }
+            }
+            else {
+                if (JAXBElement.class.isInstance(eObject)) {
+                    eObject = ((JAXBElement)eObject).getValue();
+                }
+                if (GbeanRef.class.isInstance(eObject)) {
+                    textList.get(0).setText(((GbeanRef)eObject).getRefName());
+                    element.select(GBEAN_REF);
+                }
+                else if (String.class.isInstance(eObject)) {
+                    textList.get(0).setText(((String)eObject));
+                    element.select(GBEAN_TYPE);
+                }
+                else if (Pattern.class.isInstance(eObject)) {
+                    textList.get(0).setText(((Pattern)eObject).getName());
+                    textList.get(1).setText(((Pattern)eObject).getGroupId());
+                    textList.get(2).setText(((Pattern)eObject).getArtifactId());
+                    textList.get(3).setText(((Pattern)eObject).getVersion());
+                    textList.get(4).setText(((Pattern)eObject).getModule());
+                    element.select(PATTERN);
+                }
+                element.setEnabled(false);
+            }
+        }
+        
+        protected void toggleFields (boolean clearFields) {
+            for (int i = 0; i < maxTextFields; i++) {
+                labelList.get(i).setVisible(i < 1 ? true : false);
+                textList.get(i).setVisible(i < 1 ? true : false);
+                if (clearFields == true) {
+                    textList.get(i).setText("");
+                }
+            }
+            if (element.getText().equals(elementTypes[GBEAN_TYPE])) {
+                labelList.get(0).setText(CommonMessages.type);
+            }
+            else {
+                labelList.get(0).setText(CommonMessages.name);
+            }
+            labelList.get(1).setText(CommonMessages.groupId);
+            labelList.get(2).setText(CommonMessages.artifactId);
+            labelList.get(3).setText(CommonMessages.version);
+            labelList.get(4).setText(CommonMessages.moduleId);
+            for (int i = 1; i < maxTextFields; i++) {
+                labelList.get(i).setVisible(element.getText().equals(elementTypes[PATTERN]));
+                textList.get(i).setVisible(element.getText().equals(elementTypes[PATTERN]));
+                if (clearFields == true) {
+                    textList.get(i).setText("");
+                }
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_GBeanRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_GBeanRef;
+        }
+    }
+
+    @Override
+    public boolean performFinish() {
+        GbeanRef gbeanRef;
+        if (element.getText().equals(elementTypes[GBEAN_REF])) {
+            if (isEmpty(textList.get(0).getText())) {
+                return false;
+            }
+            gbeanRef = (GbeanRef)eObject;
+            if (gbeanRef == null) {
+                gbeanRef = (GbeanRef)getEFactory().create(GbeanRef.class);
+                JAXBElement plan = section.getPlan();
+
+                // if we have a WebApp, add the JAXBElement of the GBeanRef, not the GBeanRef
+                if (WebApp.class.isInstance(plan.getValue())) {
+                    ObjectFactory objectFactory = new ObjectFactory();
+                    JAXBModelUtils.getGbeanRefs(plan).add(objectFactory.createGbeanRef(gbeanRef));
+                    section.getObjectContainer().add(objectFactory.createGbeanRef(gbeanRef));
+                }
+                else {
+                    JAXBModelUtils.getGbeanRefs(plan).add(gbeanRef);
+                    section.getObjectContainer().add(gbeanRef);
+                }
+            }
+            gbeanRef.setRefName(textList.get(0).getText());
+        }
+        else if (element.getText().equals(elementTypes[GBEAN_TYPE])) {
+            if (isEmpty(textList.get(0).getText())) {
+                return false;
+            }
+            String type = (String)eObject;
+            gbeanRef = (GbeanRef)section.getSelectedObject();
+            if (type == null) {
+                gbeanRef.getRefType().add(textList.get(0).getText());
+            }
+            else {
+                gbeanRef.getRefType().set(gbeanRef.getRefType().indexOf(type), textList.get(0).getText());
+            }
+        }
+        else if (element.getText().equals(elementTypes[PATTERN])) { 
+            if (isEmpty(textList.get(0).getText())) {
+                return false;
+            }
+            Pattern pattern = (Pattern)eObject;
+            if (pattern == null) {
+                pattern = (Pattern)getEFactory().create(Pattern.class);
+                gbeanRef = (GbeanRef)section.getSelectedObject();
+                gbeanRef.getPattern().add(pattern);
+            }
+            pattern.setName(textList.get(0).getText());
+            pattern.setGroupId(textList.get(1).getText());
+            pattern.setArtifactId(textList.get(2).getText());
+            pattern.setVersion(textList.get(3).getText());
+            pattern.setModule(textList.get(4).getText());
+        }
+        return true;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanRefWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,279 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.jee.deployment.Attribute;
+import org.apache.geronimo.jee.deployment.Gbean;
+import org.apache.geronimo.jee.deployment.ObjectFactory;
+import org.apache.geronimo.jee.deployment.Pattern;
+import org.apache.geronimo.jee.deployment.Reference;
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GBeanWizard extends AbstractTreeWizard {
+
+    private final int GBEAN = 0;
+    private final int ATTRIBUTE = 1;
+    private final int DEPENDENCY = 2;
+    private final int REFERENCE = 3;
+
+    public GBeanWizard(AbstractTreeSection section) {
+        super(section, 4, 7);
+        elementTypes[GBEAN] = "GBean";
+        elementTypes[ATTRIBUTE] = "Attribute";
+        elementTypes[DEPENDENCY] = "Dependency";
+        elementTypes[REFERENCE] = "Reference";
+    }
+
+    public class GBeanWizardPage extends AbstractTreeWizardPage {
+
+        public GBeanWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        protected void initControl() {
+            if (eObject == null) {
+                element.select(GBEAN);
+                if (section.getSelectedObject() == null) {
+                    element.setEnabled(false);
+                }
+            }
+            else {
+                // change eObject to be the value of the JAXBElement
+                eObject = ((JAXBElement)eObject).getValue();
+                if (Gbean.class.isInstance(eObject)) {
+                    textList.get(0).setText(((Gbean)eObject).getName());
+                    textList.get(1).setText(((Gbean)eObject).getClazz());
+                    element.select(GBEAN);
+                }
+                else if (Attribute.class.isInstance(eObject)) {
+                    textList.get(0).setText(((Attribute)eObject).getName());
+                    textList.get(1).setText(((Attribute)eObject).getType());
+                    textList.get(2).setText(((Attribute)eObject).getValue());
+                    element.select(ATTRIBUTE);
+                }
+                else if (Pattern.class.isInstance(eObject)) {
+                    textList.get(0).setText(((Pattern)eObject).getGroupId());
+                    textList.get(1).setText(((Pattern)eObject).getArtifactId());
+                    textList.get(2).setText(((Pattern)eObject).getVersion());
+                    textList.get(3).setText(((Pattern)eObject).getModule());
+                    textList.get(4).setText(((Pattern)eObject).getType());
+                    textList.get(5).setText(((Pattern)eObject).getCustomFoo());
+                    element.select(DEPENDENCY);
+                }
+                else if (Reference.class.isInstance(eObject)) {
+                    textList.get(0).setText(((Reference)eObject).getName());
+                    textList.get(1).setText(((Reference)eObject).getGroupId());
+                    textList.get(2).setText(((Reference)eObject).getArtifactId());
+                    textList.get(3).setText(((Reference)eObject).getVersion());
+                    textList.get(4).setText(((Reference)eObject).getModule());
+                    textList.get(5).setText(((Reference)eObject).getType());
+                    textList.get(6).setText(((Reference)eObject).getCustomFoo());
+                    element.select(REFERENCE);
+                }
+                element.setEnabled(false);
+            }
+        }
+        
+        protected void toggleFields (boolean clearFields) {
+            int selection = element.getSelectionIndex();
+            switch (selection) {
+            case GBEAN:
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 2 ? true : false);
+                    textList.get(i).setVisible(i < 2 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.className);
+                // if we are doing an add, then we need to make sure that the longest
+                // text can be handled
+                labelList.get(2).setText(CommonMessages.groupId);
+                labelList.get(3).setText(CommonMessages.artifactId);
+                labelList.get(4).setText(CommonMessages.moduleId);
+                labelList.get(5).setText(CommonMessages.artifactType);
+                labelList.get(6).setText(CommonMessages.customName);
+                break;
+            case ATTRIBUTE:
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 3 ? true : false);
+                    textList.get(i).setVisible(i < 3 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.type);
+                labelList.get(2).setText(CommonMessages.value);
+                break;
+            case DEPENDENCY:
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 6 ? true : false);
+                    textList.get(i).setVisible(i < 6 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.groupId);
+                labelList.get(1).setText(CommonMessages.artifactId);
+                labelList.get(2).setText(CommonMessages.version);
+                labelList.get(3).setText(CommonMessages.moduleId);
+                labelList.get(4).setText(CommonMessages.artifactType);
+                labelList.get(5).setText(CommonMessages.customName);
+                break;
+            case REFERENCE:
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(true);
+                    textList.get(i).setVisible(true);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.groupId);
+                labelList.get(2).setText(CommonMessages.artifactId);
+                labelList.get(3).setText(CommonMessages.version);
+                labelList.get(4).setText(CommonMessages.moduleId);
+                labelList.get(5).setText(CommonMessages.artifactType);
+                labelList.get(6).setText(CommonMessages.customName);
+                break;
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardEditTitle_GBean;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageTitle_GBean;
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new GBeanWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        Gbean gbean;
+        switch (element.getSelectionIndex()) {
+        case GBEAN:
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            gbean = (Gbean)eObject;
+            if (gbean == null) {
+                gbean = (Gbean)getEFactory().create(Gbean.class);
+                JAXBElement plan = section.getPlan();
+                
+                // add the JAXBElement of a GBean, not the GBean
+                ObjectFactory objectFactory = new ObjectFactory();
+                JAXBModelUtils.getGbeans(plan).add(objectFactory.createGbean((Gbean)gbean));
+            }
+            gbean.setName(textList.get(0).getText());
+            gbean.setClazz(textList.get(1).getText());
+            break;
+
+        case ATTRIBUTE:
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            Attribute attribute = (Attribute)eObject;
+            if (attribute == null) {
+                attribute = (Attribute)getEFactory().create(Attribute.class);
+                gbean = (Gbean)section.getSelectedObject();
+                
+                // add the JAXBElement of an Attribute, not the Attribute
+                ObjectFactory objectFactory = new ObjectFactory();
+                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanAttribute(attribute));
+            }
+            attribute.setName(textList.get(0).getText());
+            attribute.setType(textList.get(1).getText());
+            attribute.setValue(textList.get(2).getText());
+            break;
+
+        case DEPENDENCY:
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            Pattern dependency = (Pattern)eObject;
+            if (dependency == null) {
+                dependency = (Pattern)getEFactory().create(Pattern.class);
+                gbean = (Gbean)section.getSelectedObject();
+
+                // add the JAXBElement of a Dependency, not the Dependency
+                ObjectFactory objectFactory = new ObjectFactory();
+                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanDependency(dependency));
+            }
+            dependency.setGroupId(textList.get(0).getText());
+            dependency.setArtifactId(textList.get(1).getText());
+            dependency.setVersion(textList.get(2).getText());
+            dependency.setModule(textList.get(3).getText());
+            dependency.setType(textList.get(4).getText());
+            dependency.setCustomFoo(textList.get(5).getText());
+            break;
+
+        case REFERENCE:
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText()) ||
+                    isEmpty(textList.get(2).getText())) {
+                return false;
+            }
+            Reference reference = (Reference)eObject;
+            if (reference == null) {
+                reference = (Reference)getEFactory().create(Reference.class);
+                gbean = (Gbean)section.getSelectedObject();
+
+                // add the JAXBElement of a Dependency, not the Dependency
+                ObjectFactory objectFactory = new ObjectFactory();
+                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanReference(reference));
+            }
+            reference.setName(textList.get(0).getText());
+            reference.setGroupId(textList.get(1).getText());
+            reference.setArtifactId(textList.get(2).getText());
+            reference.setVersion(textList.get(3).getText());
+            reference.setModule(textList.get(4).getText());
+            reference.setType(textList.get(5).getText());
+            reference.setCustomFoo(textList.get(6).getText());
+            break;
+        }
+        return true;
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_GBean;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_GBean;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/GBeanWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.apache.geronimo.system.plugin.model.LicenseType;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class LicenseWizard extends AbstractWizard {
+
+    protected LicenseType license;
+    
+    protected Text licenseName;
+    
+    protected Combo osiApproved;
+    
+    public LicenseWizard (LicenseType oldLicense) {
+        super();
+        license = oldLicense;
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_License;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_License;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new MessageDestWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class MessageDestWizardPage extends AbstractWizardPage {
+        public MessageDestWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            createLabel (composite, CommonMessages.license);
+            licenseName = createTextField (composite, "");
+            createLabel (composite, CommonMessages.osiApproved);
+            String[] values = {"true", "false"};
+            osiApproved = createCombo (composite, values, false);
+
+            if (license != null) {
+                licenseName.setText(license.getValue());
+                osiApproved.setText(String.valueOf(license.isOsiApproved()));
+            }
+            setControl(composite);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_License;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_License;
+        }
+    }
+    
+    public boolean performFinish() {
+        license = new LicenseType();
+        license.setValue(licenseName.getText());
+        license.setOsiApproved(Boolean.parseBoolean(osiApproved.getText()));
+
+        return true;
+    }
+    
+    public LicenseType getLicense() {
+        return license;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/LicenseWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.jee.naming.MessageDestination;
+import org.apache.geronimo.jee.naming.Pattern;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class MessageDestWizard extends AbstractTableWizard {
+
+    public MessageDestWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "MessageDestinationName", "AdminObjectModule", "AdminObjectLink",
+                "GroupId", "ArtifactId", "Version", "Module", "Name"};
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_MessageDest;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_MessageDest;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new MessageDestWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class MessageDestWizardPage extends AbstractTableWizardPage {
+        public MessageDestWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            for (int i = 0; i < section.getTableColumnNames().length; i++) {
+                Label label = new Label(composite, SWT.LEFT);
+                String columnName = section.getTableColumnNames()[i];
+                if (!columnName.endsWith(":"))
+                    columnName = columnName.concat(":");
+                label.setText(columnName);
+                GridData data = new GridData();
+                data.horizontalAlignment = GridData.FILL;
+                label.setLayoutData(data);
+
+                Text text = new Text(composite, SWT.SINGLE | SWT.BORDER);
+                data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+                        | GridData.VERTICAL_ALIGN_FILL);
+                data.grabExcessHorizontalSpace = true;
+                data.widthHint = 100;
+                text.setLayoutData(data);
+                if (eObject != null) {
+                    if (i > 2) {
+                        // get the pattern value
+                        Pattern pattern = ((MessageDestination) eObject).getPattern();
+                        String value = null;
+                        try {
+                            value = (String) JAXBUtils.getValue(pattern,getTableColumnEAttributes()[i]);
+                        } catch (Exception e) {
+                            MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+                        }
+                        if (value != null) {
+                            text.setText(value);
+                        }                        
+                    }
+                    else
+                    {
+                        String value = null;
+                        try {
+                            value = (String) JAXBUtils.getValue(eObject,getTableColumnEAttributes()[i]);
+                        } catch (Exception e) {
+                            MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+                        }
+                        if (value != null) {
+                            text.setText(value);
+                        }
+                    }
+                }
+                textEntries[i] = text;
+            }
+
+            doCustom(composite);
+            setControl(composite);
+            textEntries[0].setFocus();
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_MessageDest;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_MessageDest;
+        }
+    }
+    
+    public boolean performFinish() {
+        AbstractTableWizardPage page = (AbstractTableWizardPage) getPages()[0];
+        Pattern msgPattern;
+        MessageDestination messageDest;
+
+        if (eObject == null) {
+            eObject = getEFactory().create(MessageDestination.class);
+            JAXBElement plan = section.getPlan();
+
+            messageDest = (MessageDestination)eObject;
+            msgPattern = (Pattern)getEFactory().create(Pattern.class);
+            messageDest.setPattern(msgPattern);
+
+            List msgDestList = JAXBModelUtils.getMessageDestinations(plan); 
+            if (msgDestList == null) {
+                msgDestList = (List)getEFactory().create(MessageDestination.class);
+            }
+            msgDestList.add(eObject);
+        }
+
+        // NOTE!! this replaces the call to processEAttributes (page);
+        messageDest =(MessageDestination) eObject; 
+        msgPattern = messageDest.getPattern();
+        for (int i = 0; i < 8; i++) {
+            String value = page.getTextEntry(i).getText();
+            String attribute = getTableColumnEAttributes()[i];
+            if (i < 3)
+                try {
+                    JAXBUtils.setValue(eObject, attribute, value);
+                } catch (Exception e) {
+                    MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+                }
+            else
+                try {
+                    JAXBUtils.setValue(msgPattern, attribute, value);
+                } catch (Exception e) {
+                    MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+                }
+        }
+        
+        if (section.getViewer().getInput() == section.getPlan()) {
+            section.getViewer().setInput(section.getInput());
+        }
+
+        return true;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/MessageDestWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.jee.application.Application;
+import org.apache.geronimo.jee.application.Module;
+import org.apache.geronimo.jee.application.Path;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+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;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ModuleWizard extends AbstractTableWizard {
+
+    public ModuleWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "ModuleType", "Path", "AltDd" };
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_Module;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_Module;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new ModuleWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class ModuleWizardPage extends AbstractTableWizardPage {
+        protected Button[] buttonList = new Button[4];
+        
+        public ModuleWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            GridData data;
+            Module module = (Module)eObject;
+            
+            // First we need a set of radio buttons to determine what kind of module we are
+            // dealing with.
+            Group group = new Group (composite, SWT.NONE);
+            Button button = new Button (group, SWT.RADIO);
+            button.setText(CommonMessages.connector);
+            buttonList[0] = button;
+            button = new Button (group, SWT.RADIO);
+            button.setText(CommonMessages.ejb);
+            buttonList[1] = button;
+            button = new Button (group, SWT.RADIO);
+            button.setText(CommonMessages.java);
+            buttonList[2] = button;
+            button = new Button (group, SWT.RADIO);
+            button.setText(CommonMessages.web);
+            buttonList[3] = button;
+            FillLayout fillLayout = new FillLayout();
+            fillLayout.type = SWT.HORIZONTAL;
+            group.setLayout(fillLayout);
+            data = new GridData();
+            data.horizontalAlignment = GridData.FILL;
+            data.horizontalSpan = 2;
+            group.setLayoutData(data);
+            
+            for (int i = 1; i < section.getTableColumnNames().length; i++) {
+                Label label = new Label(composite, SWT.LEFT);
+                String columnName = section.getTableColumnNames()[i];
+                if (!columnName.endsWith(":"))
+                    columnName = columnName.concat(":");
+                label.setText(columnName);
+                data = new GridData();
+                data.horizontalAlignment = GridData.FILL;
+                label.setLayoutData(data);
+
+                Text text = new Text(composite, SWT.SINGLE | SWT.BORDER);
+                data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+                        | GridData.VERTICAL_ALIGN_FILL);
+                data.grabExcessHorizontalSpace = true;
+                data.widthHint = 100;
+                text.setLayoutData(data);
+                if (module != null) {
+                    if (i == 1) {
+                        if (module.getConnector() != null) {
+                            text.setText(module.getConnector().getValue());
+                            buttonList[0].setSelection(true);
+                        }
+                        else if (module.getEjb() != null) {
+                            text.setText(module.getEjb().getValue());
+                            buttonList[1].setSelection(true);
+                        }
+                        else if (module.getJava() != null) {
+                            text.setText(module.getJava().getValue());
+                            buttonList[2].setSelection(true);
+                        }
+                        else if (module.getWeb() != null) {
+                            text.setText(module.getWeb().getValue());
+                            buttonList[3].setSelection(true);
+                        }                        
+                    }
+                    else if (i == 2 && module.getAltDd() != null) {
+                        text.setText(module.getAltDd().getValue());
+                    }
+                }
+                textEntries[i - 1] = text;
+            }
+
+            doCustom(composite);
+            setControl(composite);
+            textEntries[0].setFocus();
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_Module;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_Module;
+        }
+    }
+
+    public boolean performFinish() {
+        AbstractTableWizardPage page = (AbstractTableWizardPage) getPages()[0];
+        Path path;
+        Module module;
+
+        if (eObject == null) {
+            eObject = getEFactory().create(Module.class);
+            JAXBElement plan = section.getPlan();
+
+            module = (Module)eObject;
+
+            List moduleList = ((Application)plan.getValue()).getModule();
+            if (moduleList == null) {
+                moduleList = (List)getEFactory().create(Module.class);
+            }
+            moduleList.add(eObject);
+        }
+        else {
+            module = (Module)eObject;
+            module.setConnector(null);
+            module.setEjb(null);
+            module.setJava(null);
+            module.setWeb(null);
+        }
+
+        // NOTE!! this replaces the call to processEAttributes (page);
+        path = (Path)getEFactory().create(Path.class);
+        path.setValue(page.getTextEntry(0).getText());
+
+        if (((ModuleWizardPage)page).buttonList[0].getSelection())
+            module.setConnector(path);
+        else if (((ModuleWizardPage)page).buttonList[1].getSelection())
+            module.setEjb(path);
+        else if (((ModuleWizardPage)page).buttonList[2].getSelection())
+            module.setJava(path);
+        else if (((ModuleWizardPage)page).buttonList[3].getSelection())
+            module.setWeb(path);
+        
+        String altDD = page.getTextEntry(1).getText();
+        path = (Path)getEFactory().create(Path.class);
+        path.setValue(altDD);
+        module.setAltDd(path);
+        
+        if (section.getViewer().getInput() == section.getPlan()) {
+            section.getViewer().setInput(section.getInput());
+        }
+
+        return true;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ModuleWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.jee.naming.PersistenceContextRef;
+import org.apache.geronimo.jee.naming.PersistenceContextType;
+import org.apache.geronimo.jee.naming.ObjectFactory;
+import org.apache.geronimo.jee.naming.Pattern;
+import org.apache.geronimo.jee.naming.Property;
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class PersContextRefWizard extends AbstractTreeWizard {
+
+    private final int CONTEXT = 0;
+    private final int PROPERTY = 1;
+    
+    private final String[] CONTEXT_TYPES = {
+            "Extended", "Transactional" };
+    protected Combo contextType;
+    protected Button specifyUnit;
+    protected Button specifyPattern;
+    
+    public PersContextRefWizard(AbstractTreeSection section) {
+        super(section, 2, 8);
+        elementTypes[CONTEXT] = "Persistence Context";
+        elementTypes[PROPERTY] = "Property";
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_PersContextRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_PersContextRef;
+    }
+ 
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new PersContextRefWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class PersContextRefWizardPage extends AbstractTreeWizardPage {
+        public PersContextRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        @Override
+        public void createControl(Composite parent) {
+            Label label;
+            Text text;
+            Composite composite = createComposite(parent);
+            createLabel(composite, CommonMessages.element);
+            element = createCombo(composite, elementTypes, false);
+            for (int i = 0; i < maxTextFields; i++) {
+                label = createLabel(composite, "");
+                labelList.add(label);
+                if (i == 1) {
+                    contextType = createCombo(composite, CONTEXT_TYPES, false);
+                    textList.add (null);
+                    specifyUnit = createButton(composite, CommonMessages.useUnitName);
+                }
+                else {
+                    text = createTextField(composite, "");
+                    textList.add(text);
+                    if (i == 2) {
+                        specifyPattern = createButton(composite, CommonMessages.usePattern);
+                    }
+                }
+            }
+            element.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent arg0) {
+                    toggleFields(true);
+                }
+            });
+            specifyUnit.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent arg0) {
+                    toggleFields(false);
+                }
+            });
+            specifyPattern.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent arg0) {
+                    toggleFields(false);
+                }
+            });
+            
+            initControl();
+            toggleFields(false);
+            setControl(composite);
+        }
+
+        protected void initControl () {
+            if (eObject == null) {
+                element.select(CONTEXT);
+                PersistenceContextRef contextRef = (PersistenceContextRef)section.getSelectedObject();
+                if (contextRef == null) {
+                    element.setEnabled(false);
+                }
+            }
+            else {
+                if (JAXBElement.class.isInstance(eObject)) {
+                    eObject = ((JAXBElement)eObject).getValue();
+                    PersistenceContextRef contextRef = (PersistenceContextRef)eObject;
+                    textList.get(0).setText(contextRef .getPersistenceContextRefName());
+                    contextType.setText(contextRef .getPersistenceContextType().value());
+                    if (contextRef .getPersistenceUnitName() != null)
+                        textList.get(2).setText(contextRef .getPersistenceUnitName());
+                    if (contextRef .getPattern() != null) {
+                        specifyPattern.setSelection(true);
+                        textList.get(3).setText(contextRef.getPattern().getName());
+                        if (contextRef .getPattern().getGroupId() != null)
+                            textList.get(4).setText(contextRef .getPattern().getGroupId());
+                        if (contextRef .getPattern().getArtifactId() != null)
+                            textList.get(5).setText(contextRef .getPattern().getArtifactId());
+                        if (contextRef .getPattern().getVersion() != null)
+                            textList.get(6).setText(contextRef .getPattern().getVersion());
+                        if (contextRef .getPattern().getModule() != null)
+                            textList.get(7).setText(contextRef .getPattern().getModule());
+                    }
+                    element.select(CONTEXT);
+                }
+                else if (Property.class.isInstance(eObject)) {
+                    textList.get(0).setText(((Property)eObject).getKey());
+                    textList.get(2).setText(((Property)eObject).getValue());
+                    element.select(PROPERTY);
+                }
+                element.setEnabled(false);
+            }
+        }
+        
+        protected void toggleFields (boolean clearFields) {
+            if (element.getText().equals(elementTypes[CONTEXT])) {
+                labelList.get(0).setText(CommonMessages.contextName);
+                labelList.get(2).setText(CommonMessages.unitName);
+                textList.get(2).setEnabled(specifyUnit.getSelection());
+                labelList.get(1).setVisible(true);
+                contextType.setVisible(true);    
+                specifyUnit.setVisible(true);
+                specifyPattern.setVisible(true);
+            }
+            else {
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(2).setText(CommonMessages.value);
+                textList.get(2).setEnabled(true);
+                labelList.get(1).setVisible(false);
+                contextType.setVisible(false);
+                specifyUnit.setVisible(false);
+                specifyPattern.setVisible(false);
+            }
+            labelList.get(1).setText(CommonMessages.type);
+            labelList.get(3).setText(CommonMessages.name);
+            labelList.get(4).setText(CommonMessages.groupId);
+            labelList.get(5).setText(CommonMessages.artifactId);
+            labelList.get(6).setText(CommonMessages.version);
+            labelList.get(7).setText(CommonMessages.moduleId);
+            for (int i = 3; i < maxTextFields; i++) {
+                labelList.get(i).setVisible(element.getText().equals(elementTypes[CONTEXT]));
+                textList.get(i).setVisible(element.getText().equals(elementTypes[CONTEXT]));
+                textList.get(i).setEnabled(specifyPattern.getSelection());
+                if (clearFields == true) {
+                    textList.get(i).setText("");
+                }
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_PersContextRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_PersContextRef;
+        }
+    }
+
+    @Override
+    public boolean performFinish() {
+        PersistenceContextRef contextRef;
+        if (element.getText().equals(elementTypes[CONTEXT])) {
+            if (isEmpty(textList.get(0).getText()) ||
+                isEmpty(textList.get(2).getText()) && isEmpty(textList.get(3).getText())) {
+                return false;
+            }
+            contextRef = (PersistenceContextRef)eObject;
+            ObjectFactory objectFactory = new ObjectFactory();
+            if (contextRef == null) {
+                contextRef = (PersistenceContextRef)getEFactory().create(PersistenceContextRef.class);
+                JAXBElement plan = section.getPlan();
+
+                // add the JAXBElement of the PersistenceContextRef
+                JAXBModelUtils.getGbeanRefs(plan).add(objectFactory.createPersistenceContextRef(contextRef));
+                section.getObjectContainer().add(objectFactory.createPersistenceContextRef(contextRef));
+            }
+            contextRef.setPersistenceContextRefName(textList.get(0).getText());
+            contextRef.setPersistenceContextType(PersistenceContextType.fromValue(contextType.getText()));
+            if (specifyUnit.getSelection() == true) {
+                contextRef.setPersistenceUnitName(textList.get(2).getText());
+                contextRef.setPattern(null);
+            }
+            else {
+                contextRef.setPersistenceUnitName(null);
+                Pattern pattern = contextRef.getPattern();
+                if (pattern == null) {
+                    pattern = objectFactory.createPattern();
+                }
+                pattern.setName(textList.get(3).getText());
+                pattern.setGroupId(textList.get(4).getText());
+                pattern.setArtifactId(textList.get(5).getText());
+                pattern.setVersion(textList.get(6).getText());
+                pattern.setModule(textList.get(7).getText());
+                contextRef.setPattern(pattern);
+            }
+        }
+        else if (element.getText().equals(elementTypes[PROPERTY])) { 
+            if (isEmpty(textList.get(0).getText())) {
+                return false;
+            }
+            Property property = (Property)eObject;
+            if (property == null) {
+                property = (Property)getEFactory().create(Property.class);
+                contextRef = (PersistenceContextRef)section.getSelectedObject();
+                contextRef.getProperty().add(property);
+            }
+            property.setKey(textList.get(0).getText());
+            property.setValue(textList.get(2).getText());
+        }
+        return true;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersContextRefWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.jee.naming.PersistenceUnitRef;
+import org.apache.geronimo.jee.naming.ObjectFactory;
+import org.apache.geronimo.jee.naming.Pattern;
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class PersUnitRefWizard extends AbstractTreeWizard {
+
+    protected Button specifyUnit;
+    protected Button specifyPattern;
+    
+    public PersUnitRefWizard(AbstractTreeSection section) {
+        super(section, 1, 7);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_PersUnitRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_PersUnitRef;
+    }
+ 
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new PersUnitRefWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class PersUnitRefWizardPage extends AbstractTreeWizardPage {
+        public PersUnitRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        @Override
+        public void createControl(Composite parent) {
+            Label label;
+            Text text;
+            Composite composite = createComposite(parent);
+            for (int i = 0; i < maxTextFields; i++) {
+                label = createLabel(composite, "");
+                labelList.add(label);
+                text = createTextField(composite, "");
+                textList.add(text);
+                if (i == 0) {
+                    specifyUnit = createButton(composite, CommonMessages.useUnitName);
+                }
+                if (i == 1) {
+                    specifyPattern = createButton(composite, CommonMessages.usePattern);
+                }
+            }
+            specifyUnit.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent arg0) {
+                    toggleFields(false);
+                }
+            });
+            specifyPattern.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent arg0) {
+                    toggleFields(false);
+                }
+            });
+            
+            initControl();
+            toggleFields(false);
+            setControl(composite);
+        }
+
+        protected void initControl () {
+            if (eObject != null) {
+                if (JAXBElement.class.isInstance(eObject)) {
+                    eObject = ((JAXBElement)eObject).getValue();
+                    PersistenceUnitRef unitRef = (PersistenceUnitRef)eObject;
+                    textList.get(0).setText(unitRef.getPersistenceUnitRefName());
+                    if (unitRef.getPersistenceUnitName() != null)
+                        textList.get(1).setText(unitRef.getPersistenceUnitName());
+                    if (unitRef.getPattern() != null) {
+                        specifyPattern.setSelection(true);
+                        textList.get(2).setText(unitRef.getPattern().getName());
+                        if (unitRef.getPattern().getGroupId() != null)
+                            textList.get(3).setText(unitRef.getPattern().getGroupId());
+                        if (unitRef.getPattern().getArtifactId() != null)
+                            textList.get(4).setText(unitRef.getPattern().getArtifactId());
+                        if (unitRef.getPattern().getVersion() != null)
+                            textList.get(5).setText(unitRef.getPattern().getVersion());
+                        if (unitRef.getPattern().getModule() != null)
+                            textList.get(6).setText(unitRef.getPattern().getModule());
+                    }
+                }
+            }
+        }
+        
+        protected void toggleFields (boolean clearFields) {
+            labelList.get(0).setText(CommonMessages.contextName);
+            labelList.get(1).setText(CommonMessages.unitName);
+            textList.get(1).setEnabled(specifyUnit.getSelection());
+
+            labelList.get(2).setText(CommonMessages.name);
+            labelList.get(3).setText(CommonMessages.groupId);
+            labelList.get(4).setText(CommonMessages.artifactId);
+            labelList.get(5).setText(CommonMessages.version);
+            labelList.get(6).setText(CommonMessages.moduleId);
+            for (int i = 2; i < maxTextFields; i++) {
+                textList.get(i).setEnabled(specifyPattern.getSelection());
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_PersUnitRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_PersUnitRef;
+        }
+    }
+
+    @Override
+    public boolean performFinish() {
+        PersistenceUnitRef unitRef;
+        if (isEmpty(textList.get(0).getText()) ||
+            isEmpty(textList.get(1).getText()) && isEmpty(textList.get(2).getText())) {
+            return false;
+        }
+        unitRef = (PersistenceUnitRef)eObject;
+        ObjectFactory objectFactory = new ObjectFactory();
+        if (unitRef == null) {
+            unitRef = (PersistenceUnitRef)getEFactory().create(PersistenceUnitRef.class);
+            JAXBElement plan = section.getPlan();
+
+            // add the JAXBElement of the PersistenceContextRef
+            JAXBModelUtils.getGbeanRefs(plan).add(objectFactory.createPersistenceUnitRef(unitRef));
+            section.getObjectContainer().add(objectFactory.createPersistenceUnitRef(unitRef));
+        }
+        unitRef.setPersistenceUnitRefName(textList.get(0).getText());
+        if (specifyUnit.getSelection() == true) {
+            unitRef.setPersistenceUnitName(textList.get(1).getText());
+            unitRef.setPattern(null);
+        }
+        else {
+            unitRef.setPersistenceUnitName(null);
+            Pattern pattern = unitRef.getPattern();
+            if (pattern == null) {
+                pattern = objectFactory.createPattern();
+            }
+            pattern.setName(textList.get(2).getText());
+            pattern.setGroupId(textList.get(3).getText());
+            pattern.setArtifactId(textList.get(4).getText());
+            pattern.setVersion(textList.get(5).getText());
+            pattern.setModule(textList.get(6).getText());
+            unitRef.setPattern(pattern);
+        }
+
+        return true;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PersUnitRefWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.apache.geronimo.system.plugin.model.ArtifactType;
+import org.apache.geronimo.system.plugin.model.PrerequisiteType;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class PrerequisiteWizard extends AbstractWizard {
+
+    protected PrerequisiteType prereq;
+    
+    protected Text group;
+    protected Text artifact;
+    protected Text version;
+    protected Text type;
+    protected Text description;
+    
+    public PrerequisiteWizard (PrerequisiteType oldPrereq) {
+        super();
+        prereq = oldPrereq;
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_Prerequisite;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_Prerequisite;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new MessageDestWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class MessageDestWizardPage extends AbstractWizardPage {
+        public MessageDestWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            createLabel (composite, CommonMessages.groupId);
+            group = createTextField (composite, "");
+            createLabel (composite, CommonMessages.artifactId);
+            artifact = createTextField (composite, "");
+            createLabel (composite, CommonMessages.version);
+            version = createTextField (composite, "");
+            createLabel (composite, CommonMessages.type);
+            type = createTextField (composite, "");
+            createLabel (composite, CommonMessages.description);
+            description = createTextField (composite, "");
+            
+            group.addModifyListener(new ModifyListener(){
+                public void modifyText(ModifyEvent arg0) {
+                    PrerequisiteWizard.this.getContainer().updateButtons();
+                }
+            });
+            
+            artifact.addModifyListener(new ModifyListener(){
+                public void modifyText(ModifyEvent arg0) {
+                    PrerequisiteWizard.this.getContainer().updateButtons();
+                }
+            });
+            
+            type.addModifyListener(new ModifyListener(){
+                public void modifyText(ModifyEvent arg0) {
+                    PrerequisiteWizard.this.getContainer().updateButtons();
+                }
+            });
+
+            if (prereq != null) {
+                group.setText(prereq.getId().getGroupId());
+                artifact.setText(prereq.getId().getArtifactId());
+                version.setText(prereq.getId().getVersion());
+                type.setText(prereq.getResourceType());
+                description.setText(prereq.getDescription());
+            }
+            setControl(composite);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_Prerequisite;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_Prerequisite;
+        }
+        
+    }
+    
+    public boolean performFinish() {
+        prereq = new PrerequisiteType();
+        ArtifactType artType = new ArtifactType();
+        artType.setGroupId(group.getText());
+        artType.setArtifactId(artifact.getText());
+        artType.setType(type.getText());
+        if(!"".equals(version.getText()))
+            artType.setVersion(version.getText());
+        prereq.setId(artType);
+        prereq.setResourceType(type.getText());
+        prereq.setDescription(description.getText());
+
+        return true;
+    }
+    
+    public PrerequisiteType getPrerequisite() {
+        return prereq;
+    }
+    
+    public boolean canFinish(){
+        if (group.getText()!=null && group.getText().length()!=0
+                && artifact.getText()!=null && artifact.getText().length()!=0
+                && type.getText()!=null && type.getText().length()!=0){
+            return true;
+        }else return false;
+    }
+   
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/PrerequisiteWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ResourceEnvRefWizard extends AbstractTableWizard {
+
+ 
+    public ResourceEnvRefWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "RefName", "MessageDestinationLink" };
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardPageTitle_ResEnvRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_ResEnvRef;
+    }
+    
+    public void addPages() {
+        addPage(new ResourceEnvRefWizardPage("Page0"));
+    }
+
+    public class ResourceEnvRefWizardPage extends AbstractTableWizardPage {
+        public ResourceEnvRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_ResEnvRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_ResEnvRef;
+        }
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceEnvRefWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java?rev=938593&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java Tue Apr 27 18:20:22 2010
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.wizards;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ResourceRefWizard extends AbstractTableWizard {
+
+    public ResourceRefWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "RefName", "ResourceLink" };
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardPageTitle_ResRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_ResRef;
+    }
+    
+    public void addPages() {
+        addPage(new ResourceRefWizardPage("Page0"));
+    }
+
+    public class ResourceRefWizardPage extends AbstractTableWizardPage {
+        public ResourceRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_ResRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_ResRef;
+        }
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ResourceRefWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message