Commit 37ad897f authored by Robert Smith's avatar Robert Smith

Working on converting Geometry editor

Working on converting the geometry editor to the new data types.
Signed-off-by: Robert Smith's avatarRobert Smith <SmithRW@ornl.gov>
parent b61dfdf7
...@@ -5,9 +5,10 @@ Bundle-SymbolicName: org.eclipse.ice.client.widgets.test ...@@ -5,9 +5,10 @@ Bundle-SymbolicName: org.eclipse.ice.client.widgets.test
Bundle-Version: 2.1.8.qualifier Bundle-Version: 2.1.8.qualifier
Fragment-Host: org.eclipse.ice.client.widgets;bundle-version="2.0.0" Fragment-Host: org.eclipse.ice.client.widgets;bundle-version="2.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.eclipse.eavp.viz.service.geometry.shapes, Import-Package: org.eclipse.eavp.viz.modeling,
org.eclipse.eavp.viz.service.geometry.widgets, org.eclipse.eavp.viz.service.geometry.widgets,
org.eclipse.eavp.viz.modeling, org.eclipse.eavp.viz.service.javafx.canvas,
org.eclipse.january.geometry,
org.eclipse.ui, org.eclipse.ui,
org.junit org.junit
Require-Bundle: org.eclipse.swtbot.eclipse.core, Require-Bundle: org.eclipse.swtbot.eclipse.core,
......
...@@ -14,12 +14,10 @@ package org.eclipse.ice.client.widgets.test; ...@@ -14,12 +14,10 @@ package org.eclipse.ice.client.widgets.test;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.eclipse.eavp.viz.modeling.base.BasicView;
import org.eclipse.eavp.viz.modeling.ShapeController;
import org.eclipse.eavp.viz.modeling.Shape;
import org.eclipse.ice.client.widgets.ICEFormEditor; import org.eclipse.ice.client.widgets.ICEFormEditor;
import org.eclipse.ice.client.widgets.ICEGeometryPage; import org.eclipse.ice.client.widgets.ICEGeometryPage;
import org.eclipse.ice.datastructures.form.GeometryComponent; import org.eclipse.ice.datastructures.form.GeometryComponent;
import org.eclipse.january.geometry.GeometryFactory;
import org.junit.Test; import org.junit.Test;
/** /**
...@@ -43,10 +41,10 @@ public class ICEGeometryPageTester { ...@@ -43,10 +41,10 @@ public class ICEGeometryPageTester {
// Get two GeometryComponent to check equality // Get two GeometryComponent to check equality
GeometryComponent geometryComponent = new GeometryComponent(); GeometryComponent geometryComponent = new GeometryComponent();
GeometryComponent otherGeometryComponent = new GeometryComponent(); GeometryComponent otherGeometryComponent = new GeometryComponent();
geometryComponent.setGeometry( geometryComponent
new ShapeController(new Shape(), new BasicView())); .setGeometry(GeometryFactory.eINSTANCE.createGeometry());
geometryComponent.setGeometry( geometryComponent
new ShapeController(new Shape(), new BasicView())); .setGeometry(GeometryFactory.eINSTANCE.createGeometry());
// Get ICEGeometryPage to check accessor // Get ICEGeometryPage to check accessor
ICEFormEditor ICEFormEditor = new ICEFormEditor(); ICEFormEditor ICEFormEditor = new ICEFormEditor();
......
...@@ -18,15 +18,24 @@ import static org.junit.Assert.assertFalse; ...@@ -18,15 +18,24 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.eclipse.eavp.viz.modeling.Shape;
import org.eclipse.eavp.viz.modeling.ShapeController;
import org.eclipse.eavp.viz.modeling.base.BasicView; import org.eclipse.eavp.viz.modeling.base.BasicView;
import org.eclipse.eavp.viz.modeling.properties.MeshProperty; import org.eclipse.eavp.viz.modeling.properties.MeshProperty;
import org.eclipse.eavp.viz.modeling.ShapeController;
import org.eclipse.eavp.viz.modeling.Shape;
import org.eclipse.eavp.viz.service.geometry.shapes.GeometryMeshProperty; import org.eclipse.eavp.viz.service.geometry.shapes.GeometryMeshProperty;
import org.eclipse.eavp.viz.service.geometry.shapes.OperatorType; import org.eclipse.eavp.viz.service.geometry.shapes.OperatorType;
import org.eclipse.eavp.viz.service.geometry.shapes.ShapeType; import org.eclipse.eavp.viz.service.geometry.shapes.ShapeType;
import org.eclipse.eavp.viz.service.geometry.widgets.ShapeTreeContentProvider; import org.eclipse.eavp.viz.service.geometry.widgets.ShapeTreeContentProvider;
import org.eclipse.eavp.viz.service.javafx.canvas.FXAttachment;
import org.eclipse.eavp.viz.service.javafx.canvas.FXAttachmentManager;
import org.eclipse.ice.datastructures.form.GeometryComponent; import org.eclipse.ice.datastructures.form.GeometryComponent;
import org.eclipse.january.geometry.Complement;
import org.eclipse.january.geometry.Cube;
import org.eclipse.january.geometry.Geometry;
import org.eclipse.january.geometry.GeometryFactory;
import org.eclipse.january.geometry.Intersection;
import org.eclipse.january.geometry.Sphere;
import org.eclipse.january.geometry.Union;
import org.junit.Test; import org.junit.Test;
/** /**
...@@ -48,7 +57,8 @@ public class ShapeTreeContentProviderTest { ...@@ -48,7 +57,8 @@ public class ShapeTreeContentProviderTest {
// Create all needed objects // Create all needed objects
ShapeTreeContentProvider shapeProvider = new ShapeTreeContentProvider(); ShapeTreeContentProvider shapeProvider = new ShapeTreeContentProvider(
new FXAttachment(new FXAttachmentManager()));
// Create a shape // Create a shape
Shape geometryModel = new Shape(); Shape geometryModel = new Shape();
...@@ -127,7 +137,8 @@ public class ShapeTreeContentProviderTest { ...@@ -127,7 +137,8 @@ public class ShapeTreeContentProviderTest {
// Create all needed objects // Create all needed objects
ShapeTreeContentProvider shapeProvider = new ShapeTreeContentProvider(); ShapeTreeContentProvider shapeProvider = new ShapeTreeContentProvider(
new FXAttachment(new FXAttachmentManager()));
// Create a shape // Create a shape
Shape geometryModel = new Shape(); Shape geometryModel = new Shape();
...@@ -189,7 +200,8 @@ public class ShapeTreeContentProviderTest { ...@@ -189,7 +200,8 @@ public class ShapeTreeContentProviderTest {
// but we can still check whether it doesn't throw exceptions upon // but we can still check whether it doesn't throw exceptions upon
// creation and destruction. // creation and destruction.
ShapeTreeContentProvider shapeProvider = new ShapeTreeContentProvider(); ShapeTreeContentProvider shapeProvider = new ShapeTreeContentProvider(
new FXAttachment(new FXAttachmentManager()));
shapeProvider.dispose(); shapeProvider.dispose();
...@@ -206,29 +218,27 @@ public class ShapeTreeContentProviderTest { ...@@ -206,29 +218,27 @@ public class ShapeTreeContentProviderTest {
// Create all needed objects // Create all needed objects
ShapeTreeContentProvider shapeProvider = new ShapeTreeContentProvider(); ShapeTreeContentProvider shapeProvider = new ShapeTreeContentProvider(
new FXAttachment(new FXAttachmentManager()));
Shape geometryModel = new Shape(); Geometry geometry = GeometryFactory.eINSTANCE.createGeometry();
geometryModel.setProperty(MeshProperty.TYPE, ShapeType.Sphere.toString());
BasicView geometryView = new BasicView();
ShapeController geometry = new ShapeController(geometryModel,
geometryView);
ShapeController sphere1 = (ShapeController) geometry.clone(); Sphere sphere1 = GeometryFactory.eINSTANCE.createSphere();
ShapeController cube1 = (ShapeController) geometry.clone(); Cube cube1 = GeometryFactory.eINSTANCE.createCube();
ShapeController union1 = (ShapeController) geometry.clone(); Union union1 = GeometryFactory.eINSTANCE.createUnion();
ShapeController complement1 = (ShapeController) geometry.clone(); Complement complement1 = GeometryFactory.eINSTANCE.createComplement();
ShapeController intersection1 = (ShapeController) geometry.clone(); Intersection intersection1 = GeometryFactory.eINSTANCE
.createIntersection();
// Put them all in a GeometryComponent // Put them all in a GeometryComponent
GeometryComponent geometryComponent = new GeometryComponent(); GeometryComponent geometryComponent = new GeometryComponent();
geometryComponent.setGeometry(geometry); geometryComponent.setGeometry(geometry);
geometryComponent.getGeometry().addEntity(sphere1); geometryComponent.getGeometry().addNode(sphere1);
geometryComponent.getGeometry().addEntity(cube1); geometryComponent.getGeometry().addNode(cube1);
geometryComponent.getGeometry().addEntity(union1); geometryComponent.getGeometry().addNode(union1);
geometryComponent.getGeometry().addEntity(complement1); geometryComponent.getGeometry().addNode(complement1);
geometryComponent.getGeometry().addEntity(sphere1); geometryComponent.getGeometry().addNode(sphere1);
Object[] expectedElements = new Object[] { sphere1, cube1, union1, Object[] expectedElements = new Object[] { sphere1, cube1, union1,
complement1, sphere1 }; complement1, sphere1 };
......
...@@ -11,7 +11,9 @@ Require-Bundle: org.eclipse.ice.datastructures, ...@@ -11,7 +11,9 @@ Require-Bundle: org.eclipse.ice.datastructures,
org.eclipse.nebula.widgets.nattable.core;bundle-version="1.3.0", org.eclipse.nebula.widgets.nattable.core;bundle-version="1.3.0",
org.eclipse.nebula.widgets.nattable.extension.glazedlists;bundle-version="1.3.0", org.eclipse.nebula.widgets.nattable.extension.glazedlists;bundle-version="1.3.0",
org.eclipse.remote.ui;bundle-version="2.0.0", org.eclipse.remote.ui;bundle-version="2.0.0",
org.eclipse.swt org.eclipse.swt,
org.eclipse.eavp.geometry.view.model;bundle-version="0.1.0",
org.eclipse.january.geometry.model;bundle-version="1.0.0"
Import-Package: Import-Package:
com.sun.jersey.api.client;version="1.17.0", com.sun.jersey.api.client;version="1.17.0",
org.apache.commons.io, org.apache.commons.io,
...@@ -37,7 +39,6 @@ Import-Package: ...@@ -37,7 +39,6 @@ Import-Package:
org.eclipse.eavp.viz.modeling.properties, org.eclipse.eavp.viz.modeling.properties,
org.eclipse.eavp.viz.service, org.eclipse.eavp.viz.service,
org.eclipse.eavp.viz.service.csv, org.eclipse.eavp.viz.service.csv,
org.eclipse.eavp.viz.service.geometry.shapes,
org.eclipse.eavp.viz.service.geometry.widgets, org.eclipse.eavp.viz.service.geometry.widgets,
org.eclipse.eavp.viz.service.internal, org.eclipse.eavp.viz.service.internal,
org.eclipse.eavp.viz.service.mesh.datastructures, org.eclipse.eavp.viz.service.mesh.datastructures,
......
...@@ -64,6 +64,12 @@ public class ICEGeometryPage extends ICEFormPage ...@@ -64,6 +64,12 @@ public class ICEGeometryPage extends ICEFormPage
*/ */
private IVizService service; private IVizService service;
/**
* The IVizCanvas responsible for drawing the composite this page will
* display.
*/
private IVizCanvas vizCanvas;
/** /**
* <p> * <p>
* This sets the FormEditor to be opened on, as well as the id and title * This sets the FormEditor to be opened on, as well as the id and title
...@@ -144,6 +150,8 @@ public class ICEGeometryPage extends ICEFormPage ...@@ -144,6 +150,8 @@ public class ICEGeometryPage extends ICEFormPage
ShapeTreeView shapeTreeView = (ShapeTreeView) getSite() ShapeTreeView shapeTreeView = (ShapeTreeView) getSite()
.getWorkbenchWindow().getActivePage() .getWorkbenchWindow().getActivePage()
.findView(ShapeTreeView.ID); .findView(ShapeTreeView.ID);
shapeTreeView.setRenderElementHolder(
vizCanvas.getRenderElementHolder(geometryComp.getGeometry()));
shapeTreeView.setGeometry(geometryComp.getGeometry()); shapeTreeView.setGeometry(geometryComp.getGeometry());
return; return;
...@@ -191,14 +199,11 @@ public class ICEGeometryPage extends ICEFormPage ...@@ -191,14 +199,11 @@ public class ICEGeometryPage extends ICEFormPage
// Get Geometry service from factory // Get Geometry service from factory
IVizServiceFactory factory = editor.getVizServiceFactory(); IVizServiceFactory factory = editor.getVizServiceFactory();
service = factory.get("ICE Geometry Editor"); service = factory.get("ICE Geometry Editor");
((ShapeTreeView) getSite().getWorkbenchWindow().getActivePage()
.findView(ShapeTreeView.ID)).setFactory(service.getControllerProviderFactory());
geometryComp.setService(service); geometryComp.setService(service);
// Create and draw geometry canvas // Create and draw geometry canvas
try { try {
IVizCanvas vizCanvas = service vizCanvas = service.createCanvas(geometryComp.getGeometry());
.createCanvas(geometryComp.getGeometry());
vizCanvas.draw(parent); vizCanvas.draw(parent);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -21,6 +21,7 @@ Import-Package: ca.odell.glazedlists, ...@@ -21,6 +21,7 @@ Import-Package: ca.odell.glazedlists,
org.eclipse.emf.ecore.xmi, org.eclipse.emf.ecore.xmi,
org.eclipse.emf.ecore.xmi.impl, org.eclipse.emf.ecore.xmi.impl,
org.eclipse.emf.ecore.xmi.util, org.eclipse.emf.ecore.xmi.util,
org.eclipse.january.geometry,
org.osgi.framework;version="1.6.0", org.osgi.framework;version="1.6.0",
org.osgi.util.tracker;version="1.5.0", org.osgi.util.tracker;version="1.5.0",
org.slf4j;version="1.7.2" org.slf4j;version="1.7.2"
......
...@@ -20,17 +20,17 @@ import static org.junit.Assert.fail; ...@@ -20,17 +20,17 @@ import static org.junit.Assert.fail;
import java.util.List; import java.util.List;
import org.eclipse.eavp.viz.service.geometry.shapes.GeometryMeshProperty;
import org.eclipse.eavp.viz.service.geometry.shapes.OperatorType;
import org.eclipse.eavp.viz.service.geometry.shapes.ShapeType;
import org.eclipse.eavp.viz.modeling.base.BasicController;
import org.eclipse.eavp.viz.modeling.base.BasicView;
import org.eclipse.eavp.viz.modeling.base.IController;
import org.eclipse.eavp.viz.modeling.properties.MeshProperty;
import org.eclipse.eavp.viz.modeling.ShapeController;
import org.eclipse.eavp.viz.modeling.Shape;
import org.eclipse.ice.datastructures.ICEObject.Component; import org.eclipse.ice.datastructures.ICEObject.Component;
import org.eclipse.ice.datastructures.form.GeometryComponent; import org.eclipse.ice.datastructures.form.GeometryComponent;
import org.eclipse.january.geometry.Cube;
import org.eclipse.january.geometry.Cylinder;
import org.eclipse.january.geometry.Geometry;
import org.eclipse.january.geometry.GeometryFactory;
import org.eclipse.january.geometry.INode;
import org.eclipse.january.geometry.Intersection;
import org.eclipse.january.geometry.Operator;
import org.eclipse.january.geometry.Shape;
import org.eclipse.january.geometry.Sphere;
import org.junit.Test; import org.junit.Test;
/** /**
...@@ -53,45 +53,40 @@ public class GeometryComponentTester { ...@@ -53,45 +53,40 @@ public class GeometryComponentTester {
public void checkAddShapes() { public void checkAddShapes() {
// Create a shape // Create a shape
Shape geometryModel = new Shape(); Geometry geometryShape = GeometryFactory.eINSTANCE.createGeometry();
geometryModel.setProperty(MeshProperty.TYPE,
ShapeType.Sphere.toString());
BasicView geometryView = new BasicView();
ShapeController geometryShape = new ShapeController(geometryModel,
geometryView);
// Instantiate a GeometryComponent // Instantiate a GeometryComponent
GeometryComponent geometry = new GeometryComponent(); GeometryComponent geometry = new GeometryComponent();
geometry.setGeometry(geometryShape); geometry.setGeometry(geometryShape);
// Add a PrimitiveShape // Add a PrimitiveShape
ShapeController sphere = (ShapeController) geometryShape.clone(); Sphere sphere = GeometryFactory.eINSTANCE.createSphere();
geometry.getGeometry().addEntity(sphere); geometry.getGeometry().addNode(sphere);
assertEquals(1, geometry.getGeometry().getEntities().size()); assertEquals(1, geometry.getGeometry().getNodes().size());
assertEquals(sphere, geometry.getGeometry().getEntities().get(0)); assertEquals(sphere, geometry.getGeometry().getNodes().get(0));
// Add a ComplexShape // Add a ComplexShape
ShapeController complex = (ShapeController) geometryShape.clone(); Operator complex = GeometryFactory.eINSTANCE.createOperator();
geometry.getGeometry().addEntity(complex); geometry.getGeometry().addNode(complex);
assertEquals(2, geometry.getGeometry().getEntities().size()); assertEquals(2, geometry.getGeometry().getNodes().size());
assertEquals(complex, geometry.getGeometry().getEntities().get(1)); assertEquals(complex, geometry.getGeometry().getNodes().get(1));
// Try adding null // Try adding null
geometry.getGeometry().addEntity(null); geometry.getGeometry().addNode(null);
assertEquals(2, geometry.getGeometry().getEntities().size()); assertEquals(2, geometry.getGeometry().getNodes().size());
// Add a shape with an unknown concrete type // Add a shape with an unknown concrete type
ShapeController unknownShape = (ShapeController) geometryShape.clone(); Shape unknownShape = GeometryFactory.eINSTANCE.createShape();
geometry.getGeometry().addEntity(unknownShape); geometry.getGeometry().addNode(unknownShape);
assertEquals(3, geometry.getGeometry().getEntities().size()); assertEquals(3, geometry.getGeometry().getNodes().size());
assertEquals(unknownShape, geometry.getGeometry().getEntities().get(2)); assertEquals(unknownShape, geometry.getGeometry().getNodes().get(2));
// Remove the second shape // Remove the second shape
geometry.getGeometry().removeEntity(complex); geometry.getGeometry().removeNode(complex);
assertEquals(2, geometry.getGeometry().getEntities().size()); assertEquals(2, geometry.getGeometry().getNodes().size());
// Steal the list from the GeometryComponent // Steal the list from the GeometryComponent
List<IController> shapes = geometry.getGeometry().getEntities(); List<INode> shapes = geometry.getGeometry().getNodes();
assertEquals(2, shapes.size()); assertEquals(2, shapes.size());
// Remove a shape from the stolen list // Remove a shape from the stolen list
...@@ -147,12 +142,7 @@ public class GeometryComponentTester { ...@@ -147,12 +142,7 @@ public class GeometryComponentTester {
public void checkNotifications() { public void checkNotifications() {
// Create a shape // Create a shape
Shape geometryModel = new Shape(); Geometry geometryShape = GeometryFactory.eINSTANCE.createGeometry();
geometryModel.setProperty(MeshProperty.TYPE,
ShapeType.Sphere.toString());
BasicView geometryView = new BasicView();
ShapeController geometryShape = new ShapeController(geometryModel,
geometryView);
// Create a new listener and add it to a GeometryComponent // Create a new listener and add it to a GeometryComponent
GeometryComponent geometry = new GeometryComponent(); GeometryComponent geometry = new GeometryComponent();
...@@ -161,8 +151,7 @@ public class GeometryComponentTester { ...@@ -161,8 +151,7 @@ public class GeometryComponentTester {
geometry.register(listener); geometry.register(listener);
// Modify geometryComponent's shapes list // Modify geometryComponent's shapes list
geometry.getGeometry() geometry.getGeometry().addNode(GeometryFactory.eINSTANCE.createShape());
.addEntity((BasicController) geometryShape.clone());
// Check that the listener was notified and reset the listener // Check that the listener was notified and reset the listener
assertTrue(listener.wasNotified()); assertTrue(listener.wasNotified());
...@@ -257,12 +246,7 @@ public class GeometryComponentTester { ...@@ -257,12 +246,7 @@ public class GeometryComponentTester {
@Test @Test
public void checkEquality() { public void checkEquality() {
Shape geometryModel = new Shape(); Geometry geometryShape = GeometryFactory.eINSTANCE.createGeometry();
geometryModel.setProperty(MeshProperty.TYPE,
ShapeType.Sphere.toString());
BasicView geometryView = new BasicView();
ShapeController geometryShape = new ShapeController(geometryModel,
geometryView);
// Create GeometryComponent to test // Create GeometryComponent to test
GeometryComponent component = new GeometryComponent(); GeometryComponent component = new GeometryComponent();
...@@ -270,23 +254,20 @@ public class GeometryComponentTester { ...@@ -270,23 +254,20 @@ public class GeometryComponentTester {
GeometryComponent unEqualComponent = new GeometryComponent(); GeometryComponent unEqualComponent = new GeometryComponent();
GeometryComponent transitiveComponent = new GeometryComponent(); GeometryComponent transitiveComponent = new GeometryComponent();
component.setGeometry(geometryShape); component.setGeometry(geometryShape);
equalComponent.setGeometry((ShapeController) geometryShape.clone()); equalComponent.setGeometry((Geometry) geometryShape.clone());
unEqualComponent.setGeometry((ShapeController) geometryShape.clone()); unEqualComponent.setGeometry((Geometry) geometryShape.clone());
transitiveComponent transitiveComponent.setGeometry((Geometry) geometryShape.clone());
.setGeometry((ShapeController) geometryShape.clone());
// Change values // Change values
ShapeController shape = (ShapeController) geometryShape.clone(); Cylinder shape = GeometryFactory.eINSTANCE.createCylinder();
shape.setProperty(MeshProperty.TYPE, ShapeType.Cylinder.toString()); Intersection weirdShape = GeometryFactory.eINSTANCE
ShapeController weirdShape = (ShapeController) geometryShape.clone(); .createIntersection();
shape.setProperty(GeometryMeshProperty.OPERATOR,
OperatorType.Intersection.toString());
component.getGeometry().addEntity(shape); component.getGeometry().addNode(shape);
equalComponent.getGeometry().addEntity(shape); equalComponent.getGeometry().addNode(shape);
transitiveComponent.getGeometry().addEntity(shape); transitiveComponent.getGeometry().addNode(shape);
unEqualComponent.getGeometry().addEntity(weirdShape); unEqualComponent.getGeometry().addNode(weirdShape);
// Set ICEObject data // Set ICEObject data
component.setId(1); component.setId(1);
...@@ -354,20 +335,15 @@ public class GeometryComponentTester { ...@@ -354,20 +335,15 @@ public class GeometryComponentTester {
public void checkCreation() { public void checkCreation() {
// Create a shape // Create a shape
Shape geometryModel = new Shape(); Geometry geometryShape = GeometryFactory.eINSTANCE.createGeometry();
geometryModel.setProperty(MeshProperty.TYPE,
ShapeType.Sphere.toString());
BasicView geometryView = new BasicView();
ShapeController geometryShape = new ShapeController(geometryModel,
geometryView);
// Create a new GeometryComponent // Create a new GeometryComponent
GeometryComponent geometry = new GeometryComponent(); GeometryComponent geometry = new GeometryComponent();
geometry.setGeometry(geometryShape); geometry.setGeometry(geometryShape);
// Check that the shapes list exists but is empty // Check that the shapes list exists but is empty
assertNotNull(geometry.getGeometry().getEntities()); assertNotNull(geometry.getGeometry().getNodes());
assertTrue(geometry.getGeometry().getEntities().isEmpty()); assertTrue(geometry.getGeometry().getNodes().isEmpty());
} }
...@@ -382,12 +358,7 @@ public class GeometryComponentTester { ...@@ -382,12 +358,7 @@ public class GeometryComponentTester {
public void checkCopying() { public void checkCopying() {
// Create a shape // Create a shape
Shape geometryModel = new Shape(); Geometry geometryShape = GeometryFactory.eINSTANCE.createGeometry();
geometryModel.setProperty(MeshProperty.TYPE,
ShapeType.Sphere.toString());
BasicView geometryView = new BasicView();
ShapeController geometryShape = new ShapeController(geometryModel,
geometryView);
GeometryComponent geometry = new GeometryComponent(); GeometryComponent geometry = new GeometryComponent();
GeometryComponent cloneGeometry; GeometryComponent cloneGeometry;
...@@ -400,19 +371,12 @@ public class GeometryComponentTester { ...@@ -400,19 +371,12 @@ public class GeometryComponentTester {
geometry.setName("Geometry name"); geometry.setName("Geometry name");
// Set up GeometryComponent-specific stuff // Set up GeometryComponent-specific stuff
Shape sphereModel = new Shape(); Sphere sphere1 = GeometryFactory.eINSTANCE.createSphere();
sphereModel.setProperty(MeshProperty.TYPE, ShapeType.Sphere.toString());
BasicView sphereView = new BasicView(); Cube cube1 = GeometryFactory.eINSTANCE.createCube();
ShapeController sphere1 = new ShapeController(sphereModel, sphereView);