From d48fecc10fd79ea6dae6455826dc42982508dd9c Mon Sep 17 00:00:00 2001 From: lempinen Date: Wed, 16 Feb 2011 13:59:11 +0000 Subject: [PATCH] Better support for enumerations: Enumerations in module can be created and replaced git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@19792 ac1ea38d-2e2b-0410-8846-a27921b304fc --- org.simantics.sysdyn.ontology/graph.tg | Bin 49527 -> 50407 bytes .../graph/Sysdyn.pgraph | 30 ++- .../org/simantics/sysdyn/SysdynResource.java | 27 +++ org.simantics.sysdyn.ui/plugin.xml | 57 +++++- .../sysdyn/ui/browser/BrowserSelection.java | 10 +- .../sysdyn/ui/browser/SysdynBrowser.java | 2 +- .../ui/browser/contributions/ModuleType.java | 4 + .../ui/browser/nodes/EnumerationNode.java | 17 +- .../elements2/connections/FlowEdgeClass.java | 2 +- .../handlers/NewEnumerationNodeHandler.java | 18 +- .../sysdyn/ui/properties/ArrayIndexesTab.java | 6 +- .../sysdyn/ui/properties/EnumerationTab.java | 70 ++++--- .../sysdyn/ui/properties/ModuleTab.java | 44 ++++- .../ResourceSelectionProcessor.java | 19 +- .../ui/properties/widgets/ColumnKeys.java | 43 +++++ .../widgets/arrays/ComboBoxModifier.java | 136 ++++++++++++++ .../widgets/arrays/EnumerationLabeler.java | 13 +- .../ui/properties/widgets/arrays/Keys.java | 25 --- .../widgets/arrays/RedeclarationNode.java | 172 ++++++++++++++++++ .../arrays/ReplaceableEnumerations.java | 53 ++++++ .../ReplaceableEnumerationsLabeler.java | 43 +++++ .../arrays/ReplaceableIndexesWidget.java | 117 ++++++++++++ .../SysdynDatasetSelectionListener.java | 1 - org.simantics.sysdyn/META-INF/MANIFEST.MF | 7 +- .../sysdyn/modelica/ModelicaWriter.java | 4 +- .../sysdyn/representation/Enumeration.java | 33 +++- .../sysdyn/representation/Input.java | 46 ++++- .../sysdyn/representation/Module.java | 48 +++++ .../sysdyn/representation/Redeclaration.java | 39 ++++ .../sysdyn/representation/SysdynSchema.java | 1 + 30 files changed, 1000 insertions(+), 87 deletions(-) create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ColumnKeys.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ComboBoxModifier.java delete mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/Keys.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/RedeclarationNode.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableEnumerations.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableEnumerationsLabeler.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableIndexesWidget.java create mode 100644 org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Redeclaration.java diff --git a/org.simantics.sysdyn.ontology/graph.tg b/org.simantics.sysdyn.ontology/graph.tg index 5c8dceda7e934ccaf1577f4a1043883b8cd54274..b2891c38be54e85b220531ec00ef71f718216505 100644 GIT binary patch literal 50407 zcmc(|d7R!=dH4TaGD#*2SqS^$$PTh5veczcAS46{U^0M;3O6%%!oXziVU{ci7!X`Q zMGGm4TU4-$vIqpVb)i}owHT@GQ|pR~3oQa|AKTjY;rYEk*E!d@&pkwc)4!g1y-vR8 zbFS-b*Y&xs@A-c3dnPlA_%m(pXmhMJG1}ier8O};UKPcx!GY%R_~7_pb8O}eSF2{a znluKQYX^tXXbsQyVWzEawZ_}((}o-Co6`|a8{a%)m6@k*8gGscH-_3u(?=SkOvQ*v zedbvs8a8Nk&0IO$?$cGw8XIqnH`mi;Y$lzG=^GkD6Tf$rT_&Abh85PIFN*T!xLPh> zwf323kG3vp_K%OzQd-M`jT<)}JvO+$feHG@j&6;vLo{8Ya+fuO>nDa9THjH}9epfK zd#QbT*Q(Y)bBNma49-8TF?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&EvQ0cxH6YLfYH|f1JqHR761SM diff --git a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph index 0193a7a5..04b8db89 100644 --- a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph +++ b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph @@ -128,6 +128,7 @@ SYSDYN.Input - - - - @@ -376,6 +369,14 @@ checkEnabled="true"> + + + + @@ -470,10 +471,13 @@ name="Import..."> + + @@ -577,6 +581,29 @@ + + + + + + + + + + + + + + @@ -637,6 +664,13 @@ preference="2.0"> + + + + @@ -708,6 +742,13 @@ preference="2.0"> + + + + diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/BrowserSelection.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/BrowserSelection.java index 60ab9fef..b891e2ad 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/BrowserSelection.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/BrowserSelection.java @@ -12,12 +12,13 @@ package org.simantics.sysdyn.ui.browser; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.jface.viewers.ISelection; import org.simantics.browsing.ui.NodeContext; import org.simantics.db.Resource; import org.simantics.db.layer0.variable.Variable; import org.simantics.sysdyn.ui.browser.nodes.VariableNode; -public class BrowserSelection implements IAdaptable { +public class BrowserSelection implements IAdaptable, ISelection { private Resource resource; private Resource model; private String URI; @@ -55,5 +56,12 @@ public class BrowserSelection implements IAdaptable { public String getURI() { return this.URI; } + + @Override + public boolean isEmpty() { + if(originalInput == null) + return true; + return false; + } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java index fdd38f71..8edb5a7b 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java @@ -51,7 +51,7 @@ public class SysdynBrowser extends GraphExplorerView { @SuppressWarnings("unchecked") VariableNode vn = (VariableNode) ctx.getAdapter(VariableNode.class); IHintContext context; - if(vn != null) { + if(vn != null && vn.getResource() != null) { context = new AdaptableHintContext(SelectionHints.KEY_MAIN, SelectionHints.KEY_SELECTION_PROPERTY); context.setHint(SelectionHints.KEY_MAIN, new BrowserSelection(objects[i], vn)); context.setHint(SelectionHints.KEY_SELECTION_PROPERTY, vn.getVariable()); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleType.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleType.java index 9a6e1440..ed5a9ead 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleType.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleType.java @@ -24,6 +24,7 @@ import org.simantics.layer0.Layer0; import org.simantics.modeling.ModelingResources; import org.simantics.structural.stubs.StructuralResource2; import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.ui.browser.nodes.EnumerationNode; import org.simantics.sysdyn.ui.browser.nodes.InputNode; import org.simantics.sysdyn.ui.browser.nodes.ModuleNode; import org.simantics.sysdyn.ui.browser.nodes.ModuleTypeNode; @@ -52,6 +53,9 @@ public class ModuleType extends ViewpointContributor { for(Resource r : graph.syncRequest(new ObjectsWithType(conf, l0.ConsistsOf, sr.Module))) { result.add(new ModuleNode(r)); } + for(Resource r : graph.syncRequest(new ObjectsWithType(conf, l0.ConsistsOf, sr.Enumeration))) { + result.add(new EnumerationNode(r)); + } return result; } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/EnumerationNode.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/EnumerationNode.java index a069acbb..1d296b62 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/EnumerationNode.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/EnumerationNode.java @@ -5,9 +5,11 @@ import org.simantics.browsing.ui.common.node.IDeletableNode; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.CancelTransactionException; import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.Layer0; +import org.simantics.sysdyn.SysdynResource; import org.simantics.ui.SimanticsUI; import org.simantics.utils.ui.ExceptionUtils; @@ -24,7 +26,20 @@ public class EnumerationNode extends VariableNode implements IDeletabl @Override public void perform(WriteGraph graph) throws DatabaseException, CancelTransactionException { Layer0 l0 = Layer0.getInstance(graph); - graph.deny(resource, l0.PartOf); + SysdynResource sr = SysdynResource.getInstance(graph); + graph.deny(resource, l0.PartOf); + for(Resource redeclaration : graph.getObjects(resource, sr.ReplacedEnumeration_Inverse)) { + graph.deny(redeclaration, sr.HasRedeclaration_Inverse); + } + + for(Resource redeclaration : graph.getObjects(resource, sr.ReplacingEnumeration_Inverse)) { + graph.deny(redeclaration, sr.HasRedeclaration_Inverse); + } + + for(Resource list : OrderedSetUtils.getOwnerLists(graph, resource, sr.ArrayIndexes)) { + OrderedSetUtils.remove(graph, list, resource); + } + } }); } catch (DatabaseException e) { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/FlowEdgeClass.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/FlowEdgeClass.java index a3e27016..e002cb23 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/FlowEdgeClass.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/connections/FlowEdgeClass.java @@ -202,7 +202,7 @@ public class FlowEdgeClass { .getCenterX() - FlowRouter.OFFSET, bounds .getCenterY() - FlowRouter.OFFSET, FlowRouter.OFFSET * 2, FlowRouter.OFFSET * 2); -// c.allowedDirections = Constants.EAST_FLAG | Constants.WEST_FLAG; + c.allowedDirections = Constants.EAST_FLAG | Constants.WEST_FLAG; } else { c.parentObstacle = ElementUtils .getElementBoundsOnDiagram(connection.node) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewEnumerationNodeHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewEnumerationNodeHandler.java index bbccf0b7..60a45356 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewEnumerationNodeHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewEnumerationNodeHandler.java @@ -12,6 +12,8 @@ import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.modeling.ModelingResources; +import org.simantics.structural.stubs.StructuralResource2; import org.simantics.sysdyn.SysdynResource; import org.simantics.ui.SimanticsUI; import org.simantics.ui.utils.AdaptionUtils; @@ -23,7 +25,7 @@ public class NewEnumerationNodeHandler extends AbstractHandler { ISelection sel = HandlerUtil.getCurrentSelection(event); - final Resource configuration = AdaptionUtils.adaptToSingle(sel, Resource.class); + final Resource resource = AdaptionUtils.adaptToSingle(sel, Resource.class); SimanticsUI.getSession().asyncRequest(new WriteRequest() { @@ -32,6 +34,20 @@ public class NewEnumerationNodeHandler extends AbstractHandler { SysdynResource sr = SysdynResource.getInstance(g); Layer0 l0 = Layer0.getInstance(g); + Resource configuration = null; + if(g.isInstanceOf(resource, sr.Configuration)) { + configuration = resource; + } else if(g.isInheritedFrom(resource, sr.ModuleSymbol)) { + Resource module = g.getPossibleObject(resource,ModelingResources.getInstance(g).SymbolToComponentType); + configuration = g.getPossibleObject(module, StructuralResource2.getInstance(g).IsDefinedBy); + } else { + Resource instanceOf = g.getSingleObject(resource, l0.InstanceOf); + if(g.isInheritedFrom(instanceOf, sr.Module)) { + configuration = g.getPossibleObject(instanceOf, StructuralResource2.getInstance(g).IsDefinedBy); + } else { + return; + } + } Resource enumerationIndexes = OrderedSetUtils.create(g, sr.EnumerationIndexes); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayIndexesTab.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayIndexesTab.java index effe57de..2e61a13a 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayIndexesTab.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayIndexesTab.java @@ -28,7 +28,7 @@ import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.management.ISessionContext; import org.simantics.sysdyn.SysdynResource; -import org.simantics.sysdyn.ui.properties.widgets.arrays.Keys; +import org.simantics.sysdyn.ui.properties.widgets.ColumnKeys; import org.simantics.utils.datastructures.ArrayMap; public class ArrayIndexesTab extends PropertyTabContributorImpl implements Widget{ @@ -54,7 +54,7 @@ public class ArrayIndexesTab extends PropertyTabContributorImpl implements Widge availableEnumerationsExplorer .setBrowseContexts("http://www.simantics.org/Sysdyn-1.0/AvailableVariableIndexes"); - availableEnumerationsExplorer.setColumns(Keys.ENUMERATION_TABLE_COLUMNS); + availableEnumerationsExplorer.setColumns(ColumnKeys.ENUMERATION_TABLE_COLUMNS); availableEnumerationsExplorer.setInputSource(new SingleSelectionInputSource( Resource.class)); @@ -103,7 +103,7 @@ public class ArrayIndexesTab extends PropertyTabContributorImpl implements Widge usedEnumerationsExplorer .setBrowseContexts("http://www.simantics.org/Sysdyn-1.0/UsedVariableIndexes"); - usedEnumerationsExplorer.setColumns(Keys.ENUMERATION_TABLE_COLUMNS); + usedEnumerationsExplorer.setColumns(ColumnKeys.ENUMERATION_TABLE_COLUMNS); usedEnumerationsExplorer.setInputSource(new SingleSelectionInputSource( Resource.class)); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EnumerationTab.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EnumerationTab.java index 8573747f..0b210465 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EnumerationTab.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EnumerationTab.java @@ -4,7 +4,6 @@ import java.util.List; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayoutFactory; -import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.swt.SWT; @@ -36,45 +35,47 @@ import org.simantics.db.common.request.ReadRequest; import org.simantics.db.common.request.WriteRequest; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.db.layer0.variable.Variables; import org.simantics.db.management.ISessionContext; import org.simantics.db.request.Read; import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.simulation.ontology.SimulationResource; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.manager.SysdynModel; import org.simantics.sysdyn.manager.SysdynModelManager; import org.simantics.sysdyn.ui.properties.widgets.arrays.EnumerationIndexNode; +import org.simantics.sysdyn.ui.properties.widgets.arrays.ReplaceableIndexesWidget; import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNamePropertyModifier; import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNameValidator; import org.simantics.ui.SimanticsUI; import org.simantics.ui.utils.AdaptionUtils; import org.simantics.utils.datastructures.ArrayMap; -import org.simantics.utils.ui.ISelectionUtils; -public class EnumerationTab extends PropertyTabContributorImpl { +public class EnumerationTab extends PropertyTabContributorImpl implements Widget { GraphExplorerComposite indexExplorer; Button showAll; - + Variable variable; Table table; @Override public void createControls(Composite body, IWorkbenchSite site, final ISessionContext context, WidgetSupport support) { + support.register(this); + Composite container = new Composite(body, SWT.None); GridDataFactory.fillDefaults().grab(true, true).applyTo(container); - GridLayoutFactory.fillDefaults().margins(3, 3).numColumns(3).applyTo(container); + GridLayoutFactory.fillDefaults().margins(3, 3).numColumns(4).applyTo(container); TrackedText nameText = new TrackedText(container, support, SWT.BORDER); nameText.setTextFactory(new StringPropertyFactory(Builtins.URIs.HasName)); nameText.addModifyListener(new VariableNamePropertyModifier(context, Builtins.URIs.HasName)); nameText.setInputValidator(new VariableNameValidator(support)); - GridDataFactory.fillDefaults().grab(true, false).span(3,1).applyTo(nameText.getWidget()); - - - + GridDataFactory.fillDefaults().grab(true, false).span(4,1).applyTo(nameText.getWidget()); indexExplorer = new GraphExplorerComposite(ArrayMap.keys( "displaySelectors", "displayFilter").values(false, false), site, container, support, SWT.FULL_SELECTION | SWT.BORDER | SWT.MULTI | SWT.CHECK); @@ -97,12 +98,15 @@ public class EnumerationTab extends PropertyTabContributorImpl { SimanticsUI.getSession().asyncRequest(new ReadRequest() { @Override public void run(ReadGraph graph) throws DatabaseException { - Layer0 l0 = Layer0.getInstance(graph); - Resource enumeration = (Resource)indexExplorer.getExplorer().getRoot().getAdapter(Resource.class); - Resource configuration = graph.getSingleObject(enumeration, l0.PartOf); - SysdynModel model = SysdynModelManager.getInstance(graph.getSession()).getModel(graph, configuration); - // update results in graphs - model.resultChanged(); + Resource modelResource = Variables.getModel(graph, variable); + if(modelResource != null) { + Resource configuration = graph.getSingleObject( + modelResource, + SimulationResource.getInstance(graph).HasConfiguration); + SysdynModel model = SysdynModelManager.getInstance(graph.getSession()).getModel(graph, configuration); + // update results in graphs + model.resultChanged(); + } } }); } @@ -112,7 +116,7 @@ public class EnumerationTab extends PropertyTabContributorImpl { indexExplorer.finish(); - GridDataFactory.fillDefaults().grab(true, true).span(3, 1).applyTo( + GridDataFactory.fillDefaults().grab(true, true).span(4, 1).applyTo( indexExplorer); Control c = indexExplorer.getExplorerControl(); @@ -120,17 +124,21 @@ public class EnumerationTab extends PropertyTabContributorImpl { ((Tree) c).setLinesVisible(true); - Button add = new Button(container, support, SWT.None); + final Button add = new Button(container, support, SWT.None); add.setText("Add"); add.addSelectionListener(new addEnumerationIndexListener(support)); - Button remove = new Button(container, support, SWT.None); + final Button remove = new Button(container, support, SWT.None); remove.setText("Remove"); remove.addSelectionListener(new removeEnumerationIndexListener(support)); + ReplaceableIndexesWidget externalIndexes = new ReplaceableIndexesWidget(container, support, SWT.NULL); + GridDataFactory.fillDefaults().applyTo(externalIndexes.getWidget()); + showAll = new Button(container, support, SWT.CHECK); showAll.setText("Show all in charts"); showAll.addSelectionListener(new ShowAllIndexesListener(support)); + } private class addEnumerationIndexListener implements SelectionListener, Widget { @@ -143,7 +151,7 @@ public class EnumerationTab extends PropertyTabContributorImpl { @Override public void setInput(ISessionContext context, Object input) { - final Resource enumeration = ISelectionUtils.filterSingleSelection((ISelection)input, Resource.class); + final Resource enumeration = AdaptionUtils.adaptToSingle(input, Resource.class); try { context.getSession().syncRequest(new ReadRequest() { @@ -197,7 +205,7 @@ public class EnumerationTab extends PropertyTabContributorImpl { @Override public void setInput(ISessionContext context, Object input) { - final Resource enumeration = ISelectionUtils.filterSingleSelection((ISelection)input, Resource.class); + final Resource enumeration = AdaptionUtils.adaptToSingle(input, Resource.class); try { context.getSession().syncRequest(new ReadRequest() { @@ -253,7 +261,7 @@ public class EnumerationTab extends PropertyTabContributorImpl { @Override public void setInput(ISessionContext context, Object input) { - final Resource enumeration = ISelectionUtils.filterSingleSelection((ISelection)input, Resource.class); + final Resource enumeration = AdaptionUtils.adaptToSingle(input, Resource.class); context.getSession().asyncRequest(new Read() { @@ -319,11 +327,16 @@ public class EnumerationTab extends PropertyTabContributorImpl { } } - Resource enumeration = graph.getSingleObject(enumerationIndexes, sr.HasEnumerationIndexes_Inverse); - Resource configuration = graph.getSingleObject(enumeration, Layer0.getInstance(graph).PartOf); - SysdynModel model = SysdynModelManager.getInstance(graph.getSession()).getModel(graph, configuration); - // update results in graphs - model.resultChanged(); + + Resource modelResource = Variables.getModel(graph, variable); + if(modelResource != null) { + Resource configuration = graph.getSingleObject( + modelResource, + SimulationResource.getInstance(graph).HasConfiguration); + SysdynModel model = SysdynModelManager.getInstance(graph.getSession()).getModel(graph, configuration); + // update results in graphs + model.resultChanged(); + } } }); @@ -340,4 +353,9 @@ public class EnumerationTab extends PropertyTabContributorImpl { } } + + @Override + public void setInput(ISessionContext context, Object input) { + variable = AdaptionUtils.adaptToSingle(input, Variable.class); + } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleTab.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleTab.java index 7312ff44..a3bd4b53 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleTab.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleTab.java @@ -15,25 +15,65 @@ import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Tree; import org.eclipse.ui.IWorkbenchSite; import org.simantics.browsing.ui.swt.PropertyTabContributorImpl; +import org.simantics.browsing.ui.swt.SingleSelectionInputSource; +import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite; import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory; import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier; import org.simantics.browsing.ui.swt.widgets.TrackedText; +import org.simantics.browsing.ui.swt.widgets.impl.Widget; import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; import org.simantics.db.Builtins; +import org.simantics.db.Resource; import org.simantics.db.management.ISessionContext; +import org.simantics.sysdyn.ui.properties.widgets.ColumnKeys; +import org.simantics.utils.datastructures.ArrayMap; -public class ModuleTab extends PropertyTabContributorImpl { +public class ModuleTab extends PropertyTabContributorImpl implements Widget { + GraphExplorerComposite enumerationRedeclarationExplorer; + @Override public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) { + support.register(this); + Composite composite = new Composite(body, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(composite); - GridLayoutFactory.fillDefaults().margins(3, 3).numColumns(6).applyTo(composite); + GridLayoutFactory.fillDefaults().margins(3, 3).applyTo(composite); TrackedText nameText = new TrackedText(composite, support, SWT.BORDER); nameText.setTextFactory(new StringPropertyFactory(Builtins.URIs.HasName)); nameText.addModifyListener(new StringPropertyModifier(context, Builtins.URIs.HasName)); GridDataFactory.fillDefaults().grab(true, false).applyTo(nameText.getWidget()); + + Label label = new Label(composite, SWT.NONE); + label.setText("Replaceable enumerations"); + enumerationRedeclarationExplorer = new GraphExplorerComposite(ArrayMap.keys( + "displaySelectors", "displayFilter").values(false, false), site, composite, SWT.FULL_SELECTION | SWT.BORDER | SWT.MULTI); + + enumerationRedeclarationExplorer + .setBrowseContexts("http://www.simantics.org/Sysdyn-1.0/EnumerationReplacement"); + enumerationRedeclarationExplorer.setColumns(ColumnKeys.ENUMERATION_REDECLARATION_COLUMNS); + enumerationRedeclarationExplorer.setInputSource(new SingleSelectionInputSource( + Resource.class)); + + enumerationRedeclarationExplorer.finish(); + + GridDataFactory.fillDefaults().grab(true, true).applyTo( + enumerationRedeclarationExplorer); + + Control c = enumerationRedeclarationExplorer.getExplorerControl(); + if (c instanceof Tree) + ((Tree) c).setLinesVisible(true); + } + + + @Override + public void setInput(ISessionContext context, Object input) { + enumerationRedeclarationExplorer.setInput(context, input); + } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java index 1e07c5b1..b46e3d63 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java @@ -16,6 +16,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +import org.eclipse.jface.viewers.ISelection; import org.simantics.browsing.ui.SelectionProcessor; import org.simantics.browsing.ui.swt.ComparableTabContributor; import org.simantics.db.ReadGraph; @@ -68,6 +69,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor implements CustomModifier { + + private final Enumeration enumeration; + private final EnumeratedValue value; + private final List values; + private final Session session; + private Combo combo; + int select; + + public ComboBoxModifier(Session session, Enumeration enumeration, T value) { + this(session, enumeration, enumeration.find(value)); + } + + public ComboBoxModifier(Session session, Enumeration enumeration, + EnumeratedValue value) { + if (session == null) + throw new NullPointerException("null session"); + if (enumeration == null) + throw new NullPointerException("null enumeration"); + if (enumeration.size() == 0) + throw new IllegalArgumentException(""); + + this.enumeration = enumeration; + this.value = value; + this.session = session; + + select = 0; + boolean found = false; + + this.values = new ArrayList(); + for (EnumeratedValue v : enumeration.values()) { + values.add(v.getName()); + + if(v == value) + found = true; + + if(found == false) + select++; + } + } + + @Override + public Object createControl(Object parentControl, Object controlItem, + int columnIndex, NodeContext context) { + + combo = new Combo((Composite) parentControl, SWT.DROP_DOWN + | SWT.BORDER | SWT.READ_ONLY); + + for (String item : values) { + combo.add(item); + } + + combo.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + String index = ((Combo) e.getSource()).getText(); + modify(index); + } + }); + + combo.select(select); + + return combo; + + } + + @Override + public String getValue() { + return enumeration.values().get(0).getName(); + } + + @Override + public final String isValid(String label) { + if (enumeration.findByName(label) == null) + return "Value '" + label + "' is not among the enumerated values " + enumeration.values(); + return null; + } + + @Override + public void modify(String label) { + + int index = values.indexOf(label); + if (index == -1) + throw new IllegalArgumentException("Cannot modify enumeration with value '" + label + "', not among the enumerated values " + values); + + EnumeratedValue oldEnumValue = value; + EnumeratedValue newEnumValue = enumeration.values().get(index); + + final T oldObject = oldEnumValue != null ? oldEnumValue.getObject() : null; + final T newObject = newEnumValue != null ? newEnumValue.getObject() : null; + + if (ObjectUtils.objectEquals(oldObject, newObject)) + return; + + try { + session.getSession().syncRequest(new WriteRequest() { + @Override + public void perform(WriteGraph graph) throws DatabaseException { + modifyWithObject(graph, oldObject, newObject); + } + }); + } catch (DatabaseException e) { + handleException(e); + } + + combo.dispose(); + } + + protected abstract void modifyWithObject(WriteGraph graph, T oldEnumObject, T enumObject) throws DatabaseException; + + protected void handleException(DatabaseException e) { + throw new RuntimeException(e); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/EnumerationLabeler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/EnumerationLabeler.java index d55a10f3..bbaaa54a 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/EnumerationLabeler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/EnumerationLabeler.java @@ -11,6 +11,7 @@ import org.simantics.db.common.utils.NameUtils; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.ui.properties.widgets.ColumnKeys; public class EnumerationLabeler extends ColumnLabelerContributorImpl{ @@ -20,9 +21,10 @@ public class EnumerationLabeler extends ColumnLabelerContributorImpl map = new HashMap(); - map.put(Keys.ENUMERATION, name); + map.put(ColumnKeys.ENUMERATION, name); SysdynResource sr = SysdynResource.getInstance(graph); + Resource enumerationIndexes = graph.getPossibleObject(input.data, sr.HasEnumerationIndexes); ListIterator indexes = OrderedSetUtils.iterator(graph, enumerationIndexes); StringBuilder sb = new StringBuilder(); @@ -34,7 +36,14 @@ public class EnumerationLabeler extends ColumnLabelerContributorImpl implements IModifiableNode { + + private Resource module; + + public RedeclarationNode(ReadGraph graph, final Resource module, Resource enumeration) { + super(enumeration); + this.module = module; + } + + /** + * + * @param graph + * @return + */ + public Resource getReplacingEnumeration(ReadGraph graph) { + SysdynResource sr = SysdynResource.getInstance(graph); + Resource result = null; + try { + Resource redeclaration = getRedeclaration(graph); + if(redeclaration != null) { + result = graph.getSingleObject(redeclaration, sr.ReplacingEnumeration); + } + } catch(DatabaseException e) { + e.printStackTrace(); + } + + return result; + } + + + public Resource getModule() { + return module; + } + + public void setModule(Resource module) { + this.module = module; + } + + public Resource getRedeclaration(ReadGraph graph) { + try { + SysdynResource sr = SysdynResource.getInstance(graph); + for(Resource redeclaration : graph.syncRequest(new ObjectsWithType(module, sr.HasRedeclaration, sr.Redeclaration))) { + Resource replacedEnumeration = graph.getPossibleObject(redeclaration, sr.ReplacedEnumeration); + if(replacedEnumeration != null && replacedEnumeration.equals(getReplacedEnumeration())) { + return redeclaration; + } + } + } catch (DatabaseException e) { + e.printStackTrace(); + } + return null; + } + + public void setRedeclaration(WriteGraph graph, Resource redeclaration) { + try { + SysdynResource sr = SysdynResource.getInstance(graph); + Resource oldRedeclaration = getRedeclaration(graph); + if(oldRedeclaration != null || redeclaration == null) { + graph.deny(module, sr.HasRedeclaration, oldRedeclaration); + } + + if(redeclaration != null) + graph.claim(module, sr.HasRedeclaration, redeclaration); + + } catch (DatabaseException e) { + e.printStackTrace(); + } + } + + public Resource getReplacedEnumeration() { + return this.data; + } + + @Override + public Modifier getModifier(String columnId) { + + if(!ColumnKeys.REPLACED_WITH.equals(columnId)) + return null; + + ComboBoxModifier cbm = null; + + try { + cbm = SimanticsUI.getSession().syncRequest(new Read>() { + + @Override + public ComboBoxModifier perform(ReadGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 l0 = Layer0.getInstance(graph); + + ArrayList> values = new ArrayList>(); + + + Resource configuration = graph.getSingleObject(module, l0.PartOf); + + for(Resource enumeration : graph.syncRequest(new ObjectsWithType(configuration, l0.ConsistsOf, sr.Enumeration))) { + String name = NameUtils.getSafeName(graph, enumeration); + values.add(new EnumeratedValue(name, enumeration)); + } + + if(values.size() == 0) + return null; + + values.add(0, new EnumeratedValue("", null)); + Enumeration enumeration = new Enumeration(values); + + ComboBoxModifier cbm = new ComboBoxModifier(graph.getSession(), enumeration, getReplacingEnumeration(graph)) { + + @Override + protected void modifyWithObject(WriteGraph graph, Resource oldEnumObject, + Resource enumObject) throws DatabaseException { + + if(enumObject == null) { + setRedeclaration(graph, null); + } else if(!enumObject.equals(oldEnumObject)) { + SysdynResource sr = SysdynResource.getInstance(graph); + Resource redeclaration = GraphUtils.create2(graph, + sr.Redeclaration, + sr.ReplacedEnumeration, getReplacedEnumeration(), + sr.ReplacingEnumeration, enumObject); + setRedeclaration(graph, redeclaration); + } + + } + }; + + return cbm; + + } + }); + } catch (DatabaseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return cbm; + } + + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableEnumerations.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableEnumerations.java new file mode 100644 index 00000000..91afda93 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableEnumerations.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets.arrays; + +import java.util.ArrayList; +import java.util.Collection; + +import org.simantics.browsing.ui.graph.impl.contributor.viewpoint.ViewpointContributorImpl; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.ObjectsWithType; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.structural.stubs.StructuralResource2; +import org.simantics.sysdyn.SysdynResource; + +public class ReplaceableEnumerations extends ViewpointContributorImpl { + + @Override + public Collection getContribution(ReadGraph graph, Resource input) + throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 l0 = Layer0.getInstance(graph); + StructuralResource2 sr2 = StructuralResource2.getInstance(graph); + + Resource moduleType = graph.getSingleObject(input, l0.InstanceOf); + Resource configuration = graph.getSingleObject(moduleType, sr2.IsDefinedBy); + + ArrayList result = new ArrayList(); + + for(Resource r : graph.syncRequest(new ObjectsWithType(configuration, l0.ConsistsOf, sr.Enumeration))) { + if(Boolean.TRUE.equals(graph.getRelatedValue(r, sr.IsReplaceable))) + result.add(new RedeclarationNode(graph, input, r)); + } + + return result; + } + + @Override + public String getViewpointId() { + return "Replaceable enumerations"; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableEnumerationsLabeler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableEnumerationsLabeler.java new file mode 100644 index 00000000..68a44dba --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableEnumerationsLabeler.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets.arrays; + +import java.util.HashMap; +import java.util.Map; + +import org.simantics.browsing.ui.graph.impl.contributor.labeler.ColumnLabelerContributorImpl; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.ui.properties.widgets.ColumnKeys; + +public class ReplaceableEnumerationsLabeler extends ColumnLabelerContributorImpl{ + + @Override + public Map getLabel(ReadGraph graph, RedeclarationNode input) + throws DatabaseException { + HashMap map = new HashMap(); + + String name = NameUtils.getSafeName(graph, input.data); + map.put(ColumnKeys.ENUMERATION, name); + + Resource replacingEnumeration = input.getReplacingEnumeration(graph); + String replacingEnumerationName = ""; + if(replacingEnumeration != null) + replacingEnumerationName = NameUtils.getSafeName(graph, replacingEnumeration); + + map.put(ColumnKeys.REPLACED_WITH, replacingEnumerationName); + return map; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableIndexesWidget.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableIndexesWidget.java new file mode 100644 index 00000000..06caf4d4 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/ReplaceableIndexesWidget.java @@ -0,0 +1,117 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets.arrays; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.simantics.browsing.ui.swt.widgets.impl.SelectionListenerImpl; +import org.simantics.browsing.ui.swt.widgets.impl.Widget; +import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.ReadRequest; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.management.ISessionContext; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.utils.ui.ISelectionUtils; + +public class ReplaceableIndexesWidget implements Widget { + + Resource variable = null; + boolean selected = false; + org.simantics.browsing.ui.swt.widgets.Button isReplaceableButton; + + public ReplaceableIndexesWidget(Composite parent, WidgetSupport support, int style) { + support.register(this); + isReplaceableButton = new org.simantics.browsing.ui.swt.widgets.Button(parent, support, style |= SWT.CHECK); + isReplaceableButton.setText("Can be replaced by parent module"); + } + + @Override + public void setInput(ISessionContext context, Object input) { + if(input instanceof ISelection) { + ISelection selection = (ISelection)input; + if(selection instanceof IStructuredSelection) { + Resource resource = ISelectionUtils.filterSingleSelection(selection, Resource.class); + if(resource != null) { + variable = resource; + } + } + } + + if(variable == null) return; + + try { + context.getSession().syncRequest(new ReadRequest() { + + @Override + public void run(ReadGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + final Boolean replaceable = graph.getPossibleRelatedValue(variable, sr.IsReplaceable); + if(replaceable != null) + selected = replaceable; + final Button button = getWidget(); + button.getDisplay().asyncExec(new Runnable() { + + @Override + public void run() { + if(button.isDisposed()) return; + + if(replaceable) + button.setSelection(true); + else + button.setSelection(false); + } + }); + + + } + }); + } catch (DatabaseException e) { + e.printStackTrace(); + } + + isReplaceableButton.addSelectionListener(new SelectionListenerImpl(context) { + + @Override + public void apply(WriteGraph graph, Resource input) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Boolean replaceable = graph.getPossibleRelatedValue(input, sr.IsReplaceable); + if(Boolean.TRUE.equals(replaceable)) { + graph.claimLiteral(input, sr.IsReplaceable, false); + selected = false; + } else { + graph.claimLiteral(input, sr.IsReplaceable, true); + selected = true; + } + } + }); + } + + public Button getWidget() { + return isReplaceableButton.getWidget(); + } + + public boolean getSelection() { + return selected; + } + + public void addSelectionListener(SelectionListener listener) { + isReplaceableButton.addSelectionListener(listener); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/viewUtils/SysdynDatasetSelectionListener.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/viewUtils/SysdynDatasetSelectionListener.java index f82f517e..4425ce9c 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/viewUtils/SysdynDatasetSelectionListener.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/viewUtils/SysdynDatasetSelectionListener.java @@ -145,7 +145,6 @@ public abstract class SysdynDatasetSelectionListener implements ISelectionListen protected Collection loadAllActive(ReadGraph g, Variable variable) throws DatabaseException { ArrayList dataSets = new ArrayList(); HashMap rvis = new HashMap(); - String rvi = Variables.getRVI(g, variable); if (rvi == null) return dataSets; diff --git a/org.simantics.sysdyn/META-INF/MANIFEST.MF b/org.simantics.sysdyn/META-INF/MANIFEST.MF index 802f3295..cbd4948c 100644 --- a/org.simantics.sysdyn/META-INF/MANIFEST.MF +++ b/org.simantics.sysdyn/META-INF/MANIFEST.MF @@ -17,10 +17,15 @@ Require-Bundle: org.simantics.objmap;bundle-version="0.1.0", org.simantics.layer0.utils;bundle-version="0.8.0", org.simantics.layer0;bundle-version="1.0.0", org.simantics.structural.ontology;bundle-version="1.0.0", - org.simantics.sysdyn.ontology;bundle-version="1.0.0" + org.simantics.sysdyn.ontology;bundle-version="1.0.0", + org.simantics.modeling;bundle-version="1.1.1", + org.simantics.diagram;bundle-version="1.1.1", + org.simantics.diagram.ontology;bundle-version="1.1.1" Export-Package: org.simantics.sysdyn, org.simantics.sysdyn.expressionParser, org.simantics.sysdyn.manager, + org.simantics.sysdyn.mdlImport, + org.simantics.sysdyn.mdlImport.mdlElements, org.simantics.sysdyn.modelica, org.simantics.sysdyn.representation, org.simantics.sysdyn.representation.visitors, diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java index 9f2c93e8..d12f7b40 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java @@ -160,14 +160,14 @@ public class ModelicaWriter { if(!modules.isEmpty()) { b.append("// Module definitions\n"); for(Module m : modules) { - b.append(" " + m.getType().getName() + " " + m.getName() + ";\n"); + b.append(m.getDeclaration()); } } if(!inputs.isEmpty()) { b.append("// Input definitions\n"); for(Input i : inputs) { - b.append(" " + i.getType() + " " + i.getName() + ";\n"); + b.append(i.getDeclaration()); } } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Enumeration.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Enumeration.java index 33dc5760..ebde6003 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Enumeration.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Enumeration.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import org.simantics.objmap.annotations.GraphType; import org.simantics.objmap.annotations.RelatedElement; +import org.simantics.objmap.annotations.RelatedValue; import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid; @GraphType("http://www.simantics.org/Sysdyn-1.0/Enumeration") @@ -11,6 +12,9 @@ public class Enumeration extends Variable { @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasEnumerationIndexes") private EnumerationIndexes enumerationIndexes; + + @RelatedValue("http://www.simantics.org/Sysdyn-1.0/IsReplaceable") + private Boolean isReplaceable; @Override public void accept(IElementVisitorVoid v) { @@ -19,20 +23,35 @@ public class Enumeration extends Variable { public String getDeclaration() { StringBuilder sb = new StringBuilder(); - sb.append(" " + this.getType()); + sb.append(" "); + if(isReplaceable()) + sb.append("replaceable "); + sb.append(this.getType()); sb.append(" " + this.name); - sb.append(" = enumeration("); + sb.append(" = "); + sb.append(getEnumerationDefinition()); + sb.append(";\n"); + return sb.toString(); + } + + public ArrayList getEnumerationIndexes() { + return enumerationIndexes.getEnumerationIndexes(); + } + + public boolean isReplaceable() { + return Boolean.TRUE.equals(isReplaceable); + } + + public String getEnumerationDefinition() { + StringBuilder sb = new StringBuilder(); + sb.append("enumeration("); for(int i = 0; i < enumerationIndexes.getEnumerationIndexes().size(); i++) { sb.append(enumerationIndexes.getEnumerationIndexes().get(i).getName()); if(i < enumerationIndexes.getEnumerationIndexes().size() - 1) sb.append(", "); } - sb.append(");\n"); + sb.append(")"); return sb.toString(); } - - public ArrayList getEnumerationIndexes() { - return enumerationIndexes.getEnumerationIndexes(); - } } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Input.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Input.java index ceb8fef4..8a2a543c 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Input.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Input.java @@ -11,6 +11,8 @@ *******************************************************************************/ package org.simantics.sysdyn.representation; +import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import org.simantics.objmap.annotations.GraphType; @@ -26,16 +28,58 @@ public class Input extends Variable { @RelatedElements("http://www.simantics.org/Sysdyn-1.0/IsHeadOf") private List isHeadOf; + + @Override public void accept(IElementVisitorVoid v) { v.visit(this); } public String getDefaultInputValue() { - return defaultInputValue.toString(); + if( getArrayIndexes() == null || getArrayIndexes().getEnumerations().isEmpty()) { + return defaultInputValue.toString(); + } else { + StringBuilder sb = new StringBuilder(); + sb.append("fill("); + sb.append(defaultInputValue); + sb.append(", "); + Iterator i = getArrayIndexes().getEnumerations().iterator(); + while(i.hasNext()) { + Enumeration e = i.next(); + sb.append(e.getEnumerationIndexes().size()); + if(i.hasNext()) + sb.append(", "); + } + sb.append(")"); + return sb.toString(); + } } public boolean isHeadOfDependency() { return !isHeadOf.isEmpty(); } + + public String getDeclaration() { + ArrayIndexes ai = getArrayIndexes(); + ArrayList enumerations = null; + if(ai != null) + enumerations = ai.getEnumerations(); + + String range = ""; + if(enumerations != null && enumerations.size() > 0) { + StringBuilder sb = new StringBuilder(); + sb.append("["); + Iterator iterator = enumerations.iterator(); + while(iterator.hasNext()) { + sb.append(iterator.next().getName()); + if(iterator.hasNext()) { + sb.append(", "); + } + } + sb.append("]"); + range = sb.toString(); + } + + return " " + getType() + " " + getName() + range + ";\n"; + } } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Module.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Module.java index 003f456e..02fa9e8d 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Module.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Module.java @@ -11,8 +11,13 @@ *******************************************************************************/ package org.simantics.sysdyn.representation; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + import org.simantics.objmap.annotations.GraphType; import org.simantics.objmap.annotations.RelatedElement; +import org.simantics.objmap.annotations.RelatedElements; import org.simantics.objmap.annotations.RelatedValue; import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid; @@ -28,6 +33,9 @@ public class Module implements IElement { @RelatedElement("http://www.simantics.org/Layer0-1.0/InstanceOf") private ModuleType type; + @RelatedElements("http://www.simantics.org/Sysdyn-1.0/HasRedeclaration") + private List redeclarations; + @Override public void accept(IElementVisitorVoid v) { v.visit(this); @@ -40,9 +48,49 @@ public class Module implements IElement { public ModuleType getType() { return type; } + + /** + * Returns the declaration of a module with possible redeclared enumerations + * + * Module m(redeclare type E1 = enumeration(i1, i2, i3), redeclare type E2 = enumeration(i4, i5, i6)); + * + * @return Declaration of a module instance + */ + public String getDeclaration() { + StringBuilder sb = new StringBuilder(); + sb.append(" "); + sb.append(getType().getName()); + sb.append(" "); + sb.append(getName()); + if(!getRedeclarations().isEmpty()) { + sb.append("("); + Iterator i = getRedeclarations().iterator(); + while(i.hasNext()) { + Redeclaration rd = i.next(); + sb.append(rd.getRedeclaration()); + if(i.hasNext()) + sb.append(","); + } + sb.append(")"); + } + sb.append(";\n"); + return sb.toString(); + } public Configuration getParentConfiguration() { return this.parentConfiguration; } + + /** + * Return the list of the defined redeclarations for this module instance. + * + * @return List of the defined redeclarations or an empty list if redeclarations have not been set + */ + public List getRedeclarations() { + if(redeclarations == null) { + redeclarations = new ArrayList(); + } + return redeclarations; + } } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Redeclaration.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Redeclaration.java new file mode 100644 index 00000000..7cddf5a7 --- /dev/null +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Redeclaration.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.representation; + +import org.simantics.objmap.annotations.GraphType; +import org.simantics.objmap.annotations.RelatedElement; + +@GraphType("http://www.simantics.org/Sysdyn-1.0/Redeclaration") +public class Redeclaration { + + @RelatedElement("http://www.simantics.org/Sysdyn-1.0/ReplacedEnumeration") + private Enumeration replacedEnumeration; + + @RelatedElement("http://www.simantics.org/Sysdyn-1.0/ReplacingEnumeration") + private Enumeration replacingEnumeration; + + public String getRedeclaration() { + if(replacedEnumeration == null || replacingEnumeration == null) { + return ""; + } + StringBuilder sb = new StringBuilder(); + sb.append("redeclare type "); + sb.append(replacedEnumeration.getName()); + sb.append(" = "); + sb.append(replacingEnumeration.getEnumerationDefinition()); + + return sb.toString(); + } + +} diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/SysdynSchema.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/SysdynSchema.java index ed8e9f8d..29a78bad 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/SysdynSchema.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/SysdynSchema.java @@ -49,6 +49,7 @@ public class SysdynSchema extends SimpleSchema { addLinkType(MappingSchemas.fromAnnotations(g, ConstantExpression.class)); addLinkType(MappingSchemas.fromAnnotations(g, WithLookupExpression.class)); addLinkType(MappingSchemas.fromAnnotations(g, LookupExpression.class)); + addLinkType(MappingSchemas.fromAnnotations(g, Redeclaration.class)); } catch (DatabaseException e) { -- 2.47.1