Unmarshalling experiment graph from xml file

These two lines of code needs to be executed together for experiment design to be loaded from the xml correctly.

     graph = (ExperimentGraph) unmarshaller.unmarshal(reader);
     graph.setConnectionsToNodes();     // this needs to be executed every time the graph is unmarshalled

Adding new information in the ontology and how to propagate that information to the experiment graph being created

If a new property is added to a Protocol in the ontology, this needs to be added to the model in the ProtocolNode class as a new field. However, this is not sufficient since ProtocolNode is being created from the template nodes (in the palette) by a factory when they are dragged from the palette and dropped into the graphical editor. There are several classes being affected by model changes to the ProtocolNode.

org.grits.toolbox.editor.experimentdesigner.ontology.ExperimentDesignOntologyAPI - need to retrieve the new field in method "public ProtocolNode getProtocolByUri(String uri)"

org.grits.toolbox.editor.experimentdesigner.model.ProtocolPaletteEntry – need to add the new field

org.grits.toolbox.editor.experimentdesigner.editor.ProtocolNodeCreationFactory – need to modify



New fields should be copied in the following classes when creating protocol template or a protocol variant:



New field should be retrieved from the user in


Local Ontology:

Currently, local ontology cannot have additional categories or parameters or parameter groups (only in the standard ontology) but can have additional Protocol individuals with parameters/parameter groups from the standard ontology.

Graphical Editor/Part Listener interaction issues:

Graphical editor starts acting strange by not drawing the connections and not enabling/disabling “delete” actions on the nodes correctly, when a part listener in a view listens to the graphical editor’s opening/activation. Currently, three views; Protocol Details, Papers and Parameters listen to the closing of the graph editor to clean up their contents but whenever partActivated or partOpened methods are overridden to bring up the views if they are not in view, the graphical editor does not allow the user to draw a connection between the nodes. In addition, right-click menu does not show enabled “delete” action whenever a node is selected and even if it shows it, it may cause it to “delete” another node that hasn’t been selected currently.

TreeViewer in Parameters view:

On Windows machines, the user’s click on a row in the parameters table only causes the first column to be selected (highlighted). In order to make sure the whole row is shown as highlighted when selected, the following style needs to be set while creating the TreeViewer.

treeViewer = new TreeViewer(parent, SWT.BORDER + SWT.FULL_SELECTION);

The default behavior is the full selection on Mac OSx.

Multiline Text Field selection behavior on Windows machines:

When there is a Text field with SWT.MULTI, the shortcut to select all data; “Ctrl-a” is disabled on Windows environment, works fine on Mac OSx.

// have to do this for Windows environment, works on Mac without the listener
description.addKeyListener( new KeyListener() {		
	public void keyReleased(KeyEvent e) {
	public void keyPressed(KeyEvent e) {
		if (e.stateMask == SWT.CTRL && e.keyCode == 'a') {
Last modified 7 years ago Last modified on 04/15/2015 05:59:06 PM