Commit 741ae405 authored by Jay Jay Billings's avatar Jay Jay Billings

Finished refactoring all of the Viz stuff, which included a complete

refactor of the UI widgets.
Signed-off-by: default avatarJay Jay Billings <billingsjj@ornl.gov>
parent 77e50df9
......@@ -8,17 +8,17 @@ Import-Package: com.jme3.math,
org.eclipse.core.resources,
org.eclipse.core.runtime;version="3.4.0",
org.eclipse.ice.client.common,
org.eclipse.ice.client.common.properties,
org.eclipse.ice.client.widgets,
org.eclipse.ice.client.widgets.jme,
org.eclipse.ice.client.widgets.properties,
org.eclipse.ice.client.widgets.reactoreditor.plant,
org.eclipse.ice.client.widgets.viz.service,
org.eclipse.ice.datastructures.form,
org.eclipse.ice.iclient.uiwidgets,
org.eclipse.ice.item,
org.eclipse.ice.item.jobLauncher,
org.eclipse.ice.item.nuclear,
org.eclipse.ice.reactor.plant,
org.eclipse.ice.viz.service,
org.eclipse.ui,
org.eclipse.ui.views.properties,
org.eclipse.ui.views.properties.tabbed,
......
......@@ -4,5 +4,5 @@
<service>
<provide interface="org.eclipse.ice.client.widgets.IFormWidgetBuilder"/>
</service>
<reference bind="setVizServiceFactory" cardinality="1..1" interface="org.eclipse.ice.client.widgets.viz.service.IVizServiceFactory" name="IVizServiceFactory" policy="dynamic" unbind="unsetVizServiceFactory"/>
<reference bind="setVizServiceFactory" cardinality="1..1" interface="org.eclipse.ice.viz.service.IVizServiceFactory" name="IVizServiceFactory" policy="dynamic" unbind="unsetVizServiceFactory"/>
</scr:component>
......@@ -14,10 +14,10 @@ package org.eclipse.ice.client.widgets.moose;
import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.ice.client.widgets.properties.IButtonCellContentProvider;
import org.eclipse.ice.client.widgets.properties.ICellContentProvider;
import org.eclipse.ice.client.widgets.properties.TreeProperty;
import org.eclipse.ice.client.widgets.properties.TreePropertyCellContentProvider;
import org.eclipse.ice.client.common.properties.IButtonCellContentProvider;
import org.eclipse.ice.client.common.properties.ICellContentProvider;
import org.eclipse.ice.client.common.properties.TreeProperty;
import org.eclipse.ice.client.common.properties.TreePropertyCellContentProvider;
import org.eclipse.ice.datastructures.form.Entry;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.resource.JFaceResources;
......
......@@ -12,9 +12,9 @@
*******************************************************************************/
package org.eclipse.ice.client.widgets.moose;
import org.eclipse.ice.client.widgets.properties.ButtonCellEditor;
import org.eclipse.ice.client.widgets.properties.ICellContentProvider;
import org.eclipse.ice.client.widgets.properties.TextCellEditingSupport;
import org.eclipse.ice.client.common.properties.ButtonCellEditor;
import org.eclipse.ice.client.common.properties.ICellContentProvider;
import org.eclipse.ice.client.common.properties.TextCellEditingSupport;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.EditingSupport;
......
......@@ -12,8 +12,8 @@
*******************************************************************************/
package org.eclipse.ice.client.widgets.moose;
import org.eclipse.ice.client.widgets.properties.ICellContentProvider;
import org.eclipse.ice.client.widgets.properties.CellOwnerDrawLabelProvider;
import org.eclipse.ice.client.common.properties.CellOwnerDrawLabelProvider;
import org.eclipse.ice.client.common.properties.ICellContentProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Event;
......
......@@ -19,7 +19,7 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ice.client.widgets.EclipseFormWidget;
import org.eclipse.ice.client.widgets.ICEFormEditor;
import org.eclipse.ice.client.widgets.ICEFormInput;
import org.eclipse.ice.client.widgets.viz.service.IVizServiceFactory;
import org.eclipse.ice.viz.service.IVizServiceFactory;
/**
* This class creates and displays a {@link MOOSEFormEditor} for modifying a
......
......@@ -13,8 +13,8 @@
package org.eclipse.ice.client.widgets.moose;
import org.eclipse.ice.client.widgets.IFormWidgetBuilder;
import org.eclipse.ice.client.widgets.viz.service.IVizServiceFactory;
import org.eclipse.ice.iclient.uiwidgets.IFormWidget;
import org.eclipse.ice.viz.service.IVizServiceFactory;
/**
* This class provides the declarative service that registers the MOOSE
......
......@@ -12,13 +12,13 @@
*******************************************************************************/
package org.eclipse.ice.client.widgets.moose;
import org.eclipse.ice.client.common.AddNodeTreeAction;
import org.eclipse.ice.client.common.DeleteNodeTreeAction;
import org.eclipse.ice.client.common.RenameNodeTreeAction;
import org.eclipse.ice.client.common.TreeCompositeContentProvider;
import org.eclipse.ice.client.common.TreeCompositeLabelProvider;
import org.eclipse.ice.client.common.TreeCompositeViewer;
import org.eclipse.ice.client.widgets.AddNodeTreeAction;
import org.eclipse.ice.client.widgets.DeleteNodeTreeAction;
import org.eclipse.ice.client.widgets.ICEFormInput;
import org.eclipse.ice.client.widgets.RenameNodeTreeAction;
import org.eclipse.ice.client.widgets.TreeCompositeContentProvider;
import org.eclipse.ice.client.widgets.TreeCompositeViewer;
import org.eclipse.ice.datastructures.form.Form;
import org.eclipse.ice.datastructures.form.TreeComposite;
import org.eclipse.ice.item.nuclear.MOOSEModel;
......
......@@ -12,11 +12,11 @@
*******************************************************************************/
package org.eclipse.ice.client.widgets.moose;
import org.eclipse.ice.client.widgets.properties.DescriptionCellContentProvider;
import org.eclipse.ice.client.widgets.properties.ICellContentProvider;
import org.eclipse.ice.client.widgets.properties.CellColumnLabelProvider;
import org.eclipse.ice.client.widgets.properties.TextCellEditingSupport;
import org.eclipse.ice.client.widgets.properties.TreePropertySection;
import org.eclipse.ice.client.common.properties.CellColumnLabelProvider;
import org.eclipse.ice.client.common.properties.DescriptionCellContentProvider;
import org.eclipse.ice.client.common.properties.ICellContentProvider;
import org.eclipse.ice.client.common.properties.TextCellEditingSupport;
import org.eclipse.ice.client.widgets.TreePropertySection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.swt.SWT;
......
......@@ -16,6 +16,8 @@ Import-Package: com.jme3.app,
org.eclipse.core.runtime;version="3.4.0",
org.eclipse.core.runtime.jobs,
org.eclipse.ice.client.common,
org.eclipse.ice.client.common.internal,
org.eclipse.ice.client.common.properties,
org.eclipse.ice.client.widgets.geometry,
org.eclipse.ice.client.widgets.jme,
org.eclipse.ice.client.widgets.mesh,
......@@ -23,12 +25,10 @@ Import-Package: com.jme3.app,
org.eclipse.ice.iclient,
org.eclipse.ice.iclient.uiwidgets,
org.eclipse.ice.reactor,
org.eclipse.ice.viz.service,
org.eclipse.ui.views.properties,
org.eclipse.ui.views.properties.tabbed,
org.osgi.framework;version="1.6.0"
Export-Package: org.eclipse.ice.client.common,
org.eclipse.ice.client.widgets,
org.eclipse.ice.client.widgets.properties,
org.eclipse.ice.client.widgets.viz.service
Export-Package: org.eclipse.ice.client.widgets
Service-Component: OSGI-INF/eclipseWidgetsComponent.xml, OSGI-INF/commonComponent.xml,
OSGI-INF/formEditorVizService.xml
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.ice.client.common">
<implementation class="org.eclipse.ice.client.common.internal.ClientHolder"/>
<reference bind="setClient" cardinality="1..1" interface="org.eclipse.ice.iclient.IClient" name="IClient" policy="dynamic" unbind="unsetClient"/>
</scr:component>
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.ice.client.widgets.ICEFormEditor">
<implementation class="org.eclipse.ice.client.widgets.ICEFormEditor"/>
<reference bind="setVizServiceFactory" cardinality="1..1" interface="org.eclipse.ice.client.widgets.viz.service.IVizServiceFactory" name="IVizServiceFactory" policy="dynamic"/>
<reference bind="setVizServiceFactory" cardinality="1..1" interface="org.eclipse.ice.viz.service.IVizServiceFactory" name="IVizServiceFactory" policy="dynamic"/>
</scr:component>
......@@ -208,7 +208,7 @@
<extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
<propertySections contributorId="org.eclipse.ice.client.common.TreeCompositeViewer">
<propertySection
class="org.eclipse.ice.client.widgets.properties.TreePropertySection"
class="org.eclipse.ice.client.common.properties.TreePropertySection"
id="DataSection"
tab="TreeViewer.Data">
<input type="org.eclipse.ice.datastructures.form.TreeComposite"/>
......@@ -241,7 +241,7 @@
<propertySections
contributorId="org.eclipse.ice.client.widgets.EMFTreeCompositeViewer">
<propertySection
class="org.eclipse.ice.client.widgets.properties.TreePropertySection"
class="org.eclipse.ice.client.common.properties.TreePropertySection"
id="DataSection"
tab="TreeViewer.Data">
<input
......@@ -394,7 +394,7 @@
</category>
<wizard
name="Create Item Wizard"
class="org.eclipse.ice.client.widgets.wizards.NewItemWizard"
class="org.eclipse.ice.client.common.wizards.NewItemWizard"
id="org.eclipse.ice.client.common.CreateItemWizard"
category="org.eclipse.ice.wizards">
</wizard>
......@@ -410,14 +410,14 @@
</category>
<wizard
category="org.eclipse.ice.wizards"
class="org.eclipse.ice.client.widgets.wizards.ImportFileWizard"
class="org.eclipse.ice.client.common.wizards.ImportFileWizard"
icon="icons/importArrow.gif"
id="org.eclipse.ice.client.widgets.wizards.ImportFile"
name="Import existing files into the workspace">
</wizard>
<wizard
category="org.eclipse.ice.wizards"
class="org.eclipse.ice.client.widgets.wizards.ImportItemWizard"
class="org.eclipse.ice.client.common.wizards.ImportItemWizard"
icon="icons/itemImport.gif"
id="org.eclipse.ice.client.widgets.wizards.ImportItem"
name="Import existing files into an Item">
......
package org.eclipse.ice.client.common;
package org.eclipse.ice.client.widgets;
import org.eclipse.ice.datastructures.form.TreeComposite;
import org.eclipse.jface.action.Action;
......
......@@ -10,7 +10,7 @@
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.common;
package org.eclipse.ice.client.widgets;
import java.net.URL;
import java.util.ArrayList;
......
......@@ -10,13 +10,12 @@
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.common;
package org.eclipse.ice.client.widgets;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.ice.client.widgets.DataComponentComposite;
import org.eclipse.ice.datastructures.ICEObject.Component;
import org.eclipse.ice.datastructures.ICEObject.ListComponent;
import org.eclipse.ice.datastructures.componentVisitor.IComponentVisitor;
......
......@@ -10,7 +10,7 @@
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.common;
package org.eclipse.ice.client.widgets;
import java.net.URL;
......
......@@ -14,7 +14,6 @@ package org.eclipse.ice.client.widgets;
import java.util.regex.Pattern;
import org.eclipse.ice.client.common.TreeCompositeViewer;
import org.eclipse.ice.datastructures.form.TreeComposite;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuListener;
......
......@@ -71,27 +71,27 @@ import org.eclipse.ui.forms.IMessageManager;
* @author gqx, Anna Wojtowicz
*/
public class EntryComposite extends Composite implements IUpdateableListener {
/**
* A label that describes the Entry.
*/
private Label label;
/**
* A text field that is used if the Entry type is unspecified.
*/
private Text text;
/**
* A drop-down menu for the Entry.
*/
private Combo dropDown;
/**
* A set of buttons for the Entry.
*/
protected final List<Button> buttons;
/**
* The Entry that is displayed by the EntryComposite.
*/
......@@ -102,7 +102,7 @@ public class EntryComposite extends Composite implements IUpdateableListener {
* manipulating the Entry should be posted.
*/
private IMessageManager messageManager;
/**
* The name of the message posted to the message manager.
*/
......@@ -301,16 +301,16 @@ public class EntryComposite extends Composite implements IUpdateableListener {
* This operation creates a drop-down menu on the Composite.
*/
private void createDropdown() {
if (dropDown == null || dropDown.isDisposed()) {
// Create a drop-down menu
dropDown = new Combo(this, SWT.DROP_DOWN | SWT.SINGLE | SWT.V_SCROLL
| SWT.H_SCROLL | SWT.READ_ONLY);
dropDown = new Combo(this, SWT.DROP_DOWN | SWT.SINGLE
| SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY);
dropDown.setBackground(getBackground());
// Determine the current value of the entry.
String currentValue = entry.getValue();
// Add the allowed values to the dropdown menu. If the allowed value
// matches the current value, select it.
List<String> allowedValues = entry.getAllowedValues();
......@@ -321,7 +321,7 @@ public class EntryComposite extends Composite implements IUpdateableListener {
dropDown.select(i);
}
}
// Add a selection listener
dropDown.addSelectionListener(new SelectionAdapter() {
@Override
......@@ -338,7 +338,7 @@ public class EntryComposite extends Composite implements IUpdateableListener {
// has been added to the Entry
List<String> allowedValues = entry.getAllowedValues();
List<String> comboValues = Arrays.asList(dropDown.getItems());
for (int i = 0; i < allowedValues.size(); i++) {
String allowedValue = allowedValues.get(i);
// Add any new AllowedValues to the dropDown
......@@ -403,12 +403,12 @@ public class EntryComposite extends Composite implements IUpdateableListener {
private void createBrowseButton() {
boolean redraw = buttons.isEmpty();
if (redraw) {
// Create a new button, set the text
Button browseButton = new Button(this, SWT.PUSH);
browseButton.setText("Browse...");
// Add an event listener that displays a Directory Dialog prompt
browseButton.addSelectionListener(new SelectionAdapter() {
@Override
......@@ -427,11 +427,12 @@ public class EntryComposite extends Composite implements IUpdateableListener {
client.importFile(importedFile.toURI());
setEntryValue(importedFile.getName());
}
return;
}
});
// Add the browse button
buttons.add(browseButton);
}
......@@ -660,19 +661,19 @@ public class EntryComposite extends Composite implements IUpdateableListener {
+ "This composite has been prematurely disposed!");
return;
}
// Remove the resize listener.
if (resizeListener != null) {
removeControlListener(resizeListener);
resizeListener = null;
}
// Re-render the Composite
render();
// Re-draw the Composite
layout();
return;
}
......@@ -728,7 +729,7 @@ public class EntryComposite extends Composite implements IUpdateableListener {
if (allowedValue != null) {
entry.setValue(allowedValue);
}
} else {
// Remove a posted message if necessary
if (messageManager != null) {
......
......@@ -17,8 +17,6 @@ import java.util.HashMap;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ice.client.common.TreeCompositeViewer;
import org.eclipse.ice.client.widgets.viz.service.IVizServiceFactory;
import org.eclipse.ice.datastructures.ICEObject.Component;
import org.eclipse.ice.datastructures.ICEObject.ICEObject;
import org.eclipse.ice.datastructures.ICEObject.IUpdateable;
......@@ -43,6 +41,7 @@ import org.eclipse.ice.iclient.uiwidgets.IObservableWidget;
import org.eclipse.ice.iclient.uiwidgets.IProcessEventListener;
import org.eclipse.ice.iclient.uiwidgets.ISimpleResourceProvider;
import org.eclipse.ice.iclient.uiwidgets.IUpdateEventListener;
import org.eclipse.ice.viz.service.IVizServiceFactory;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
......
......@@ -19,15 +19,15 @@ import java.util.Map;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.ice.client.widgets.viz.service.IPlot;
import org.eclipse.ice.client.widgets.viz.service.IVizService;
import org.eclipse.ice.client.widgets.viz.service.IVizServiceFactory;
import org.eclipse.ice.datastructures.ICEObject.IUpdateable;
import org.eclipse.ice.datastructures.ICEObject.IUpdateableListener;
import org.eclipse.ice.datastructures.form.ResourceComponent;
import org.eclipse.ice.datastructures.resource.ICEResource;
import org.eclipse.ice.datastructures.resource.VizResource;
import org.eclipse.ice.iclient.uiwidgets.ISimpleResourceProvider;
import org.eclipse.ice.viz.service.IPlot;
import org.eclipse.ice.viz.service.IVizService;
import org.eclipse.ice.viz.service.IVizServiceFactory;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
......
......@@ -7,7 +7,7 @@ import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.ice.client.common.ActionTree;
import org.eclipse.ice.client.widgets.viz.service.IPlot;
import org.eclipse.ice.viz.service.IPlot;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
......
......@@ -10,7 +10,7 @@
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.common;
package org.eclipse.ice.client.widgets;
import java.util.regex.Pattern;
......
......@@ -10,7 +10,7 @@
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.common;
package org.eclipse.ice.client.widgets;
import java.util.List;
import java.util.Map;
......
......@@ -10,13 +10,13 @@
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.common;
package org.eclipse.ice.client.widgets;
import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.List;
import org.eclipse.ice.client.widgets.ICEFormEditor;
import org.eclipse.ice.client.common.TreeCompositeLabelProvider;
import org.eclipse.ice.datastructures.ICEObject.Component;
import org.eclipse.ice.datastructures.ICEObject.IUpdateable;
import org.eclipse.ice.datastructures.ICEObject.IUpdateableListener;
......
......@@ -10,14 +10,21 @@
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.widgets.properties;
package org.eclipse.ice.client.widgets;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.ice.client.common.TreeCompositeViewer;
import org.eclipse.ice.client.widgets.ICEFormEditor;
import org.eclipse.ice.client.common.properties.CellColumnLabelProvider;
import org.eclipse.ice.client.common.properties.ComboCellEditingSupport;
import org.eclipse.ice.client.common.properties.ICellContentProvider;
import org.eclipse.ice.client.common.properties.IComboCellContentProvider;
import org.eclipse.ice.client.common.properties.NameCellContentProvider;
import org.eclipse.ice.client.common.properties.TextCellEditingSupport;
import org.eclipse.ice.client.common.properties.TreeProperty;
import org.eclipse.ice.client.common.properties.TreePropertyContentProvider;
import org.eclipse.ice.client.common.properties.ValueCellContentProvider;
import org.eclipse.ice.datastructures.ICEObject.Component;
import org.eclipse.ice.datastructures.ICEObject.IUpdateable;
import org.eclipse.ice.datastructures.ICEObject.IUpdateableListener;
......
......@@ -4,9 +4,15 @@ Bundle-Name: Client
Bundle-SymbolicName: org.eclipse.ice.client
Bundle-Version: 2.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.eclipse.ice.iclient,
Export-Package: org.eclipse.ice.client.common,
org.eclipse.ice.client.common.internal,
org.eclipse.ice.client.common.properties,
org.eclipse.ice.client.common.wizards,
org.eclipse.ice.iclient,
org.eclipse.ice.iclient.uiwidgets
Import-Package: javax.ws.rs.core,
org.eclipse.core.expressions,
org.eclipse.core.runtime;version="3.4.0",
org.eclipse.ice.core.iCore,
org.eclipse.ice.datastructures.ICEObject,
org.eclipse.ice.datastructures.componentVisitor,
......@@ -14,7 +20,10 @@ Import-Package: javax.ws.rs.core,
org.eclipse.ice.datastructures.form.geometry,
org.eclipse.ice.datastructures.form.painfullySimpleForm,
org.eclipse.ice.datastructures.resource,
org.eclipse.ice.item
org.eclipse.ice.item,
org.eclipse.ui.views.properties.tabbed,
org.osgi.framework;version="1.7.0"
Service-Component: OSGI-INF/clientComponent.xml
Require-Bundle: org.eclipse.ice.datastructures;bundle-version="2.0.0",
com.sun.jersey;bundle-version="1.17.0"
com.sun.jersey;bundle-version="1.17.0",
org.eclipse.ice.client.compatibility;bundle-version="2.0.0"