geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r295102 - /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
Date Wed, 05 Oct 2005 20:18:46 GMT
Author: sppatel
Date: Wed Oct  5 13:18:38 2005
New Revision: 295102

URL: http://svn.apache.org/viewcvs?rev=295102&view=rev
Log:
fill in table after performFinish()

Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java?rev=295102&r1=295101&r2=295102&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DependencyWizard.java
Wed Oct  5 13:18:38 2005
@@ -32,6 +32,7 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 
 public class DependencyWizard extends DynamicAddEditWizard {
@@ -113,9 +114,13 @@
      * @see org.eclipse.jface.wizard.IWizard#performFinish()
      */
     public boolean performFinish() {
-        if (eObject == null) {
+        
+        boolean isNew = false;
+        
+        if (eObject == null) {            
             eObject = DeploymentFactory.eINSTANCE.createDependencyType();
             ((EList) section.getPlan().eGet(section.getEReference())).add(eObject);
+            isNew = true;
         }
         
         DependencyType dt = (DependencyType) eObject;
@@ -130,6 +135,23 @@
             dt.setGroupId(groupIdText.getText());
             dt.setVersion(versionText.getText());
             dt.eUnset(DeploymentPackage.eINSTANCE.getDependencyType_Uri());
+        }
+        
+        String[] tableText = section.getTableText(eObject);
+
+        if (isNew) {
+            TableItem item = new TableItem(section.getTableViewer().getTable(),
+                    SWT.NONE);
+            item.setImage(section.getImage());
+            item.setData(eObject);
+            item.setText(tableText);
+        } else {
+            int index = section.getTableViewer().getTable().getSelectionIndex();
+            if (index != -1) {
+                TableItem item = section.getTableViewer().getTable().getItem(
+                        index);
+                item.setText(tableText);
+            }
         }
 
         return true;



Mime
View raw message