org.eclipse.equinox.launcher,\
org.mortbay.jetty.server,\
org.springframework.osgi.extender,\
+org.argeo.security.manager.ldap,\
+org.argeo.security.services,\
+org.argeo.security.equinox,\
+org.argeo.security.ui,\
+org.argeo.security.ui.application,\
org.argeo.slc.agent,\
org.argeo.slc.client.agent,\
org.argeo.slc.client.hibernate,\
org.argeo.slc.client.oxm,\
+org.argeo.slc.client.ui,\
org.argeo.slc.demo.ant,\
org.argeo.slc.demo.basic,\
org.argeo.slc.server.castor,\
org.argeo.slc.server.hibernate,\
org.argeo.slc.server.services,\
org.argeo.server.ads.server,\
-org.argeo.security.manager.ldap,\
-org.argeo.security.services,\
-#org.argeo.security.ui.initialPerspective=com.agfa.sebi.client.ui.consultEbiPerspective
+
+org.argeo.security.ui.initialPerspective=org.argeo.slc.client.ui.perspectives.slcExecution
# LDAP
#argeo.ldap.rootdn=dc=slc,dc=argeo,dc=net
org.eclipse.equinox.http.jetty.log.stderr.threshold=debug
org.osgi.service.http.port=9090
-# java -Dlog4j.configuration=file:/home/mbaudier/dev/src/agfa-sebi/demo/log4j.properties -Dosgi.framework=lib/org.eclipse.osgi_3.6.1.R36x_v20100806.jar -jar lib/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -console -configuration configuration
\ No newline at end of file
+# java -Dlog4j.configuration=file:/home/mbaudier/dev/src/slc/demo/log4j.properties -Dosgi.framework=lib/org.eclipse.osgi_3.6.1.R36x_v20100806.jar -jar lib/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -console -configuration configuration
\ No newline at end of file
<useLastCommittedRevision>false</useLastCommittedRevision>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ </plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>\r
\r
<extension\r
- id="SlcRapProduct"\r
+ id="org.argeo.slc.client.rcp.product"\r
point="org.eclipse.core.runtime.products">\r
<product\r
- name="ArgeoSlcProduct"\r
+ name="Slc RAP Product"\r
application="org.eclipse.ui.ide.workbench"\r
>\r
<property\r
name="Exit">
</command>
</extension>
+
+ <!-- RCP Specific, does not function with RAP -->
<extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.argeo.slc.client.rcp.application"
- name="SLC">
- <property
- name="windowImages"
- value="icons/argeo-icon-256.png">
- </property>
- <property
- name="appName"
- value="SLC">
- </property>
- </product>
- </extension>
-
- <!-- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.argeo.slc.client.rcp.application"
- name="SLC">
- <property
- name="windowImages"
- value="icons/argeo-icon-256.png">
- </property>
- <property
- name="appName"
- value="SLC">
- </property>
- </product>
- </extension> -->
-
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.argeo.slc.client.ui.refreshExecutionModulesView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="CTRL+R">
+ </key>
+ </extension>
</plugin>
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
-
-
<extension
point="org.eclipse.ui.views">
<view
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
id="org.argeo.slc.client.ui.refreshResultList"
- name="RefreshResultList">
+ name="Refresh Result List">
</command>
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
id="org.argeo.slc.client.ui.refreshExecutionModulesView"
- name="refreshExecutionModulesView">
+ name="Refresh Execution Modules View">
</command>
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
id="org.argeo.slc.client.ui.launchBatch"
- name="LaunchBatch">
+ name="Launch Batch">
</command>
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
id="org.argeo.slc.client.ui.removeSelectedFromBatch"
- name="RemoveSelectedFromBatch">
+ name="Remove Selected From Batch">
</command>
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
id="org.argeo.slc.client.ui.clearBatch"
- name="ClearBatch">
+ name="Clear Batch">
</command>
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
id="org.argeo.slc.client.ui.refreshProcessList"
- name="RefreshProcessList ">
+ name="Refresh Process List ">
</command>
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
id="org.argeo.slc.client.ui.displayResultDetails"
- name="DisplayResultDetails">
+ name="Display Result Details">
<commandParameter
id="org.argeo.slc.client.commands.resultUuid"
name="Result UUID">
<command
defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
id="org.argeo.slc.client.ui.manageBundles"
- name="ManageBundles">
+ name="Manage Bundles">
</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">
- <!-- 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
- 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="menu:fileMenu">
<!-- Should be implemented in later version.
</command>
</menuContribution>
</extension>
-</plugin>
+</plugin>
\ No newline at end of file
import org.eclipse.core.commands.ExecutionEvent;\r
import org.eclipse.core.commands.ExecutionException;\r
import org.eclipse.jface.dialogs.TitleAreaDialog;\r
-import org.eclipse.swt.widgets.DirectoryDialog;\r
import org.eclipse.swt.widgets.Shell;\r
\r
/**\r
tad.setTitle("Manage Bundles");\r
tad.open();\r
\r
- DirectoryDialog dialog2 = new DirectoryDialog(shell);\r
- String path = dialog2.open();\r
-\r
- if (path == null)\r
- // action canceled by user\r
- return null;\r
- log.debug("Path chosen by user : " + path);\r
-\r
+ \r
+ // RCP Specific, commented for now.\r
+ // DirectoryDialog dialog2 = new DirectoryDialog(shell);\r
+ // String path = dialog2.open();\r
+ //\r
+ // if (path == null)\r
+ // // action canceled by user\r
+ // return null;\r
+ // log.debug("Path chosen by user : " + path);\r
\r
// the following does not work : it doesn't display anything.\r
// Label label = new Label(shell, SWT.WRAP);\r
package org.argeo.slc.client.ui.providers;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.argeo.slc.client.ui.views.ProcessBuilderView;
import org.argeo.slc.client.ui.views.ProcessParametersView;
import org.argeo.slc.core.execution.PrimitiveAccessor;
+import org.argeo.slc.core.execution.PrimitiveUtils;
+import org.argeo.slc.core.execution.RefSpecAttribute;
+import org.argeo.slc.core.execution.RefValue;
+import org.argeo.slc.core.execution.RefValueChoice;
+import org.argeo.slc.execution.ExecutionSpec;
+import org.argeo.slc.execution.ExecutionSpecAttribute;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.ComboBoxCellEditor;
import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
/**
*
*
- * Implements the ability to edit and save various type of
- * parameter of a given process. Parameter values are directly saved as
- * soon as the focus on a given field is lost.
+ * Implements the ability to edit and save various type of parameter of a given
+ * process. Parameter values are directly saved as soon as the focus on a given
+ * field is lost.
*
*
- * Note that EditingSupport is tightly coupled with both
- * ProcessParametersView and ProcessBuilderView; it cannot serve as a
- * generic EditingSupport as is. Note also that it assumes that the
- * processes in ProcessBuilderView as stored as an ordered list.
-
- @author bsinou
+ * Note that EditingSupport is tightly coupled with both ProcessParametersView
+ * and ProcessBuilderView; it cannot serve as a generic EditingSupport as is.
+ * Note also that it assumes that processes in the ProcessBuilderView are stored
+ * as an ordered list.
+ *
+ * @author bsinou
*
*/
public class ProcessParametersEditingSupport extends EditingSupport {
- // private final static Log log = LogFactory
- // .getLog(ProcessParametersEditingSupport.class);
+ private final static Log log = LogFactory
+ .getLog(ProcessParametersEditingSupport.class);
private CellEditor strEditor;
- //private CellEditor nbEditor;
+ // private ComboBoxCellEditor comboEditor;
// private int column;
- private final static String strType = "string", intType = "integer";
-
- // different type of primitive
- // private static enum primitiveType {
- // strType, intType
- // };
-
// So that we can update corresponding process
private int curProcessIndex;
private ProcessBuilderView pbView;
+ // To populate drop down lists
+ private ExecutionSpec executionSpec;
+
+ // To persist combo box elements indexes
+ Map<String, List<String>> comboBoxes = new HashMap<String, List<String>>();
+
public ProcessParametersEditingSupport(ColumnViewer viewer, int column) {
super(viewer);
strEditor = new TextCellEditor(((TableViewer) viewer).getTable());
- // nbEditor = new NumberCellEditor(((TableViewer) viewer).getTable());
- // this.column = column;
+ // TODO : add cell validators.
}
@Override
protected CellEditor getCellEditor(Object element) {
- // TODO return specific editor depending on the parameter type.
- return strEditor;
+
+ // TODO : check if all parameter always have a linked attribute.
+ if (element instanceof ProcessParametersView.ObjectWithName) {
+ ProcessParametersView.ObjectWithName own = (ProcessParametersView.ObjectWithName) element;
+ ExecutionSpecAttribute esa = executionSpec.getAttributes().get(
+ own.name);
+ if (esa != null) {
+ // Paramater is a primitive with no list of choices linked by
+ // the specs
+ if (own.obj instanceof PrimitiveAccessor
+ && !(esa instanceof RefSpecAttribute))
+ return strEditor;
+ else if (esa instanceof RefSpecAttribute) {
+ RefSpecAttribute rsa = (RefSpecAttribute) esa;
+
+ Iterator<RefValueChoice> choices = rsa.getChoices()
+ .iterator();
+ List<String> items = new ArrayList<String>();
+ while (choices.hasNext()) {
+ items.add(choices.next().getName());
+ }
+
+ // persists order of the elements in the current combo box
+ comboBoxes.put(own.name, items);
+
+ String[] itemsStr = new String[items.size()];
+ ComboBoxCellEditor comboEditor = new ComboBoxCellEditor(
+ ((TableViewer) getViewer()).getTable(),
+ items.toArray(itemsStr));
+ return comboEditor;
+ }
+ }
+ }
+ if (log.isTraceEnabled()) {
+ log.warn(" No cell Editor fits for element : " + element.toString()
+ + " of class : " + element.getClass().getName());
+ }
+ return null;
}
@Override
protected boolean canEdit(Object element) {
- return true;
+ if (element instanceof ProcessParametersView.ObjectWithName) {
+ ProcessParametersView.ObjectWithName own = (ProcessParametersView.ObjectWithName) element;
+ ExecutionSpecAttribute esa = executionSpec.getAttributes().get(
+ own.name);
+ if (esa != null && !esa.getIsFrozen())
+ return true;
+ }
+ return false;
}
@Override
protected Object getValue(Object element) {
- ProcessParametersView.ObjectWithName objectWithName = (ProcessParametersView.ObjectWithName) element;
-
- if (objectWithName.obj instanceof PrimitiveAccessor) {
- PrimitiveAccessor pv = (PrimitiveAccessor) objectWithName.obj;
- // we only handle string & integer parameter in a first time
- if (strType.equals(pv.getType())) {
- return pv.getValue();
- }
- if (intType.equals(pv.getType())) {
- return ((Integer) pv.getValue()).toString();
- }
- }
- return "unsupported param type";
-
+ ProcessParametersView.ObjectWithName own = (ProcessParametersView.ObjectWithName) element;
+
+ if (own.obj instanceof PrimitiveAccessor) {
+ PrimitiveAccessor pv = (PrimitiveAccessor) own.obj;
+ return pv.getValue().toString();
+ } else if (own.obj instanceof RefValue) {
+ RefValue rv = (RefValue) own.obj;
+ List<String> values = comboBoxes.get(own.name);
+ log.debug("Get Value : " + rv.getRef() + " & index : "
+ + values.indexOf(rv.getRef()));
+ return values.indexOf(rv.getRef());
+ } else
+ return "unsupported param type";
}
@Override
protected void setValue(Object element, Object value) {
- ProcessParametersView.ObjectWithName objectWithName = (ProcessParametersView.ObjectWithName) element;
- if (objectWithName.obj instanceof PrimitiveAccessor) {
- PrimitiveAccessor pv = (PrimitiveAccessor) objectWithName.obj;
- // we only handle string parameter in a first time
- if (strType.equals(pv.getType())) {
+ ProcessParametersView.ObjectWithName own = (ProcessParametersView.ObjectWithName) element;
+ if (own.obj instanceof PrimitiveAccessor) {
+ PrimitiveAccessor pv = (PrimitiveAccessor) own.obj;
+ if (PrimitiveUtils.typeAsClass(pv.getType()) != null)
pv.setValue(value);
- pbView.updateParameter(curProcessIndex, objectWithName.name,
- objectWithName.obj);
- } else if (intType.equals(pv.getType())) {
-
- String stVal = (String) value;
- Integer val = ("".equals(stVal)) ? new Integer(0)
- : new Integer(stVal);
- pv.setValue(val);
- pbView.updateParameter(curProcessIndex, objectWithName.name, pv);
- }
+ pbView.updateParameter(curProcessIndex, own.name, own.obj);
+ getViewer().update(element, null);
+ } else if (own.obj instanceof RefValue) {
+ RefValue rv = (RefValue) own.obj;
+ List<String> values = comboBoxes.get(own.name);
+ rv.setRef(values.get(((Integer) value).intValue()));
getViewer().update(element, null);
}
this.curProcessIndex = index;
}
+ public void setCurrentExecutionSpec(ExecutionSpec executionSpec) {
+ this.executionSpec = executionSpec;
+ }
+
public void setCurrentProcessBuilderView(
ProcessBuilderView processbuilderView) {
this.pbView = processbuilderView;
import java.util.UUID;
import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.argeo.slc.SlcException;
import org.argeo.slc.client.oxm.OxmInterface;
import org.argeo.slc.client.ui.ClientUiPlugin;
import org.eclipse.ui.part.ViewPart;
public class ExecutionModulesView extends ViewPart {
- // private final static Log log = LogFactory
- // .getLog(ExecutionModulesView.class);
+ private final static Log log = LogFactory
+ .getLog(ExecutionModulesView.class);
public static final String ID = "org.argeo.slc.client.ui.executionModulesView";
if (obj instanceof ExecutionModulesContentProvider.ExecutionModuleNode) {
ExecutionModuleDescriptor emd = ((ExecutionModulesContentProvider.ExecutionModuleNode) obj)
.getDescriptor();
- if (emd.getLabel() != null)
+ System.out
+ .println("obj instanceof ExecutionModulesContentProvider.ExecutionModuleNode");
+ log.debug("obj instanceof ExecutionModulesContentProvider.ExecutionModuleNode");
+ if (emd.getLabel() != null) {
+ log.debug("and label is : " + emd.getLabel());
return emd.getLabel();
- else
+ } else {
+ log.debug("label is null and text is : " + getText(emd));
return getText(emd);
+ }
} else
return getText(obj);
}
}
public void dragSetData(DragSourceEvent event) {
- System.out.println("dragSetData: " + event);
- // System.out.println("dataType: " + event.dataType);
+
+ // System.out.println("dragSetData: " + event);
IStructuredSelection selection = (IStructuredSelection) viewer
.getSelection();
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.dnd.TransferData;
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;
/**
* Display a list of processes that are to be launched as batch. For the moment
- * being, only one agent by batch is enabled. The batch is contructed by
+ * being, only one agent by batch is enabled. The batch is constructed by
* dropping process from the ExecutionModuleView. Wrong type of data dropped in
- * this view might raise errors.
+ * this view raises an error.
*
* @author bsinou
*
public static final String ID = "org.argeo.slc.client.ui.processBuilderView";
- // private final static Log log =
- // LogFactory.getLog(ProcessBuilderView.class);
-
private TableViewer viewer;
private List<RealizedFlow> realizedFlows = new ArrayList<RealizedFlow>();
private String currentAgentUuid = null;
protected Table createTable(Composite parent) {
int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
- | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
+ | SWT.FULL_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);
}
}
- // Return the list of the processes to execute.
+ // Launches the execution of listed realized flow with specified parameters.
public void launchBatch() {
SlcExecution slcExecution = new SlcExecution();
slcExecution.setUuid(UUID.randomUUID().toString());
}
- // Handle Events
+ // Parameter view is updated each time a new line is selected
class SelectionChangedListener implements ISelectionChangedListener {
public void selectionChanged(SelectionChangedEvent evt) {
throw new SlcException(
"Cannot create batch on two (or more) distinct agents",
null);
- // return false;
}
String fdXml = props.getProperty("RealizedFlowAsXml");
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
protected Table createTable(Composite parent) {
int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
- | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
+ | SWT.FULL_SELECTION;
+ // does not function with RAP, commented for the moment being
+ // | 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);
+ // 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);
// get the parameter
IParameter iparam = cmd
.getParameter("org.argeo.slc.client.commands.processUuid");
- Parameterization params = new Parameterization(iparam, se
- .getUuid()); // "testUUID");//
+ Parameterization params = new Parameterization(iparam,
+ se.getUuid()); // "testUUID");//
parameters.add(params);
// build the parameterized command
import java.util.List;
import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.argeo.slc.client.ui.ClientUiPlugin;
import org.argeo.slc.client.ui.providers.ProcessParametersEditingSupport;
import org.argeo.slc.core.execution.PrimitiveAccessor;
+import org.argeo.slc.core.execution.RefValue;
import org.argeo.slc.process.RealizedFlow;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
* This view, directly linked with the <code> ProcessBuilderView </code>
* enables the display and editing the parameters of a given process.
*
- * Note that for now we use <code>ExecutionFlowDescriptor.values</code>
- * attribute to recall (and update ??) the various parameters.
+ *
+ * Note that for a given RealizedFlow :
+ *
+ * + paramaters value are set using
+ * <code>RealizedFlow.ExecutionFlowDescriptor.values</code>, that might
+ * have default values
+ *
+ * + possible "values" for a given parameters are stored in
+ * <code>RealizedFlow.ExecutionSpec.</code>
+ *
*/
public class ProcessParametersView extends ViewPart {
- // private static final Log log = LogFactory
- // .getLog(ProcessParametersView.class);
+ private static final Log log = LogFactory
+ .getLog(ProcessParametersView.class);
public static final String ID = "org.argeo.slc.client.ui.processParametersView";
- // This map stores actual values set to default if existing at the begining
- // and then the ones computed by the end user
+ // This map stores actual values :
+ // * default values (if defined) at instantiation time
+ // * values filled-in or modified by the end-user
private Map<String, Object> values;
+
// This map stores the spec of the attributes used to offer the end user
// some choices.
- //private Map<String, ExecutionSpecAttribute> specAttributes;
+ // private Map<String, ExecutionSpecAttribute> specAttributes;
// We must keep a reference to the current EditingSupport so that we can
// update the index of the process being updated
return;
}
// we store the index of the edited Process in the editor so that it can
- // save computed values.
+ // save entries modified by the end user.
ppEditingSupport.setCurrentProcessIndex(index);
- // TODO :
- // We should handle ExecutionSpec here. need to be improved.
+ // We also store corresponding ExecutionSpec to be able to retrieve
+ // possible values for dropdown lists
+ ppEditingSupport.setCurrentExecutionSpec(rf.getExecutionSpec());
// ExecutionSpec es = rf.getExecutionSpec();
// if (es != null && es.getAttributes() != null)
// parameters = es.getAttributes();
case 1:
if (own.obj instanceof PrimitiveAccessor) {
PrimitiveAccessor pa = (PrimitiveAccessor) own.obj;
- if ("string".equals(pa.getType()))
- return (String) pa.getValue();
- else if ("integer".equals(pa.getType()))
- return ((Integer) pa.getValue()).toString();
- else
- return "Type " + pa.getType()
- + " not yet supported";
- } else
+ return pa.getValue().toString();
+ } else if (own.obj instanceof RefValue) {
+ RefValue refValue = (RefValue) own.obj;
+ return refValue.getRef();
+ } else {
+ if (log.isTraceEnabled()) {
+ log.warn("Not a Primitive accessor neither a ref Value : "
+ + own.obj.toString()
+ + " and class : "
+ + own.obj.getClass().toString());
+ }
return own.obj.toString();
+ }
default:
return getText(obj);
}
- } else
+ } else {
return getText(obj);
+ }
}
public Image getColumnImage(Object obj, int index) {
this.name = name;
this.obj = obj;
}
-
}
-}
+}
\ No newline at end of file
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.Menu;
import org.eclipse.swt.widgets.Table;
protected Table createTable(Composite parent) {
int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
- | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
+ | SWT.FULL_SELECTION;
+ // does not function with RAP, commented for the moment being
+ // | 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;
- //gridData.horizontalSpan = 3;
- //table.setLayoutData(gridData);
+ // 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);
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo.slc</groupId>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>${version.maven-bundle-plugin}</version>
- <extensions>true</extensions>
- <configuration>
- <manifestLocation>META-INF</manifestLocation>
- <instructions>
- <Bundle-Version>${project.version}-r${buildNumber}</Bundle-Version>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
- <_removeheaders>Bnd-LastModified</_removeheaders>
- </instructions>
- </configuration>
- <executions>
- <execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- </execution>
- </executions>
</plugin>
+ <!-- TO BE DELETED Configuration herited from commons/pom.xml <version>${version.maven-bundle-plugin}</version>
+ <extensions>true</extensions> <configuration> <manifestLocation>META-INF</manifestLocation>
+ <instructions> <Bundle-Version>${project.version}-r${buildNumber}</Bundle-Version>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
+ <_removeheaders>Bnd-LastModified</_removeheaders> </instructions> </configuration>
+ <executions> <execution> <id>bundle-manifest</id> <phase>process-classes</phase>
+ <goals> <goal>manifest</goal> </goals> </execution> </executions> </plugin> -->
</plugins>
</build>
- <!--
- <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId> </plugin> </plugins>
- </reporting>
- -->
+ <!-- <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId> </plugin> </plugins> </reporting> -->
</project>