geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r812441 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerCustomAssemblyWizard.java
Date Tue, 08 Sep 2009 10:32:11 GMT
Author: delos
Date: Tue Sep  8 10:32:11 2009
New Revision: 812441

URL: http://svn.apache.org/viewvc?rev=812441&view=rev
Log:
GERONIMODEVTOOLS-571 "Next" or "Finish" Button displays when required fields are not selected
or checked during convert plugin

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

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerCustomAssemblyWizard.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/ServerCustomAssemblyWizard.java?rev=812441&r1=812440&r2=812441&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerCustomAssemblyWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerCustomAssemblyWizard.java
Tue Sep  8 10:32:11 2009
@@ -22,6 +22,10 @@
 import org.apache.geronimo.st.ui.wizards.AbstractWizard;
 import org.apache.geronimo.st.v21.core.operations.GeronimoServerPluginManager;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Table;
@@ -76,6 +80,37 @@
             createTable(composite);
             populateTable();
 
+            group.addModifyListener(new ModifyListener(){
+				public void modifyText(ModifyEvent arg0) {
+					ServerCustomAssemblyWizard.this.getContainer().updateButtons();
+				}
+            });
+            artifact.addModifyListener(new ModifyListener(){
+				public void modifyText(ModifyEvent arg0) {
+					ServerCustomAssemblyWizard.this.getContainer().updateButtons();
+				}
+            });
+            version.addModifyListener(new ModifyListener(){
+				public void modifyText(ModifyEvent arg0) {
+					ServerCustomAssemblyWizard.this.getContainer().updateButtons();
+				}
+            });
+            type.addModifyListener(new ModifyListener(){
+				public void modifyText(ModifyEvent arg0) {
+					ServerCustomAssemblyWizard.this.getContainer().updateButtons();
+				}
+            });
+            serverPath.addModifyListener(new ModifyListener(){
+				public void modifyText(ModifyEvent arg0) {
+					ServerCustomAssemblyWizard.this.getContainer().updateButtons();
+				}
+            });
+            pluginTable.addSelectionListener(new SelectionAdapter(){
+				public void widgetSelected(SelectionEvent arg0) {
+					ServerCustomAssemblyWizard.this.getContainer().updateButtons();
+				}
+            });
+            
             setControl(composite);
         }
 
@@ -131,6 +166,8 @@
         protected String getWizardPageDescription() {
             return CommonMessages.wizardPageDescription_ServerCustomAssembly;
         }
+        
+        
     }
 
     public boolean performFinish() {
@@ -153,4 +190,12 @@
     protected String getEditWizardWindowTitle() {
         return CommonMessages.wizardNewTitle_ServerCustomAssembly;
     }
+    
+    public boolean canFinish(){
+    	 if (isEmpty(group.getText()) || isEmpty(artifact.getText()) ||
+    	            isEmpty(version.getText()) || isEmpty(type.getText()) ||
+    	            isEmpty(serverPath.getText()) || pluginTable.getSelectionCount() == 0) {
+    		 return false;
+    	 }else return true;
+    }
 }



Mime
View raw message