Commit d71961ec authored by Robert Smith's avatar Robert Smith
Browse files

Decoupling Plant View from jME3



Continued work on creating a generic IPlantView interface for the jME3
implementation to realize. Also finished the JavaFX camera
implementation for the Plant View's capabilities, including a refactor
to make all camera controllers extend from an AbstractCameraController.
Signed-off-by: Robert Smith's avatarRobert Smith <SmithRW@ornl.gov>
parent b107b0e1
...@@ -37,6 +37,7 @@ Import-Package: com.jme3.math, ...@@ -37,6 +37,7 @@ Import-Package: com.jme3.math,
org.eclipse.ice.persistence.xml, org.eclipse.ice.persistence.xml,
org.eclipse.ice.reactor.plant, org.eclipse.ice.reactor.plant,
org.eclipse.ice.viz.service, org.eclipse.ice.viz.service,
org.eclipse.ice.viz.service.geometry.plantView,
org.eclipse.ice.viz.service.jme3.application, org.eclipse.ice.viz.service.jme3.application,
org.eclipse.jgit.api;version="4.0.0", org.eclipse.jgit.api;version="4.0.0",
org.eclipse.jgit.api.errors;version="4.0.0", org.eclipse.jgit.api.errors;version="4.0.0",
......
<?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.moose.ViewFactory">
<implementation class="org.eclipse.ice.client.moose.ViewFactory"/>
<reference bind="setVizServiceFactory" cardinality="1..1" interface="org.eclipse.ice.viz.service.IVizServiceFactory" name="IVizServiceFactory" policy="dynamic"/>
</scr:component>
\ No newline at end of file
...@@ -26,7 +26,6 @@ import org.eclipse.ice.client.common.ActionTree; ...@@ -26,7 +26,6 @@ import org.eclipse.ice.client.common.ActionTree;
import org.eclipse.ice.client.widgets.ICEFormEditor; import org.eclipse.ice.client.widgets.ICEFormEditor;
import org.eclipse.ice.client.widgets.ICEFormInput; import org.eclipse.ice.client.widgets.ICEFormInput;
import org.eclipse.ice.client.widgets.ICEFormPage; import org.eclipse.ice.client.widgets.ICEFormPage;
import org.eclipse.ice.client.widgets.jme.ViewFactory;
import org.eclipse.ice.client.widgets.moose.components.PlantBlockManager; import org.eclipse.ice.client.widgets.moose.components.PlantBlockManager;
import org.eclipse.ice.client.widgets.reactoreditor.plant.PlantAppState; import org.eclipse.ice.client.widgets.reactoreditor.plant.PlantAppState;
import org.eclipse.ice.datastructures.form.DataComponent; import org.eclipse.ice.datastructures.form.DataComponent;
...@@ -38,6 +37,7 @@ import org.eclipse.ice.datastructures.resource.ICEResource; ...@@ -38,6 +37,7 @@ import org.eclipse.ice.datastructures.resource.ICEResource;
import org.eclipse.ice.item.nuclear.MOOSE; import org.eclipse.ice.item.nuclear.MOOSE;
import org.eclipse.ice.item.nuclear.MOOSEModel; import org.eclipse.ice.item.nuclear.MOOSEModel;
import org.eclipse.ice.reactor.plant.PlantComposite; import org.eclipse.ice.reactor.plant.PlantComposite;
import org.eclipse.ice.viz.service.geometry.plantView.IPlantView;
import org.eclipse.jface.action.Action; import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.Separator; import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager; import org.eclipse.jface.action.ToolBarManager;
...@@ -63,7 +63,6 @@ import org.eclipse.ui.forms.widgets.FormToolkit; ...@@ -63,7 +63,6 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.forms.widgets.Section;
import org.osgi.framework.Bundle; import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil; import org.osgi.framework.FrameworkUtil;
import com.jme3.math.Vector3f;
/** /**
* This class extends the default {@link ICEFormEditor} to enable it to draw a * This class extends the default {@link ICEFormEditor} to enable it to draw a
...@@ -93,7 +92,7 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -93,7 +92,7 @@ public class MOOSEFormEditor extends ICEFormEditor {
/** /**
* The PlantAppState rendered on the Plant View page. * The PlantAppState rendered on the Plant View page.
*/ */
private PlantAppState plantView; private IPlantView plantView;
/** /**
* The factory responsible for synchronizing the current "Components" * The factory responsible for synchronizing the current "Components"
...@@ -171,7 +170,8 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -171,7 +170,8 @@ public class MOOSEFormEditor extends ICEFormEditor {
// names // names
// to the String list if they are enabled by the // to the String list if they are enabled by the
// user // user
for (Entry postProcessor : postProcessors.retrieveAllEntries()) { for (Entry postProcessor : postProcessors
.retrieveAllEntries()) {
if ("yes".equals(postProcessor.getValue())) { if ("yes".equals(postProcessor.getValue())) {
enabledPPs.add(postProcessor.getName()); enabledPPs.add(postProcessor.getName());
} }
...@@ -186,24 +186,30 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -186,24 +186,30 @@ public class MOOSEFormEditor extends ICEFormEditor {
// list of the Resources corresponding to the // list of the Resources corresponding to the
// enabled // enabled
// Postprocessors. // Postprocessors.
while (resourceList.size() != enabledPPs.size()) { while (resourceList.size() != enabledPPs
.size()) {
// Grab the ResourceComponent // Grab the ResourceComponent
resources = resourceComponentPage.getResourceComponent(); resources = resourceComponentPage
.getResourceComponent();
// Sleep a little bit // Sleep a little bit
try { try {
Thread.sleep(500); Thread.sleep(500);
} catch (InterruptedException e) { } catch (InterruptedException e) {
logger.error(getClass().getName() + " Exception!", e); logger.error(getClass().getName()
+ " Exception!", e);
} }
// Loop over the ICEResources and add them // Loop over the ICEResources and add them
// to the list if they correspond to enabled // to the list if they correspond to enabled
// Postprocessors and have valid data // Postprocessors and have valid data
for (ICEResource r : resources.getResources()) { for (ICEResource r : resources
if (enabledPPs.contains(FilenameUtils.removeExtension(r.getName())) .getResources()) {
&& hasValidPostprocessorData(r)) { if (enabledPPs.contains(FilenameUtils
.removeExtension(r.getName()))
&& hasValidPostprocessorData(
r)) {
resourceList.add(r); resourceList.add(r);
} }
} }
...@@ -218,17 +224,28 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -218,17 +224,28 @@ public class MOOSEFormEditor extends ICEFormEditor {
for (final ICEResource r : resourceList) { for (final ICEResource r : resourceList) {
// Kick off on UI thread // Kick off on UI thread
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { PlatformUI.getWorkbench().getDisplay()
.asyncExec(new Runnable() {
@Override @Override
public void run() { public void run() {
try { try {
// Only show the resource if it hasn't already been displayed // Only show the resource if it
if (!resourceComponentPage.isResourceDisplayed(r)) { // hasn't already been displayed
MOOSEFormEditor.this.setActivePage(resourceComponentPage.getId()); if (!resourceComponentPage
resourceComponentPage.showResource(r); .isResourceDisplayed(
r)) {
MOOSEFormEditor.this
.setActivePage(
resourceComponentPage
.getId());
resourceComponentPage
.showResource(r);
} }
} catch (PartInitException e) { } catch (PartInitException e) {
logger.error(getClass().getName() + " Exception!", e); logger.error(
getClass().getName()
+ " Exception!",
e);
} }
} }
...@@ -263,7 +280,8 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -263,7 +280,8 @@ public class MOOSEFormEditor extends ICEFormEditor {
// Simply count the number of lines in the resource file // Simply count the number of lines in the resource file
try { try {
LineNumberReader reader = new LineNumberReader(new FileReader(r.getPath().getPath())); LineNumberReader reader = new LineNumberReader(
new FileReader(r.getPath().getPath()));
int cnt = 0; int cnt = 0;
String lineRead = ""; String lineRead = "";
while ((lineRead = reader.readLine()) != null) { while ((lineRead = reader.readLine()) != null) {
...@@ -307,7 +325,8 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -307,7 +325,8 @@ public class MOOSEFormEditor extends ICEFormEditor {
// Create a Section for the plant view. // Create a Section for the plant view.
section = toolkit.createSection(body, section = toolkit.createSection(body,
ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED); ExpandableComposite.NO_TITLE
| ExpandableComposite.EXPANDED);
populatePlantViewSection(section, toolkit); populatePlantViewSection(section, toolkit);
// No layout data to set for FillLayouts. // No layout data to set for FillLayouts.
...@@ -330,7 +349,8 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -330,7 +349,8 @@ public class MOOSEFormEditor extends ICEFormEditor {
* @param toolkit * @param toolkit
* The {@code FormToolkit} used to decorate widgets as necessary. * The {@code FormToolkit} used to decorate widgets as necessary.
*/ */
private void populatePlantViewSection(Section section, FormToolkit toolkit) { private void populatePlantViewSection(Section section,
FormToolkit toolkit) {
// Get the background color to use later. // Get the background color to use later.
Color background = section.getBackground(); Color background = section.getBackground();
...@@ -350,7 +370,8 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -350,7 +370,8 @@ public class MOOSEFormEditor extends ICEFormEditor {
// Add it to the view. // Add it to the view.
ToolBar toolBar = toolBarManager.createControl(analysisComposite); ToolBar toolBar = toolBarManager.createControl(analysisComposite);
toolBar.setBackground(background); toolBar.setBackground(background);
toolBar.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false)); toolBar.setLayoutData(
new GridData(SWT.FILL, SWT.BEGINNING, true, false));
// Create the plant view. // Create the plant view.
TreeComposite components = findComponentBlock(); TreeComposite components = findComponentBlock();
...@@ -361,7 +382,8 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -361,7 +382,8 @@ public class MOOSEFormEditor extends ICEFormEditor {
// Render the plant view in the analysis Composite. // Render the plant view in the analysis Composite.
Composite plantComposite = plantView.createComposite(analysisComposite); Composite plantComposite = plantView.createComposite(analysisComposite);
plantComposite.setBackground(background); plantComposite.setBackground(background);
plantComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); plantComposite
.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
// Make sure the factory/plant is reset when the plant view is disposed. // Make sure the factory/plant is reset when the plant view is disposed.
plantComposite.addDisposeListener(new DisposeListener() { plantComposite.addDisposeListener(new DisposeListener() {
...@@ -417,37 +439,23 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -417,37 +439,23 @@ public class MOOSEFormEditor extends ICEFormEditor {
plantView.resetCamera(); plantView.resetCamera();
} }
})); }));
cameraTree.add(new ActionTree(new Action("YZ (Y right, Z up - initial default)") { cameraTree.add(new ActionTree(
@Override new Action("YZ (Y right, Z up - initial default)") {
public void run() { @Override
Vector3f position = new Vector3f(10f, 0f, 0f); public void run() {
Vector3f dir = new Vector3f(-1f, 0f, 0f); plantView.setDefaultCameraYByZ();
Vector3f up = Vector3f.UNIT_Z; }
plantView.setDefaultCameraPosition(position); }));
plantView.setDefaultCameraOrientation(dir, up);
plantView.resetCamera();
}
}));
cameraTree.add(new ActionTree(new Action("XY (X right, Y up)") { cameraTree.add(new ActionTree(new Action("XY (X right, Y up)") {
@Override @Override
public void run() { public void run() {
Vector3f position = new Vector3f(0f, 0f, 10f); plantView.setDefaultCameraXByY();
Vector3f dir = new Vector3f(0f, 0f, -1f);
Vector3f up = Vector3f.UNIT_Y;
plantView.setDefaultCameraPosition(position);
plantView.setDefaultCameraOrientation(dir, up);
plantView.resetCamera();
} }
})); }));
cameraTree.add(new ActionTree(new Action("ZX (Z right, X up)") { cameraTree.add(new ActionTree(new Action("ZX (Z right, X up)") {
@Override @Override
public void run() { public void run() {
Vector3f position = new Vector3f(0f, 10f, 0f); plantView.setDefaultCameraZByX();
Vector3f dir = new Vector3f(0f, -1f, 0f);
Vector3f up = Vector3f.UNIT_X;
plantView.setDefaultCameraPosition(position);
plantView.setDefaultCameraOrientation(dir, up);
plantView.resetCamera();
} }
})); }));
toolBar.add(cameraTree.getContributionItem()); toolBar.add(cameraTree.getContributionItem());
...@@ -460,9 +468,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -460,9 +468,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
} }
}; };
// Set the action's image (a camera). // Set the action's image (a camera).
imagePath = new Path("icons" + System.getProperty("file.separator") + "camera.png"); imagePath = new Path(
"icons" + System.getProperty("file.separator") + "camera.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
ImageDescriptor imageDescriptor = ImageDescriptor.createFromURL(imageURL); ImageDescriptor imageDescriptor = ImageDescriptor
.createFromURL(imageURL);
action.setImageDescriptor(imageDescriptor); action.setImageDescriptor(imageDescriptor);
ActionTree saveImageTree = new ActionTree(action); ActionTree saveImageTree = new ActionTree(action);
toolBar.add(saveImageTree.getContributionItem()); toolBar.add(saveImageTree.getContributionItem());
...@@ -474,10 +484,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -474,10 +484,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Move left (A)") { action = new Action("Move left (A)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().strafeCamera(-1f); plantView.strafeCamera(-1f);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-left-perspective-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-left-perspective-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -487,10 +498,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -487,10 +498,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Move forward (W)") { action = new Action("Move forward (W)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().thrustCamera(moveRate); plantView.thrustCamera(moveRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-up-perspective-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-up-perspective-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -500,10 +512,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -500,10 +512,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Move backward (S)") { action = new Action("Move backward (S)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().thrustCamera(-moveRate); plantView.thrustCamera(-moveRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-down-perspective-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-down-perspective-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -513,10 +526,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -513,10 +526,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Move right (D)") { action = new Action("Move right (D)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().strafeCamera(moveRate); plantView.strafeCamera(moveRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-right-perspective-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-right-perspective-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -526,10 +540,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -526,10 +540,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Move up (SPACE)") { action = new Action("Move up (SPACE)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().raiseCamera(moveRate); plantView.raiseCamera(moveRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-up-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-up-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -539,10 +554,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -539,10 +554,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Move down (C)") { action = new Action("Move down (C)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().raiseCamera(-moveRate); plantView.raiseCamera(-moveRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-down-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-down-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -556,10 +572,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -556,10 +572,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Roll Left (Q)") { action = new Action("Roll Left (Q)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().rollCamera(-rotateRate); plantView.rollCamera(-rotateRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-roll-left-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-roll-left-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -569,10 +586,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -569,10 +586,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Roll Right (E)") { action = new Action("Roll Right (E)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().rollCamera(rotateRate); plantView.rollCamera(rotateRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-roll-right-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-roll-right-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -582,10 +600,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -582,10 +600,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Pitch Up (up arrow)") { action = new Action("Pitch Up (up arrow)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().pitchCamera(rotateRate); plantView.pitchCamera(rotateRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-pitch-up-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-pitch-up-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -594,10 +613,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -594,10 +613,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Pitch down (down arrow)") { action = new Action("Pitch down (down arrow)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().pitchCamera(-rotateRate); plantView.pitchCamera(-rotateRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-pitch-down-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-pitch-down-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -607,10 +627,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -607,10 +627,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Yaw Left (left arrow)") { action = new Action("Yaw Left (left arrow)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().yawCamera(-rotateRate); plantView.yawCamera(-rotateRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-yaw-left-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")
+ "arrow-yaw-left-16.png");
imageURL = FileLocator.find(bundle, imagePath, null); imageURL = FileLocator.find(bundle, imagePath, null);
image = ImageDescriptor.createFromURL(imageURL); image = ImageDescriptor.createFromURL(imageURL);
action.setImageDescriptor(image); action.setImageDescriptor(image);
...@@ -619,10 +640,11 @@ public class MOOSEFormEditor extends ICEFormEditor { ...@@ -619,10 +640,11 @@ public class MOOSEFormEditor extends ICEFormEditor {
action = new Action("Yaw Right (right arrow)") { action = new Action("Yaw Right (right arrow)") {
@Override @Override
public void run() { public void run() {
plantView.getFlightCamera().yawCamera(rotateRate); plantView.yawCamera(rotateRate);
} }
}; };
imagePath = new Path("icons" + System.getProperty("file.separator") + "arrow-yaw-right-16.png"); imagePath = new Path("icons" + System.getProperty("file.separator")