-> Rename SlcExecution to Process
authorBruno Sinou <bsinou@argeo.org>
Tue, 21 Sep 2010 09:32:16 +0000 (09:32 +0000)
committerBruno Sinou <bsinou@argeo.org>
Tue, 21 Sep 2010 09:32:16 +0000 (09:32 +0000)
-> Change all actions to commands
-> Implements Spring IoC for existing commands
-> comment ProcessList auto-refresh to prevent Exception to be thrown until hibernate session pb is resolved.

git-svn-id: https://svn.argeo.org/slc/trunk@3782 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

13 files changed:
eclipse/plugins/org.argeo.slc.client.rcp/plugin.xml
eclipse/plugins/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/ApplicationActionBarAdvisor.java
eclipse/plugins/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/Perspective.java
eclipse/plugins/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/commands/ExitHandler.java [new file with mode: 0644]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/MANIFEST.MF
eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml [new file with mode: 0644]
eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/views.xml
eclipse/plugins/org.argeo.slc.client.ui/plugin.xml
eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/actions/RefreshAction.java [deleted file]
eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/commands/RefreshHandler.java
eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/services/TestManagerServiceAdapter.java
eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/ProcessListView.java [new file with mode: 0644]
eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/SlcExecutionListView.java [deleted file]

index 9caec033e27f313cdb76b17451b38ab0580cafc7..2df055019699324297dc4c23fc36d5a87055193a 100644 (file)
       </product>
    </extension>
    <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu">
+         <menu
+               id="fileMenu"
+               label="File">
+            <command
+                  commandId="org.argeo.slc.client.rcp.commands.Exit"
+                  label="Exit"
+                  style="push"
+                  tooltip="Exits the application">
+            </command>
+         </menu>
+      </menuContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="org.argeo.slc.client.rcp.commands.ExitHandler"
+            id="org.argeo.slc.client.rcp.commands.Exit"
+            name="Exit">
+      </command>
+   </extension>
+   <!-- <extension
          id="product"
          point="org.eclipse.core.runtime.products">
       <product
@@ -50,6 +74,6 @@
                value="SLC">
          </property>
       </product>
-   </extension>
+   </extension> -->
 
 </plugin>
index 340f175428b063f9097262e5dbd897f8280951a5..70f6217cd39f5f5096df34c66c45eed3c7b8f0af 100644 (file)
@@ -1,11 +1,7 @@
 package org.argeo.slc.client.rcp;
 
 import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
 import org.eclipse.ui.application.ActionBarAdvisor;
 import org.eclipse.ui.application.IActionBarConfigurer;
 
@@ -20,7 +16,6 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
        // them
        // in the fill methods. This ensures that the actions aren't recreated
        // when fillActionBars is called with FILL_PROXY.
-       private IWorkbenchAction exitAction;
 
        public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
                super(configurer);
@@ -33,16 +28,9 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
                // file.
                // Registering also provides automatic disposal of the actions when
                // the window is closed.
-
-               exitAction = ActionFactory.QUIT.create(window);
-               register(exitAction);
        }
 
        protected void fillMenuBar(IMenuManager menuBar) {
-               MenuManager fileMenu = new MenuManager("&File",
-                               IWorkbenchActionConstants.M_FILE);
-               menuBar.add(fileMenu);
-               fileMenu.add(exitAction);
        }
 
 }
index f5e915771fc27f17eceff4830cf092599708dc18..746dfe5536da702c3297e59b693630c38212abd1 100644 (file)
@@ -2,7 +2,7 @@ package org.argeo.slc.client.rcp;
 
 import org.argeo.slc.client.ui.views.ExecutionModulesView;
 import org.argeo.slc.client.ui.views.ResultListView;
-import org.argeo.slc.client.ui.views.SlcExecutionListView;
+import org.argeo.slc.client.ui.views.ProcessListView;
 import org.eclipse.ui.IFolderLayout;
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPerspectiveFactory;
@@ -22,7 +22,7 @@ public class Perspective implements IPerspectiveFactory {
                topRight.addView(ResultListView.ID);
                IFolderLayout bottomRight = layout.createFolder("bottomRight",
                                IPageLayout.BOTTOM, 0.5f, "topRight");
-               bottomRight.addView(SlcExecutionListView.ID);
+               bottomRight.addView(ProcessListView.ID);
                // layout.addStandaloneView(SlcExecutionListView.ID, false,
                // IPageLayout.BOTTOM, 0.5f, editorArea);
        }
