]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/actions/RefreshAction.java
Add server capabilities to SLC RCP
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.client.ui / src / org / argeo / slc / client / ui / actions / RefreshAction.java
index 4e5aea7e2bdf8d5e0efb21ddf582864af3333baa..04a4c14a632210b12b583ef839ca560c2735ca6f 100644 (file)
@@ -1,8 +1,9 @@
 package org.argeo.slc.client.ui.actions;
 
-import org.argeo.slc.client.ui.views.ExecutionModulesView;
+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.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.IWorkbenchWindowActionDelegate;
@@ -16,6 +17,7 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate;
  * @see IWorkbenchWindowActionDelegate
  */
 public class RefreshAction implements IWorkbenchWindowActionDelegate {
+       private final static Log log = LogFactory.getLog(RefreshAction.class);
        private IWorkbenchWindow window;
 
        /**
@@ -31,11 +33,16 @@ public class RefreshAction implements IWorkbenchWindowActionDelegate {
         * @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");
+               // 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();
        }
 
        /**