name="Result details"
restorable="true">
</view>
+ <!-- <view
+ allowMultiple="true"
+ class="org.argeo.eclipse.spring.SpringExtensionFactory"
+ icon="icons/excel.png"
+ id="org.argeo.slc.client.ui.resultExcelView"
+ name="Result details (Excel)"
+ restorable="true">
+ </view> -->
<view
id="org.argeo.slc.client.ui.processListView"
class="org.argeo.eclipse.spring.SpringExtensionFactory"
name="Result UUID">
</commandParameter>
</command>
- </extension>
+ </extension>
<extension
point="org.eclipse.ui.bindings">
<key
<extension
id="menu:org.eclipse.ui.main.menu"
point="org.eclipse.ui.menus">
+ <!-- commented menu so that it does not show up on sparta
+ TODO : add a specific bundle with only a pluggin.xml for SLC / no sparta specific menus
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu?after=fileMenu">
<menu
</command>
</menu>
</menuContribution>
+ -->
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
tooltip="Remove selected process from process builder view.">
</command>
</menuContribution>
- </extension>
+ </extension>
</plugin>
package org.argeo.slc.client.ui.commands;
import org.argeo.slc.client.ui.views.ResultDetailView;
+import org.argeo.slc.client.ui.views.ResultListView;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.HandlerUtil;
/**
String uuid = event
.getParameter("org.argeo.slc.client.commands.resultUuid");
+ // TODO : remove this.
+ if (uuid == null || "".equals(uuid)) {
+ try {
+ ResultListView pbv = (ResultListView) HandlerUtil
+ .getActiveWorkbenchWindow(event).getActivePage()
+ .showView(ResultListView.ID);
+ uuid = pbv.getSelectedResult();
+ } catch (PartInitException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+
// mode = 2 : VIEW_VISIBLE, Show view mode that indicates the view
// should be created or made visible if already created .
// mode = 1 : VIEW_ACTIVATE, Show view mode that indicates the view
import org.eclipse.core.commands.IParameter;
import org.eclipse.core.commands.Parameterization;
import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.ui.IWorkbench;
viewer.setContentProvider(new ViewContentProvider());
viewer.setInput(getViewSite());
viewer.addDoubleClickListener(new ViewDoubleClickListener());
+
+ // Context Menu for the end user to choose what kind of display he wants
+ // Problem to dynamically add parameters linked with the current
+ // selected object
+ MenuManager menuManager = new MenuManager();
+ Menu menu = menuManager.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(menuManager, viewer);
+
}
protected Table createTable(Composite parent) {
| SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
Table table = new Table(parent, style);
-
+ // table.addMouseListener(new RightClickListener());
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.grabExcessVerticalSpace = true;
gridData.grabExcessHorizontalSpace = true;
return table;
}
+ // TODO : Improve this method.
+ public String getSelectedResult() {
+ Object obj = ((IStructuredSelection) viewer.getSelection())
+ .getFirstElement();
+
+ if (obj == null || !(obj instanceof ResultAttributes))
+ return null;
+ else
+ return ((ResultAttributes) obj).getUuid();
+ }
+
// View Specific inner class
protected static class ViewContentProvider implements
IStructuredContentProvider {
}
// Handle Events
+
/**
* The ResultAttributes expose a part of the information contained in the
* TreeTestResult, It has the same UUID as the corresponding treeTestResult.
}
}
- // Ioc
+ // IoC
public void setTestResultCollectionDao(
TreeTestResultCollectionDao testResultCollectionDao) {
this.testResultCollectionDao = testResultCollectionDao;