diff --git a/eclipse/plugins/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/commands/ExitHandler.java b/eclipse/plugins/org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/commands/ExitHandler.java
new file mode 100644 (file)
index 0000000..f5eaff5
--- /dev/null
@@ -0,0 +1,15 @@
+package org.argeo.slc.client.rcp.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class ExitHandler extends AbstractHandler {
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               HandlerUtil.getActiveWorkbenchWindow(event).close();
+               return null;
+       }
+
+}
index 2e1862d6439f15b518878fed69e58b034ebdc541..c3bfd54c1e2374f12b14127bbc1e4d5d6b91ce4b 100644 (file)
@@ -12,7 +12,6 @@ Require-Bundle: org.eclipse.ui;resolution:=optional,
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Export-Package: org.argeo.slc.client.ui,
- org.argeo.slc.client.ui.actions,
  org.argeo.slc.client.ui.services,
  org.argeo.slc.client.ui.views
 Import-Package: org.apache.commons.logging;version="1.1.1",
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml b/eclipse/plugins/org.argeo.slc.client.ui/META-INF/spring/commands.xml
new file mode 100644 (file)
index 0000000..34a3653
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+       <bean id="org.argeo.slc.client.ui.RefreshResultList" class="org.argeo.slc.client.ui.commands.RefreshHandler"
+               scope="prototype">
+       </bean>
+
+
+</beans>
index f718ccb52ecce722fb53f2981bf00ff9bb235302..4c349d6ec18ce1fb219e7a8f87b83df2eab52b50 100644 (file)
@@ -14,8 +14,8 @@
                scope="prototype">
                <property name="testResultCollectionDao" ref="testResultCollectionDao" />
        </bean>
-       
-       <bean id="org.argeo.slc.client.ui.SlcExecutionListView" class="org.argeo.slc.client.ui.views.SlcExecutionListView"
+
+       <bean id="org.argeo.slc.client.ui.ProcessListView" class="org.argeo.slc.client.ui.views.ProcessListView"
                scope="prototype">
                <property name="slcExecutionDao" ref="slcExecutionDao" />
        </bean>
index 25b77948865db7c5709f0efd1f24136cd03ec359..aefea579175359b5b11bfaedd4a1f7a172faa190 100644 (file)
@@ -2,6 +2,7 @@
 <?eclipse version="3.4"?>
 <plugin>
 
+       
    <extension
          point="org.eclipse.ui.views">
    <view
          restorable="true">
    </view>
    <view
-         id="org.argeo.slc.client.ui.SlcExecutionListView"
+         id="org.argeo.slc.client.ui.ProcessListView"
          class="org.argeo.eclipse.spring.SpringExtensionFactory"
-         name="Slc Executions"
+         name="Process List"
          restorable="true">
    </view>
     </extension>
 
-   <extension
-         point="org.eclipse.ui.actionSets">
-      <actionSet
-            label="SLC Action Set"
-            visible="true"
-            id="org.argeo.slc.client.ui.actionSet">
-         <menu
-               label="SLC"
-               id="slcMenu">
-            <separator
-                  name="slcGroup">
-            </separator>
-         </menu>
-         <action
-               label="Refresh"
-               icon="icons/refresh.png"
-               class="org.argeo.slc.client.ui.actions.RefreshAction"
-               tooltip="Refresh"
-               menubarPath="slcMenu/slcGroup"
-               toolbarPath="slcGroup"
-               id="org.argeo.slc.client.ui.actions.RefreshAction">
-         </action>
-      </actionSet>
-   </extension>
    <extension
          point="org.eclipse.ui.commands">
+       <!--defaultHandler="org.argeo.slc.client.ui.commands.RefreshHandler" -->
       <command
-            defaultHandler="org.argeo.slc.client.ui.commands.RefreshHandler"
+            defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
             id="org.argeo.slc.client.ui.RefreshResultList"
             name="RefreshResultList ">
       </command>
    </extension>
