1 /*******************************************************************************
\r
2 * Copyright (c) 2007- VTT Technical Research Centre of Finland.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * which accompanies this distribution, and is available at
\r
6 * http://www.eclipse.org/legal/epl-v10.html
\r
9 * VTT Technical Research Centre of Finland - initial API and implementation
\r
10 *******************************************************************************/
\r
11 package org.simantics.proconf.g3d.shapeeditor.views;
\r
14 import java.util.ArrayList;
\r
15 import java.util.Collection;
\r
16 import java.util.List;
\r
18 import org.eclipse.jface.dialogs.InputDialog;
\r
19 import org.eclipse.jface.dialogs.MessageDialog;
\r
20 import org.eclipse.swt.SWT;
\r
21 import org.eclipse.swt.events.SelectionAdapter;
\r
22 import org.eclipse.swt.events.SelectionEvent;
\r
23 import org.eclipse.swt.layout.FillLayout;
\r
24 import org.eclipse.swt.layout.GridData;
\r
25 import org.eclipse.swt.widgets.Button;
\r
26 import org.eclipse.swt.widgets.Composite;
\r
27 import org.eclipse.swt.widgets.Label;
\r
28 import org.eclipse.swt.widgets.Text;
\r
29 import org.eclipse.swt.widgets.Tree;
\r
30 import org.eclipse.ui.forms.IFormColors;
\r
31 import org.simantics.proconf.g3d.csg.stubs.CSGModel;
\r
32 import org.simantics.db.Graph;
\r
33 import org.simantics.db.GraphRequestAdapter;
\r
34 import org.simantics.db.GraphRequestStatus;
\r
35 import org.simantics.db.Resource;
\r
36 import org.simantics.equation.stubs.SecondOrderScalarPolynomial;
\r
37 import org.simantics.animation.stubs.Animation;
\r
38 import org.simantics.animation.stubs.Interpolator;
\r
39 import org.simantics.layer0.utils.ResourceDebugUtils;
\r
40 import org.simantics.layer0.utils.IEntity;
\r
41 import org.simantics.layer0.utils.EntityFactory;
\r
42 import org.simantics.proconf.browsing.GraphExplorer;
\r
43 import org.simantics.proconf.browsing.GraphExplorerInputFactory;
\r
44 import org.simantics.proconf.g3d.common.StructuredResourceSelection;
\r
45 import org.simantics.proconf.g3d.shapeeditor.ShapeEditorResources;
\r
46 import org.simantics.proconf.g3d.shapeeditor.common.ViewpointGenerator;
\r
47 import org.simantics.proconf.g3d.tools.OESelectionListener;
\r
48 import org.simantics.proconf.g3d.tools.PropertyTree;
\r
49 import org.simantics.proconf.g3d.views.SinglePageResourceEditor;
\r
50 import org.simantics.utils.ui.widgets.TrackedModifyEvent;
\r
51 import org.simantics.utils.ui.widgets.TrackedModifyListener;
\r
52 import org.simantics.utils.ui.widgets.TrackedText;
\r
55 public class ParameterizationEditor extends SinglePageResourceEditor { //implements ISelectionProvider{
\r
57 //ParameterizedCSGModel model;
\r
58 Resource modelResource;
\r
59 private TrackedText modelName = null;
\r
60 StructuredResourceSelection hierarchySelection = new StructuredResourceSelection();
\r
61 StructuredResourceSelection parameterSelection = new StructuredResourceSelection();
\r
62 GraphExplorer parameterExplorer;
\r
63 GraphExplorer hierarchyExplorer;
\r
64 Button deleteParameterButton;
\r
66 PropertyTree propertiesTree;
\r
67 Button generateButton;
\r
69 Button overrideButton;
\r
74 protected String getFormText() {
\r
75 return "Parameterization Editor";
\r
79 // protected void beforeCreateWidgets() {
\r
80 // if (!(getInputResource().isInstanceOf(GlobalIdMap.get(CSGModelingOntologyMapping.PARAMETERIZED_CSG_MODEL))))
\r
81 // throw new RuntimeException("Trying to open resource that is not paramaterized CSG model");
\r
82 // model = ParameterizedCSGModelFactory.create(getInputResource());
\r
88 protected void createWidgets() {
\r
89 createModelPropertiesGroup(newGridSection(2, 2, false, false, "Model Properties",
\r
90 "Basic properties for this viewpoint"));
\r
91 createParametrizationGroup(newGridSection(2, 2, false, false, "Parameterization",
\r
92 "Create parameterization for selected shapes"));
\r
93 //getSite().setSelectionProvider(this);
\r
97 public void reload(Graph graph) {
\r
98 modelResource = getInputResource();
\r
99 parent.getDisplay().asyncExec(new Runnable() {
\r
101 public void run() {
\r
108 public void reload() {
\r
110 hierarchyExplorer.setInput(getSessionContext(),GraphExplorerInputFactory.clone(hierarchyExplorer.getInput())
\r
111 .input(modelResource)
\r
112 .viewpoint(ViewpointGenerator.createObjectStructureViewpoint())
\r
115 parameterExplorer.setInput(getSessionContext(),GraphExplorerInputFactory.clone(parameterExplorer.getInput())
\r
116 .input(modelResource)
\r
117 .viewpoint(ViewpointGenerator.createObjectSizingParameterViewpoint(ShapeEditorResources.g3dResource.HasSizingParameter))
\r
122 private void createParametrizationGroup(Composite parent) {
\r
123 toolkit.paintBordersFor(parent);
\r
124 toolkit.setBorderStyle(SWT.BORDER);
\r
126 overrideButton = toolkit.createButton(parent, "Overwrite previous parameterizations", SWT.CHECK);
\r
127 overrideButton.addSelectionListener(new SelectionAdapter() {
\r
128 public void widgetSelected(SelectionEvent e) {
\r
129 askButton.setEnabled(overrideButton.getSelection());
\r
135 askButton = toolkit.createButton(parent, "Ask before overwriting", SWT.CHECK);
\r
136 askButton.addSelectionListener(new SelectionAdapter() {
\r
137 public void widgetSelected(SelectionEvent e) {
\r
142 askButton.setEnabled(false);
\r
144 generateButton = toolkit.createButton(parent, "Generate linear parameterization", SWT.PUSH);
\r
145 generateButton.addSelectionListener(new SelectionAdapter() {
\r
146 public void widgetSelected(SelectionEvent e) {
\r
147 generateMappings();
\r
151 generateButton.setEnabled(false);
\r
156 private CSGModel getModel(Graph graph) {
\r
157 return new CSGModel(graph, modelResource);
\r
160 private void createModelPropertiesGroup(Composite p) {
\r
162 toolkit.paintBordersFor(parent);
\r
163 toolkit.setBorderStyle(SWT.BORDER);
\r
165 GridData gridData1 = new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1);
\r
166 GridData gridData2 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
\r
169 Label l1 = toolkit.createLabel(parent, "Name:");
\r
170 l1.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
\r
171 Text text = toolkit.createText(parent, "TODO: Insert model's name here", SWT.SINGLE);
\r
172 GridData textLayout = new GridData(GridData.FILL, GridData.FILL, true, true);
\r
173 text.setLayoutData(textLayout);
\r
174 modelName = new TrackedText(text);
\r
175 modelName.addModifyListener(new TrackedModifyListener(){
\r
177 public void modifyText(TrackedModifyEvent e) {
\r
178 final String name = e.getText();
\r
179 getSession().asyncWrite(new GraphRequestAdapter() {
\r
181 public GraphRequestStatus perform(Graph g) throws Exception {
\r
182 getModel(g).setName(name);
\r
183 return GraphRequestStatus.transactionComplete();
\r
189 l1.setLayoutData(gridData1);
\r
190 text.setLayoutData(gridData2);
\r
194 Label parameterLabel = toolkit.createLabel(parent, "Parameters:");
\r
195 parameterLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
\r
196 parameterLabel.setLayoutData(gridData1);
\r
198 parameterExplorer = new GraphExplorer(parent, SWT.SINGLE); //new OntologyExplorer("ParameterExplorer", this, getInput("ParameterExplorer", model.getId()));
\r
199 parameterExplorer.getViewer().addPostSelectionChangedListener(new OESelectionListener() {
\r
201 protected void resourceSelectionUpdated(StructuredResourceSelection sel) {
\r
202 parameterSelection = sel;
\r
203 if (parameterSelection.size() == 0) {
\r
204 deleteParameterButton.setEnabled(false);
\r
205 clearButton.setEnabled(false);
\r
207 deleteParameterButton.setEnabled(true);
\r
208 clearButton.setEnabled(true);
\r
210 updateGenerateButtonStatus();
\r
214 Tree oe = parameterExplorer.getTree();
\r
215 toolkit.adapt(oe, true, true);
\r
216 GridData gd3 = new GridData(GridData.FILL, GridData.FILL, true, true,1,1);
\r
217 gd3.heightHint = 50;
\r
218 oe.setLayoutData(gd3);
\r
219 // parameterExplorer.init(getLastMemento(), ViewpointUtils.getModelledHandler(parameterExplorer.getGraph(), Builtins.DefaultViewpointId), null, ViewLabelProviderDecorationSettings.DEFAULT, new MenuAboutToShowAction(), new NullAdditionAction(), false);
\r
220 // parameterScheme = new ParameterSelectionScheme(parameterExplorer);
\r
221 // parameterExplorer.setSelectionScheme(parameterScheme);
\r
223 // Buttons to add and remove parameters
\r
224 toolkit.createLabel(parent, "");
\r
225 Composite buttons = toolkit.createComposite(parent);
\r
227 buttons.setLayout(new FillLayout(SWT.HORIZONTAL));
\r
228 Button newParameterButton = toolkit.createButton(buttons, "New Parameter", SWT.PUSH);
\r
229 newParameterButton.addSelectionListener(new SelectionAdapter() {
\r
230 public void widgetSelected(SelectionEvent e) {
\r
231 InputDialog dialog = new InputDialog(ParameterizationEditor.this.getSite().getShell(),"New Parameter","Enter parameter's name","new parameter",null);
\r
232 if (dialog.open() == InputDialog.CANCEL)
\r
234 final String name = dialog.getValue();
\r
235 if (name.length() < 1)
\r
236 return; // TODO : show error
\r
238 getSession().asyncWrite(new GraphRequestAdapter() {
\r
239 public GraphRequestStatus perform(Graph g) throws Exception {
\r
240 //fi.vtt.simantics.layer0.stubs.Double parameter = DoubleFactory.createDefault(g);
\r
241 //getModel(g).addStatement(ShapeEditorResources.g3dResource.HasSizingParameter, parameter);
\r
242 //parameter.setValue(new double[]{1.0});
\r
243 //parameter.setName(name);
\r
244 Resource parameter = getModel(g).addRelatedScalarDouble(ShapeEditorResources.g3dResource.HasSizingParameter, 1.0).getResource();
\r
245 IEntity thing = EntityFactory.create(g,parameter);
\r
246 thing.setName(name);
\r
247 return GraphRequestStatus.transactionComplete();
\r
254 deleteParameterButton = toolkit.createButton(buttons, "Delete Parameter", SWT.PUSH);
\r
255 deleteParameterButton.addSelectionListener(new SelectionAdapter() {
\r
256 public void widgetSelected(SelectionEvent e) {
\r
257 //StructuredResourceSelection s = (StructuredResourceSelection)parameterScheme.getSelection();
\r
258 final StructuredResourceSelection s = parameterSelection;
\r
261 // we'll have to start write transaction, since we may have to change the graph
\r
262 getSession().asyncWrite(new GraphRequestAdapter() {
\r
264 IEntity selectedParameter;
\r
265 public GraphRequestStatus perform(Graph g) throws Exception {
\r
266 selectedParameter = EntityFactory.create(g,s.getSelectionList().get(0));
\r
268 Collection<IEntity> parameters = selectedParameter.getRelatedObjects(ShapeEditorResources.g3dResource.HasSizingParameter);
\r
269 if (parameters.size() > 0) {
\r
270 final MessageDialog dialog = new MessageDialog(ParameterizationEditor.this.getSite().getShell(),"Deleting a parameter",null,"Parameter is in use, doe you wan't to remove it?",MessageDialog.QUESTION,new String[]{"OK","Cancel"},1);
\r
271 parent.getDisplay().syncExec(new Runnable() {
\r
273 public void run() {
\r
274 proceed = (dialog.open() != 1);
\r
278 getModel(g).removeStatement(ShapeEditorResources.g3dResource.HasSizingParameter,selectedParameter);
\r
282 return GraphRequestStatus.transactionComplete();
\r
287 deleteParameterButton.setEnabled(false);
\r
289 clearButton = toolkit.createButton(buttons, "Clear Parameter", SWT.PUSH);
\r
290 clearButton.addSelectionListener(new SelectionAdapter() {
\r
291 public void widgetSelected(SelectionEvent e) {
\r
292 final StructuredResourceSelection s = parameterSelection;
\r
295 getSession().asyncWrite(new GraphRequestAdapter() {
\r
298 public GraphRequestStatus perform(Graph g) throws Exception {
\r
299 IEntity selectedParameter = EntityFactory.create(g,s.getSelectionList().get(0));
\r
300 Collection<IEntity> equations = selectedParameter.getRelatedObjects(ShapeEditorResources.equationResource.HasTarget);
\r
301 final String name = selectedParameter.getName();
\r
302 if (equations.size() > 0) {
\r
303 final MessageDialog dialog = new MessageDialog(ParameterizationEditor.this.getSite().getShell(),"Clearing a parameter",null,"Do you wan't to clear parameterization for "+ name + " ?\nIt has " + equations.size() + " mappings.",MessageDialog.QUESTION,new String[]{"OK","Cancel"},1);
\r
304 parent.getDisplay().syncExec(new Runnable() {
\r
305 public void run() {
\r
306 proceed = (dialog.open() != 1);
\r
310 for (IEntity eq : equations) {
\r
311 eq.removeRelatedStatements(ShapeEditorResources.equationResource.HasSource);
\r
312 eq.removeRelatedStatements(ShapeEditorResources.equationResource.HasTarget);
\r
314 return GraphRequestStatus.transactionComplete();
\r
317 return GraphRequestStatus.transactionCancel();
\r
324 clearButton.setEnabled(false);
\r
326 Label hierarchyLabel = toolkit.createLabel(parent, "Model Hierarchy:");
\r
327 hierarchyLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
\r
328 hierarchyLabel.setLayoutData(gridData1);
\r
330 hierarchyExplorer = new GraphExplorer(parent,SWT.MULTI); //new OntologyExplorer("HierarchyExplorer", this, getInput("HierarchyExplorer", model.getId()));
\r
331 Tree oeh = hierarchyExplorer.getTree();//hierarchyExplorer.getControl(parent, 1, OntologyExplorer.OntologyTree, SWT.MULTI);
\r
332 toolkit.adapt(oeh, true, true);
\r
334 GridData gd4 = new GridData(GridData.FILL, GridData.FILL, true, true,1,1);
\r
335 gd4.heightHint = 200;
\r
336 oeh.setLayoutData(gd4);
\r
337 hierarchyExplorer.getViewer().addPostSelectionChangedListener(new OESelectionListener() {
\r
339 protected void resourceSelectionUpdated(StructuredResourceSelection sel) {
\r
340 hierarchySelection = sel;
\r
341 updatePropertiesTable();
\r
342 updateGenerateButtonStatus();
\r
345 private void updatePropertiesTable() {
\r
346 propertiesTree.setProperties(hierarchySelection);
\r
351 //hierarchyExplorer.init(getLastMemento(), ViewpointUtils.getModelledHandler(hierarchyExplorer.getGraph(), CSGModelingOntologyMapping.CSG_MODEL_HIERARCHY_VIEWPOINT), null, ViewLabelProviderDecorationSettings.DEFAULT, new MenuAboutToShowAction(), new NullAdditionAction(), false);
\r
352 // hierarchyScheme = new HierarchySelectionScheme(hierarchyExplorer);
\r
353 // hierarchyExplorer.setSelectionScheme(hierarchyScheme);
\r
354 // hierarchyExplorer.hookPageSelection(this);
\r
355 Label propertiesLabel = toolkit.createLabel(parent, "Available properties:");
\r
356 propertiesLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
\r
357 propertiesLabel.setLayoutData(gridData1);
\r
359 //propertiesTable = toolkit.createTable(parent, SWT.MULTI);
\r
360 Tree tree = toolkit.createTree(parent, SWT.MULTI);
\r
361 propertiesTree = new PropertyTree(tree,getSession());
\r
363 GridData gd5 = new GridData(GridData.FILL, GridData.FILL, true, true,1,1);
\r
364 gd5.heightHint = 200;
\r
365 //propertiesTable.setLayoutData(gd5);
\r
366 tree.setLayoutData(gd5);
\r
367 tree.addSelectionListener(new SelectionAdapter() {
\r
370 public void widgetSelected(SelectionEvent e) {
\r
371 updateGenerateButtonStatus();
\r
379 // private class ParameterSelectionScheme extends AbstractSelectionScheme {
\r
381 // public ParameterSelectionScheme(OntologyExplorer explorer) {
\r
382 // super(explorer);
\r
386 // protected Resource getResourceForSelection(TreeNode selected) {
\r
387 // Resource resource = explorer.getCoreResource(selected);
\r
388 // System.out.println("Parameter Tree Selection : " + resource.getId());
\r
389 // return resource;
\r
393 // protected void resourceSelectionUpdated() {
\r
394 // if (selection.size() == 0) {
\r
395 // deleteParameterButton.setEnabled(false);
\r
396 // clearButton.setEnabled(false);
\r
398 // deleteParameterButton.setEnabled(true);
\r
399 // clearButton.setEnabled(true);
\r
401 // updateGenerateButtonStatus();
\r
405 // private class HierarchySelectionScheme extends AbstractSelectionScheme {
\r
407 // public HierarchySelectionScheme(OntologyExplorer explorer) {
\r
408 // super(explorer);
\r
412 // protected Resource getResourceForSelection(TreeNode selected) {
\r
413 // Resource resource = explorer.getCoreResource(selected);
\r
414 // System.out.println("Hierarchy Tree Selection : " + resource.getId());
\r
415 // return resource;
\r
419 // protected void resourceSelectionUpdated() {
\r
420 // updatePropertiesTable();
\r
421 // updateGenerateButtonStatus();
\r
424 // private void updatePropertiesTable() {
\r
425 // propertiesTree.setProperties(selection);
\r
431 // private boolean contains(Resource list[], Resource value) {
\r
432 // for (int i = 0; i < list.length; i++) {
\r
433 // if (list[i].equals(value))
\r
439 private void updateGenerateButtonStatus() {
\r
440 if (parameterSelection.size() == 0) {
\r
441 generateButton.setEnabled(false);
\r
444 if (hierarchySelection.size() == 0) {
\r
445 generateButton.setEnabled(false);
\r
448 if (propertiesTree.getTree().getSelection().length == 0) {
\r
449 generateButton.setEnabled(false);
\r
452 generateButton.setEnabled(true);
\r
455 List<Resource> res;
\r
457 private void generateMappings() {
\r
458 final StructuredResourceSelection selectedShapes = hierarchySelection;
\r
459 final StructuredResourceSelection selectedParameter = parameterSelection;
\r
461 final boolean override = overrideButton.getSelection();
\r
462 final boolean ask = askButton.getSelection();
\r
463 //TreeItem[] selectedProperties = propertiesTree.getTree().getSelection();
\r
465 assert (selectedParameter.size() == 1);
\r
466 assert (selectedShapes.size() > 0);
\r
467 //assert(selectedProperties.length > 0);
\r
468 getSession().asyncWrite(new GraphRequestAdapter() {
\r
470 public GraphRequestStatus perform(Graph g) throws Exception {
\r
471 //fi.vtt.simantics.layer0.stubs.Double parameter = DoubleFactory.create(g,selectedParameter.getSelectionList().get(0));
\r
472 IEntity parameter = EntityFactory.create(g,selectedParameter.getSelectionList().get(0));
\r
473 Collection<IEntity> prop = parameter.getRelatedObjects(ShapeEditorResources.g3dResource.HasDefaultDoubleValue);
\r
474 //fi.vtt.simantics.layer0.stubs.Double defaultValue;
\r
475 double value = g.getScalarDouble(parameter.getResource());
\r
476 if (prop.size() == 0) {
\r
477 //defaultValue = DoubleFactory.createDefault(g);
\r
478 //parameter.addStatement(ShapeEditorResources.g3dResource.HasDefaultDoubleValue, defaultValue);
\r
479 parameter.addRelatedScalarDouble(ShapeEditorResources.g3dResource.HasDefaultDoubleValue, value);
\r
481 //defaultValue = DoubleFactory.create(prop.iterator().next());
\r
482 g.setScalarDouble(prop.iterator().next().getResource(),value);
\r
484 //defaultValue.setValue(parameter.getValue());
\r
485 final Graph graph = g;
\r
486 parent.getDisplay().syncExec(new Runnable() {
\r
487 public void run() {
\r
488 res = propertiesTree.findLeafPropertyInstances(graph, selectedShapes.getSelectionList());
\r
493 double refValue = parameter.toProperty().getScalarDouble();
\r
494 ArrayList<Resource> mappedProperties = new ArrayList<Resource>();
\r
496 for (Resource r : res) {
\r
497 IEntity propertyThing = EntityFactory.create(g,r);
\r
498 assert (propertyThing.isInstanceOf(g.getBuiltins().Double));
\r
499 final String name = ResourceDebugUtils.getReadableNameForEntity(propertyThing);
\r
500 double rb = propertyThing.toProperty().getScalarDouble();
\r
501 System.out.println("Mapping to " + name + " " + rb);
\r
502 Collection<IEntity> equations = propertyThing.getRelatedObjects(ShapeEditorResources.equationResource.HasSource);
\r
503 if (equations.size() != 0) {
\r
504 mappedProperties.add(propertyThing.getResource());
\r
506 System.out.println("Override");
\r
507 boolean over = true;
\r
509 IEntity t = propertyThing;
\r
510 while (t.isInstanceOf(g.getBuiltins().Property)) {
\r
511 Collection<IEntity> ts = t.getRelatedObjects(g.getBuiltins().PropertyOf);
\r
512 // FIXME : traverse all possible routes
\r
513 t = ts.iterator().next();
\r
515 //StructuredResourceSelection selection = new StructuredResourceSelection(t.getResource());
\r
516 // TODO : do the selection!
\r
517 //hierarchyScheme.setSelection(selection);
\r
518 //fireSelectionChanged();
\r
519 MessageDialog dialog = new MessageDialog(ParameterizationEditor.this.getSite().getShell(),
\r
520 "Override mapping",
\r
522 "Override mapping to property of highlighted shape?",
\r
523 MessageDialog.QUESTION, new String[] {
\r
524 "Yes","No", "Cancel" }, 0);
\r
525 int i = dialog.open();
\r
527 return GraphRequestStatus.transactionCancel();
\r
534 if (equations.size() != 1) {
\r
535 throw new RuntimeException("One property can have only one euquation as source function.");
\r
537 IEntity equation = equations.iterator().next();
\r
538 if (!equation.isInstanceOf(ShapeEditorResources.equationResource.SecondOrderScalarPolynomial)) {
\r
539 throw new RuntimeException("Only Second order scalar polynomials are supported");
\r
541 SecondOrderScalarPolynomial s = new SecondOrderScalarPolynomial(equation);
\r
542 s.setA(new double[]{0.0});
\r
543 s.setB(new double[]{rb / refValue});
\r
544 s.setC(new double[]{0.0});
\r
547 } else { //override
\r
549 SecondOrderScalarPolynomial s = SecondOrderScalarPolynomial.createDefault(g);
\r
550 s.setA(new double[]{0.0});
\r
551 s.setB(new double[]{rb / refValue});
\r
552 s.setC(new double[]{0.0});
\r
554 // FIXME : these relations have been instantiated, but addStatements won't delete them so we have to delete them manually.
\r
555 s.removeRelatedStatements(ShapeEditorResources.equationResource.HasTarget);
\r
556 s.removeRelatedStatements(ShapeEditorResources.equationResource.HasSource);
\r
558 parameter.addStatement(ShapeEditorResources.equationResource.HasTarget, s);
\r
560 s.addStatement(ShapeEditorResources.equationResource.HasTarget, propertyThing);
\r
561 mappedProperties.add(propertyThing.getResource());
\r
565 CSGModel model = getModel(g);
\r
566 Collection<Animation> animations = model.getAnimation();
\r
567 for (Animation animation : animations) {
\r
568 Collection<Interpolator> interpolators = animation.getInterpolator();
\r
569 for (Interpolator interpolator : interpolators) {
\r
570 IEntity target = interpolator.getTarget();
\r
571 for (Resource property : mappedProperties) {
\r
572 if (target.getResource().equals(property)) {
\r
573 ShapeEditorResources.curveBuilder.createDefault(interpolator);
\r
578 return GraphRequestStatus.transactionComplete();
\r