geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r812396 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java
Date Tue, 08 Sep 2009 08:52:35 GMT
Author: delos
Date: Tue Sep  8 08:52:34 2009
New Revision: 812396

URL: http://svn.apache.org/viewvc?rev=812396&view=rev
Log:
GERONIMODEVTOOLS-587 Using GEP to convert an application to a plugin, if add prerequisite
module,will encouter an error when install the plugin. Thanks Rodger for the patch!

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java?rev=812396&r1=812395&r2=812396&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java
Tue Sep  8 08:52:34 2009
@@ -20,6 +20,8 @@
 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;
 
@@ -77,6 +79,24 @@
             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());
@@ -95,6 +115,7 @@
         public String getWizardPageDescription() {
             return CommonMessages.wizardPageDescription_Prerequisite;
         }
+        
     }
     
     public boolean performFinish() {
@@ -103,7 +124,8 @@
         artType.setGroupId(group.getText());
         artType.setArtifactId(artifact.getText());
         artType.setType(type.getText());
-        artType.setVersion(version.getText());
+        if(!"".equals(version.getText()))
+        	artType.setVersion(version.getText());
         prereq.setId(artType);
         prereq.setResourceType(type.getText());
         prereq.setDescription(description.getText());
@@ -114,4 +136,13 @@
     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;
+    }
+   
 }



Mime
View raw message