geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r812442 - /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/ServerCustomAssemblyWizard.java
Date Tue, 08 Sep 2009 10:32:41 GMT
Author: delos
Date: Tue Sep  8 10:32:41 2009
New Revision: 812442

URL: http://svn.apache.org/viewvc?rev=812442&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/branches/2.1.5/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerCustomAssemblyWizard.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/ServerCustomAssemblyWizard.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/ServerCustomAssemblyWizard.java?rev=812442&r1=812441&r2=812442&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/ServerCustomAssemblyWizard.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/ServerCustomAssemblyWizard.java
Tue Sep  8 10:32:41 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;
@@ -75,6 +79,37 @@
             serverPath = createTextField(composite, "var/temp/assembly");
             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);
         }
@@ -153,4 +188,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