+   <extension
+        point="org.eclipse.ui.bindings">
+     <key
+           commandId="org.argeo.slc.client.ui.RefreshResultList"
+           schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+           sequence="CTRL+R">
+     </key>
+  </extension>
+   
+   <extension
+         id="menu:org.eclipse.ui.main.menu"
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu?after=fileMenu">
+         <menu
+               id="slcMenu"
+               label="SLC">
+            <command
+                  commandId="org.argeo.slc.client.ui.RefreshResultList"
+                  label="Refresh"
+                  style="push"
+                  tooltip="Refresh  the result list">
+            </command>
+         </menu>
+      </menuContribution>
+      <menuContribution
+            locationURI="toolbar:org.eclipse.ui.main.toolbar">
+         <toolbar
+               id="org.argeo.slc.client.ui.ResultViewToolbar">
+            <command
+                  commandId="org.argeo.slc.client.ui.RefreshResultList"
+                  icon="icons/refresh.png"
+                  label="Refresh"
+                  style="toggle"
+                  tooltip="Refresh the result list">
+            </command>
+            <separator
+                  name="resultListViewGroup">
+            </separator>
+         </toolbar>
+      </menuContribution>
+   </extension>
 
 </plugin>
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/actions/RefreshAction.java b/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/actions/RefreshAction.java
deleted file mode 100644 (file)
index 04a4c14..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.argeo.slc.client.ui.actions;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.client.ui.views.ResultListView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * Our sample action implements workbench action delegate. The action proxy will
- * be created by the workbench and shown in the UI. When the user tries to use
- * the action, this delegate will be created and execution will be delegated to
- * it.
- * 
- * @see IWorkbenchWindowActionDelegate
- */
-public class RefreshAction implements IWorkbenchWindowActionDelegate {
-       private final static Log log = LogFactory.getLog(RefreshAction.class);
-       private IWorkbenchWindow window;
-
-       /**
-        * The constructor.
-        */
-       public RefreshAction() {
-       }
-
-       /**
-        * The action has been activated. The argument of the method represents the
-        * 'real' action sitting in the workbench UI.
-        * 
-        * @see IWorkbenchWindowActionDelegate#run
-        */
-       public void run(IAction action) {
-               // ExecutionModulesView view = (ExecutionModulesView) window
-               // .getWorkbench().getActiveWorkbenchWindow().getActivePage()
-               // .findView(ExecutionModulesView.ID);
-               // view.getViewer().refresh();
-               // MessageDialog.openInformation(window.getShell(), "Ui", "Refreshed");
-               log.info("command");
-               ResultListView view = (ResultListView) window.getWorkbench()
-                               .getActiveWorkbenchWindow().getActivePage().findView(
-                                               ResultListView.ID);
-               view.retrieveResults();
-       }
-
-       /**
-        * Selection in the workbench has been changed. We can change the state of
-        * the 'real' action here if we want, but this can only happen after the
-        * delegate has been created.
-        * 
-        * @see IWorkbenchWindowActionDelegate#selectionChanged
-        */
-       public void selectionChanged(IAction action, ISelection selection) {
-       }
-
-       /**
-        * We can use this method to dispose of any system resources we previously
-        * allocated.
-        * 
-        * @see IWorkbenchWindowActionDelegate#dispose
-        */
-       public void dispose() {
-       }
-
-       /**
-        * We will cache window object in order to be able to provide parent shell
-        * for the message dialog.
-        * 
-        * @see IWorkbenchWindowActionDelegate#init
-        */
-       public void init(IWorkbenchWindow window) {
-               this.window = window;
-       }
-}
\ No newline at end of file
index 1ff03414136ba5d6d433f07c12004525726ade28..713f3a0bf487a9981b2971c4076076fb790c4c0a 100644 (file)
@@ -1,7 +1,6 @@
 package org.argeo.slc.client.ui.commands;
 
 import org.argeo.slc.client.ui.views.ResultListView;
-import org.argeo.slc.client.ui.views.SlcExecutionListView;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -14,10 +13,10 @@ public class RefreshHandler extends AbstractHandler {
                                .getActiveWorkbenchWindow(event).getActivePage().findView(
                                                ResultListView.ID);
                view.retrieveResults();
-               SlcExecutionListView selView = (SlcExecutionListView) HandlerUtil
-                               .getActiveWorkbenchWindow(event).getActivePage().findView(
-                                               SlcExecutionListView.ID);
-               selView.retrieveResults();
+               // ProcessListView pView = (ProcessListView) HandlerUtil
+               // .getActiveWorkbenchWindow(event).getActivePage().findView(
+               // ProcessListView.ID);
+               // pView.retrieveResults();
                return null;
        }
 
