geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r812398 - /geronimo/devtools/eclipse-plugin/branches/2.1.5/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:55:57 GMT
Author: delos
Date: Tue Sep  8 08:55:57 2009
New Revision: 812398

URL: http://svn.apache.org/viewvc?rev=812398&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/branches/2.1.5/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.5/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/branches/2.1.5/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java?rev=812398&r1=812397&r2=812398&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/PrerequisiteWizard.java
Tue Sep  8 08:55:57 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());
@@ -114,4 +134,12 @@
     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