index 1b2684f70599135f0722769216ecd619c5f80f3c..15de03a1d8be4e483e15159e6891e93fac98d5dd 100644 (file)
@@ -1,7 +1,5 @@
 package org.argeo.slc.client.ui.services;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.argeo.slc.SlcException;
 import org.argeo.slc.client.ui.ClientUiPlugin;
 import org.argeo.slc.core.attachment.Attachment;
@@ -18,8 +16,8 @@ import org.eclipse.ui.handlers.IHandlerService;
 
 /** In memory access to a test manager service */
 public class TestManagerServiceAdapter implements TreeTestResultListener {
-       private static final Log log = LogFactory
-                       .getLog(TestManagerServiceAdapter.class);
+       // private static final Log log = LogFactory
+       // .getLog(TestManagerServiceAdapter.class);
 
        private Boolean onlyOnClose = false;
 
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/ProcessListView.java b/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/ProcessListView.java
new file mode 100644 (file)
index 0000000..36a4b97
--- /dev/null
@@ -0,0 +1,141 @@
+package org.argeo.slc.client.ui.views;
+
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.core.test.tree.ResultAttributes;
+import org.argeo.slc.dao.process.SlcExecutionDao;
+import org.argeo.slc.process.SlcExecution;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.part.ViewPart;
+
+public class ProcessListView extends ViewPart {
+       private final static Log log = LogFactory
+                       .getLog(ProcessListView.class);
+
+       public static final String ID = "org.argeo.slc.client.ui.ProcessListView";
+
+       private TableViewer viewer;
+
+       private SlcExecutionDao slcExecutionDao;
+
+       public void createPartControl(Composite parent) {
+               Table table = createTable(parent);
+               viewer = new TableViewer(table);
+               viewer.setLabelProvider(new ViewLabelProvider());
+               viewer.setContentProvider(new ViewContentProvider());
+
+               viewer.setInput(getViewSite());
+       }
+
+       protected Table createTable(Composite parent) {
+               int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
+                               | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
+
+               Table table = new Table(parent, style);
+
+               GridData gridData = new GridData(GridData.FILL_BOTH);
+               gridData.grabExcessVerticalSpace = true;
+               gridData.grabExcessHorizontalSpace = true;
+               gridData.horizontalSpan = 3;
+               table.setLayoutData(gridData);
+
+               table.setLinesVisible(true);
+               table.setHeaderVisible(true);
+
+               TableColumn column = new TableColumn(table, SWT.LEFT, 0);
+               column.setText("Date");
+               column.setWidth(200);
+
+               column = new TableColumn(table, SWT.LEFT, 1);
+               column.setText("Host");
+               column.setWidth(100);
+
+               column = new TableColumn(table, SWT.LEFT, 2);
+               column.setText("Id");
+               column.setWidth(300);
+
+               column = new TableColumn(table, SWT.LEFT, 3);
+               column.setText("Status");
+               column.setWidth(100);
+
+               return table;
+       }
+
+       protected static class ViewContentProvider implements
+                       IStructuredContentProvider {
+
+               public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+               }
+
+               public void dispose() {
+               }
+
+               @SuppressWarnings("unchecked")
+               public Object[] getElements(Object obj) {
+                       if (obj instanceof List) {
+                               return ((List<ResultAttributes>) obj).toArray();
+                       } else {
+                               return new Object[0];
+                       }
+               }
+       }
+
+       protected class ViewLabelProvider extends LabelProvider implements
+                       ITableLabelProvider {
+               public String getColumnText(Object obj, int index) {
+                       SlcExecution ra = (SlcExecution) obj;
+                       switch (index) {
+
+                       case 0:
+                               return getText(ra.getStartDate());
+                       case 1:
+                               return ra.getHost();
+                       case 2:
+                               return ra.getUuid();
+                       case 3:
+                               return ra.currentStep().getType();
+                       }
+                       return getText(obj);
+               }
+
+               public Image getColumnImage(Object obj, int index) {
+                       return null;
+               }
+
+       }
+
+       public void setFocus() {
+               viewer.getControl().setFocus();
+       }
+
+       public void retrieveResults() {
+               try {
+                       List<SlcExecution> lst = slcExecutionDao.listSlcExecutions();
+
+                       if (log.isTraceEnabled())
+                               log.trace("Result attributes count: " + lst.size());
+                       viewer.setInput(lst);
+                       // viewer.refresh();
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               }
+       }
+
+       public void setSlcExecutionDao(SlcExecutionDao slcExecutionDao) {
+               this.slcExecutionDao = slcExecutionDao;
+       }
+
+}
diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/SlcExecutionListView.java b/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/SlcExecutionListView.java
deleted file mode 100644 (file)
index 959c699..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.argeo.slc.client.ui.views;
-
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.core.test.tree.ResultAttributes;
-import org.argeo.slc.dao.process.SlcExecutionDao;
-import org.argeo.slc.process.SlcExecution;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.part.ViewPart;
-
-public class SlcExecutionListView extends ViewPart {
-       private final static Log log = LogFactory
-                       .getLog(SlcExecutionListView.class);
-
-       public static final String ID = "org.argeo.slc.client.ui.SlcExecutionListView";
-
-       private TableViewer viewer;
-
-       private SlcExecutionDao slcExecutionDao;
-
-       public void createPartControl(Composite parent) {
-               Table table = createTable(parent);
-               viewer = new TableViewer(table);
-               viewer.setLabelProvider(new ViewLabelProvider());
-               viewer.setContentProvider(new ViewContentProvider());
-
-               viewer.setInput(getViewSite());
-       }
-
-       protected Table createTable(Composite parent) {
-               int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
-                               | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
-
-               Table table = new Table(parent, style);
-
-               GridData gridData = new GridData(GridData.FILL_BOTH);
-               gridData.grabExcessVerticalSpace = true;
-               gridData.grabExcessHorizontalSpace = true;
-               gridData.horizontalSpan = 3;
-               table.setLayoutData(gridData);
-
-               table.setLinesVisible(true);
-               table.setHeaderVisible(true);
-
-               TableColumn column = new TableColumn(table, SWT.LEFT, 0);
-               column.setText("Date");
-               column.setWidth(200);
-
-               column = new TableColumn(table, SWT.LEFT, 1);
-               column.setText("Host");
-               column.setWidth(100);
-
-               column = new TableColumn(table, SWT.LEFT, 2);
-               column.setText("Id");
-               column.setWidth(300);
-
-               column = new TableColumn(table, SWT.LEFT, 3);
-               column.setText("Status");
-               column.setWidth(100);
-
-               return table;
-       }
-
-       protected static class ViewContentProvider implements
-                       IStructuredContentProvider {
-
-               public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
-               }
-
-               public void dispose() {
-               }
-
-               @SuppressWarnings("unchecked")
-               public Object[] getElements(Object obj) {
-                       if (obj instanceof List) {
-                               return ((List<ResultAttributes>) obj).toArray();
-                       } else {
-                               return new Object[0];
-                       }
-               }
-       }
-
-       protected class ViewLabelProvider extends LabelProvider implements
-                       ITableLabelProvider {
-               public String getColumnText(Object obj, int index) {
-                       SlcExecution ra = (SlcExecution) obj;
-                       switch (index) {
-
-                       case 0:
-                               return getText(ra.getStartDate());
-                       case 1:
-                               return ra.getHost();
-                       case 2:
-                               return ra.getUuid();
-                       case 3:
-                               return ra.currentStep().getType();
-                       }
-                       return getText(obj);
-               }
-
-               public Image getColumnImage(Object obj, int index) {
-                       return null;
-               }
-
-       }
-
-       public void setFocus() {
-               viewer.getControl().setFocus();
-       }
-
-       public void retrieveResults() {
-               try {
-                       List<SlcExecution> lst = slcExecutionDao.listSlcExecutions();
-
-                       if (log.isTraceEnabled())
-                               log.trace("Result attributes count: " + lst.size());
-                       viewer.setInput(lst);
-                       // viewer.refresh();
-               } catch (Exception e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-       }
-
-       public void setSlcExecutionDao(SlcExecutionDao slcExecutionDao) {
-               this.slcExecutionDao = slcExecutionDao;
-       }
-
-}