From d707ff4f67d8f7df27a10bb98384aa4cacc845a9 Mon Sep 17 00:00:00 2001 From: lempinen Date: Wed, 5 Dec 2012 12:15:42 +0000 Subject: [PATCH] Fixed copy issues. Changed ordered sets from sysdyn ontology to lists and added required migration steps and tools for old models (refs #3708) git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26505 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../annotations/RelatedListElements.java | 28 ++++++ .../RelatedListElementsRuleFactory.java | 39 +++++++++ .../domain/RelatedListElementsAccessor.java | 71 ++++++++++++++++ org.simantics.sysdyn.ontology/graph.tg | Bin 80928 -> 83262 bytes .../graph/Migration.pgraph | 23 +++++ .../graph/Sysdyn.pgraph | 5 +- .../org/simantics/sysdyn/SysdynResource.java | 24 +++++- .../sysdyn/ui/browser/SysdynBrowser.java | 2 +- .../newActions/NewEnumerationAction.java | 6 +- .../ui/browser/nodes/EnumerationNode.java | 20 ++++- .../SysdynComponentCopyAdvisor.java | 80 +++++++++++------- .../ui/elements/SysdynElementFactory.java | 2 +- .../NewEnumerationNodeHandler.java | 10 ++- .../sysdyn/ui/properties/ArrayIndexesTab.java | 62 +++++++++----- .../sysdyn/ui/properties/EnumerationTab.java | 34 +++++--- .../sysdyn/ui/properties/EquationTab.java | 44 +++++++--- .../ResourceSelectionProcessor.java | 8 +- .../widgets/ArrayExpressionCombo.java | 11 +-- .../properties/widgets/ExpressionWidget.java | 23 +---- .../widgets/arrays/AvailableEnumerations.java | 2 +- .../widgets/arrays/EnumerationIndexes.java | 7 +- .../widgets/arrays/EnumerationLabeler.java | 9 +- .../widgets/arrays/UsedEnumerations.java | 9 +- .../widgets/expressions/BasicExpression.java | 33 +++++--- .../widgets/expressions/DelayExpression.java | 11 ++- .../widgets/expressions/StockExpression.java | 32 ++++--- .../expressions/WithLookupExpression.java | 14 ++- .../modules/ModuleParameterOverrideUtils.java | 8 +- .../chart/properties/RangeComposite.java | 14 +-- .../sysdyn/ui/utils/ArrayVariableUtils.java | 6 +- .../sysdyn/ui/utils/VariableNameUtils.java | 6 +- .../sysdyn/ui/utils/imports/ImportUtils.java | 4 +- .../imports/SysdynImportFormatHandler.java | 12 ++- .../ui/validation/EnumerationFunction.java | 7 +- .../sysdyn/ui/validation/ValidationUtils.java | 6 +- .../sysdyn/adapter/VariableRVIUtils.java | 10 +-- .../simantics/sysdyn/manager/SysdynModel.java | 4 +- .../mdlImport/mdlElements/Subscript.java | 11 +-- .../mdlImport/mdlElements/Variable.java | 18 ++-- .../sysdyn/representation/ArrayIndexes.java | 19 ----- .../sysdyn/representation/Enumeration.java | 8 +- .../representation/EnumerationIndexes.java | 18 ---- .../representation/IndependentVariable.java | 19 ++--- .../sysdyn/representation/Input.java | 10 +-- .../sysdyn/representation/Stock.java | 8 +- .../sysdyn/representation/SysdynSchema.java | 4 - .../sysdyn/representation/Variability.java | 2 +- .../sysdyn/representation/Variable.java | 17 ++-- .../expressions/Expressions.java | 18 ---- .../expressions/StockExpression.java | 11 +-- .../representation/utils/FormatUtils.java | 4 +- .../representation/utils/IndexUtils.java | 6 +- 52 files changed, 539 insertions(+), 320 deletions(-) create mode 100644 org.simantics.objmap/src/org/simantics/objmap/annotations/RelatedListElements.java create mode 100644 org.simantics.objmap/src/org/simantics/objmap/annotations/factories/RelatedListElementsRuleFactory.java create mode 100644 org.simantics.objmap/src/org/simantics/objmap/rules/domain/RelatedListElementsAccessor.java delete mode 100644 org.simantics.sysdyn/src/org/simantics/sysdyn/representation/ArrayIndexes.java delete mode 100644 org.simantics.sysdyn/src/org/simantics/sysdyn/representation/EnumerationIndexes.java delete mode 100644 org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/Expressions.java diff --git a/org.simantics.objmap/src/org/simantics/objmap/annotations/RelatedListElements.java b/org.simantics.objmap/src/org/simantics/objmap/annotations/RelatedListElements.java new file mode 100644 index 00000000..0c38770b --- /dev/null +++ b/org.simantics.objmap/src/org/simantics/objmap/annotations/RelatedListElements.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2012 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.objmap.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.simantics.objmap.annotations.factories.RelatedListElementsRuleFactory; +import org.simantics.objmap.annotations.meta.HasFieldRuleFactory; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +@HasFieldRuleFactory(RelatedListElementsRuleFactory.class) +public @interface RelatedListElements { + String value(); +} + diff --git a/org.simantics.objmap/src/org/simantics/objmap/annotations/factories/RelatedListElementsRuleFactory.java b/org.simantics.objmap/src/org/simantics/objmap/annotations/factories/RelatedListElementsRuleFactory.java new file mode 100644 index 00000000..eff53549 --- /dev/null +++ b/org.simantics.objmap/src/org/simantics/objmap/annotations/factories/RelatedListElementsRuleFactory.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2012 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.objmap.annotations.factories; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Field; +import java.util.Collection; + +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.ResourceNotFoundException; +import org.simantics.db.exception.ServiceException; +import org.simantics.db.exception.ValidationException; +import org.simantics.objmap.IMappingRule; +import org.simantics.objmap.annotations.RelatedListElements; +import org.simantics.objmap.rules.MappedElementsRule; +import org.simantics.objmap.rules.domain.RelatedListElementsAccessor; +import org.simantics.objmap.rules.factory.IFieldRuleFactory; +import org.simantics.objmap.rules.range.FieldAccessor; + +public class RelatedListElementsRuleFactory implements IFieldRuleFactory { + + @Override + public IMappingRule create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException { + RelatedListElements annotation = (RelatedListElements)_annotation; + return new MappedElementsRule( + new RelatedListElementsAccessor(g.getResource(annotation.value())), + new FieldAccessor>(field) + ); + } +} diff --git a/org.simantics.objmap/src/org/simantics/objmap/rules/domain/RelatedListElementsAccessor.java b/org.simantics.objmap/src/org/simantics/objmap/rules/domain/RelatedListElementsAccessor.java new file mode 100644 index 00000000..59b544f0 --- /dev/null +++ b/org.simantics.objmap/src/org/simantics/objmap/rules/domain/RelatedListElementsAccessor.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2007, 2012 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.objmap.rules.domain; + +import java.util.Collection; +import java.util.Collections; + +import org.apache.log4j.Logger; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.utils.ListUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.objmap.MappingException; + +public class RelatedListElementsAccessor implements IDomainAccessor> { + + static Logger LOGGER = Logger.getLogger("org.simantics.objmap"); + + Resource relation; + + public RelatedListElementsAccessor(Resource relation) { + super(); + this.relation = relation; + } + + @Override + public Collection get(ReadGraph g, Resource element) throws MappingException { + try { + LOGGER.info(" RelatedListElementsAccessor.get"); + Resource listResource = g.getPossibleObject(element, relation); + if(listResource != null) + return ListUtils.toList(g, listResource); + else + return Collections.emptyList(); + } catch (DatabaseException e) { + throw new MappingException(e); + } + } + + @Override + public boolean set(WriteGraph g, Resource element, Collection value) + throws MappingException { + try { + LOGGER.info(" RelatedListElementsAccessor.set"); + Resource listResource = g.getPossibleObject(element, relation); + if(listResource != null) + ListUtils.createExisting(g, listResource, value); + else { + listResource = ListUtils.create(g, value); + g.claim(element, relation, listResource); + } + + return true; + // FIXME Implement deleteExtraObjects + } catch (DatabaseException e) { + throw new MappingException(e); + } + + } + +} diff --git a/org.simantics.sysdyn.ontology/graph.tg b/org.simantics.sysdyn.ontology/graph.tg index c4a93709ad77c849edd5029eefd9eeab56778808..926b1bf3884ed424260ad03311ccd694fb316ac7 100644 GIT binary patch literal 83262 zcmeFacbr^R{r^Ar-kHtT^g?JELQ5cpL_j*E!a^F^&_S5&PLhG$on>Y=$zlO3Vi!dP zQBkQjL@Zzf8y4(}T?9oeC@7*}|Gi%CbKd8idq|XgKfmwyuTOlexzF={z2EQC@40to zLuqrPGP0#mC?xnPjN|{=Kc${VwOJo+^jDYFM~7P}i#w~^Th-xatv=lBAh+@Vy7_;d zwSnqztJbPjo9*NkbWtM(PB zLSwixm{YcmR2s-H@x533+7V_k+ERP(u=gx=Hd~cebqG$T!s6PtwK6#R-&;@;nY6o5 zC=Hkfq<3pe(3#SkleTT!wxC%Xs-R=~n+xiV%}|V^Dd|{NAFMa#FIun&RFtBwb&dLk z)&3R=7eld(g~dths~3;f(0yyr6U~uIe-#N=z?3W-*E_tm+GwI6y+pKAZGa{HZ1l1^ zTD!dk>-%%orH%TwCWch4AAmJ|fA{*);Z>E5)xq_ngN*nB@fl|$BHa=b#8t!Ai~Was ziZvN`;^O7DNoy%zGXA7Wv+wj1m)HA8jj$x;Ykk!VZ4@S*y+f7F)y1ai>0hL*qqo@{ zt=gi$qA2~#xIUSWO4@dwoW z#pV1Vu=s;6HouBNs`ddQI+Biz1rxP|$(870|QrKAH@S-X+b3!=MBk!eSB z?Jy$z+xYq3N!~0aJ-XUX=fXg^N2PcQJFU_fs9|j(@%qZ}W*AG)fiZj3k8Z-5T1d0g z*7w5jI{|jex<++ttv-rzEZ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1Wh;Y?ibwz$+M20gRqM(x%PAwK0aZG&uEaa!>8M$*8BK` z9X_?2u*0X@^P^L~^I_8VVe&@US(H;oujX?JW7F!UKyNR4DMUh2qt*Zgt75m_n&ro6 z&~#}byq@jUON4uJ1GgCw0~Er#W=>}NZKEGk|A8}i*J9C0 zhjVu=Wnj$0p6W^0gAk9GG<=d0E1Zbf@}^)}rZ%^}@c8?}x$WRIrG>o9`X-X88{0Ta z(#e63AEaw95(Y&Kic+uOkv(-mOFRVW&b3La>=A&Fg@QqNu z4$6g``qYB2dX^Bfxvhl06k27~KS=)zf&Vf&Mc9e!+dE7h&$Z)lV}Bh9eBE!_ApsS>zPicoGC$%5E+Galr13r zoRoztF$&D(M|w5v49aYk4o$&lLj9joeyY38{epSoB(&8o76G#Vi(ecn8xGr*qA#@u zR{A0(OvR3COA^?Pj|lN=7QS$76`^+2_hFcDBH`_Dx{cbI4jET=OswuIoK7D{*YBz1 zvz=s}?ujJdnkNe@Ytur4>ty*xO@Z?0Mt0UeyI{c1t(Xu>!k7C<@c!o<^@?0PKrfeY7?cPjO)j4;2ly0o#ps?EBw+`ga!x8gmV)*~?) zm3UCzh+KOmLABWslxBodFODqvt<|;$Qma93SATr6UTm3B>CysYxJ~M~uv@}FFHStF zITto9v}P6-i(MEHkwV;#wSK0 zqdPU-RIlnu%q{h?5NIBsM^9-_5}4VNvamK2YFu_#9e%(~cc>X@s}CC>`%K3@tYs+a0L#aJLz?JK*qA^Cb#jQ@AR>tdYV` z;>~7j%fXC3`zknZ!W}!h^>b0sR62+?+?=_~cR2#`=Tl1Wr{(gDLg=e3v|7;{e>e_# zApNlpeRdHFgDcT~zJG8Ke}liqGMJ7HxARg&A>gRHG-- SYSDYN.Variable.type --> L0.String -- SYSDYN.Variable.expressions --> SYSDYN.Expressions -- SYSDYN.Variable.expressionList --> L0.List -- SYSDYN.Variable.arrayIndexes --> SYSDYN.ArrayIndexes -- SYSDYN.Variable.arrayIndexesList --> L0.List -- SYSDYN.Variable.unit --> L0.String -- SYSDYN.Variable.variability --> L0.String -- SYSDYN.Variable.isTailOf --> STR.Connection -- SYSDYN.IndependentVariable.rangeEnd --> L0.Double -- SYSDYN.IndependentVariable.rangeStep --> L0.Double -- SYSDYN.IndependentVariable.activeExpression --> SYSDYN.Expression -- SYSDYN.IndependentVariable.activeExpression --> SYSDYN.Expression -- SYSDYN.Enumeration.enumerationIndexes --> SYSDYN.EnumerationIndexes -- SYSDYN.Enumeration.enumerationIndexList --> L0.List -- SYSDYN.Enumeration.isReplaceable --> L0.Boolean selectionTransformation = new BinaryFunction() { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewEnumerationAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewEnumerationAction.java index dc3d4d0d..ffc74ba1 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewEnumerationAction.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewEnumerationAction.java @@ -11,11 +11,13 @@ *******************************************************************************/ package org.simantics.sysdyn.ui.browser.actions.newActions; +import java.util.Collections; + import org.simantics.db.Resource; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.NameUtils; -import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.adapter.ActionFactory; import org.simantics.layer0.Layer0; @@ -75,7 +77,7 @@ public class NewEnumerationAction implements ActionFactory{ GraphUtils.create2(g, sr.Enumeration, l0.HasName, name, - sr.Enumeration_enumerationIndexes, OrderedSetUtils.create(g, sr.EnumerationIndexes), + sr.Enumeration_enumerationIndexList, ListUtils.create(g, Collections.emptyList()), l0.PartOf, configuration); } }); 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 4194c0b0..2c104fc3 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 @@ -4,12 +4,15 @@ import org.simantics.browsing.ui.common.node.DeleteException; import org.simantics.browsing.ui.common.node.IDeletableNode; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.ObjectsWithType; import org.simantics.db.common.request.WriteRequest; -import org.simantics.db.common.utils.OrderedSetUtils; +import org.simantics.db.common.utils.ListUtils; +import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.CancelTransactionException; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.util.RemoverUtil; import org.simantics.db.layer0.variable.Variable; +import org.simantics.layer0.Layer0; import org.simantics.sysdyn.SysdynResource; import org.simantics.ui.SimanticsUI; import org.simantics.utils.ui.ExceptionUtils; @@ -35,12 +38,21 @@ public class EnumerationNode extends VariableNode implements IDeletabl graph.deny(redeclaration, sr.Module_redeclaration_Inverse); } - for(Resource redeclaration : graph.getObjects(data, sr.Redeclaration_replacedEnumeration_Inverse)) { + for(Resource redeclaration : graph.getObjects(data, sr.Redeclaration_replacingEnumeration_Inverse)) { graph.deny(redeclaration, sr.Module_redeclaration_Inverse); } - for(Resource list : OrderedSetUtils.getOwnerLists(graph, data, sr.ArrayIndexes)) { - OrderedSetUtils.remove(graph, list, data); + Layer0 L0 = Layer0.getInstance(graph); + Resource conf = graph.getPossibleObject(data, L0.PartOf); + System.out.println(NameUtils.getSafeName(graph, conf, true)); + for(Resource var : graph.syncRequest(new ObjectsWithType(conf, L0.ConsistsOf, sr.Variable))) { + System.out.println(NameUtils.getSafeName(graph, var, true)); + Resource arrayIndexes = graph.getPossibleObject(var, sr.Variable_arrayIndexesList); + if(arrayIndexes != null) { + if(ListUtils.getNode(graph, arrayIndexes, data) != null) { + ListUtils.removeElement(graph, arrayIndexes, data); + } + } } RemoverUtil.remove(graph, data); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynComponentCopyAdvisor.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynComponentCopyAdvisor.java index d42556ef..93ff24b0 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynComponentCopyAdvisor.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynComponentCopyAdvisor.java @@ -20,51 +20,71 @@ import org.simantics.db.Statement; import org.simantics.db.WriteGraph; import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.exception.ServiceException; import org.simantics.diagram.synchronization.ISynchronizationContext; +import org.simantics.diagram.synchronization.StatementEvaluation; +import org.simantics.diagram.synchronization.SynchronizationHints; import org.simantics.diagram.synchronization.graph.CopyAdvisorUtil; import org.simantics.layer0.Layer0; import org.simantics.modeling.ComponentUtils; import org.simantics.modeling.mapping.ComponentCopyAdvisor; import org.simantics.structural.stubs.StructuralResource2; +import org.simantics.sysdyn.SysdynResource; import org.simantics.utils.datastructures.BinaryFunction; public class SysdynComponentCopyAdvisor extends ComponentCopyAdvisor { + private Layer0 L0; + private StructuralResource2 STR; + private SysdynResource SYSDYN; + @Override public Object copy(ISynchronizationContext context, WriteGraph graph, Resource source, Resource sourceContainer, Resource targetContainer, Map map) throws DatabaseException { - - BinaryFunction tester = new BinaryFunction() { +// Object copy = super.copy(context, graph, source, sourceContainer, targetContainer, map); + + BinaryFunction tester = new BinaryFunction() { + @Override + public StatementEvaluation call(ReadGraph graph, Statement statement) { + try { + if(statement.getPredicate().equals(L0.List_Next) || + statement.getPredicate().equals(L0.List_Previous)) { + return StatementEvaluation.INCLUDE_AND_FOLLOW; + } else if(statement.getPredicate().equals(L0.List_Element)){ + if(graph.isInstanceOf(statement.getObject(), SYSDYN.Enumeration)) + return StatementEvaluation.INCLUDE; + else + return StatementEvaluation.INCLUDE_AND_FOLLOW; + } + } catch (ServiceException e) { + e.printStackTrace(); + } + return StatementEvaluation.USE_DEFAULT; + } + + }; + + SYSDYN = SysdynResource.getInstance(graph); + L0 = Layer0.getInstance(graph); + STR = StructuralResource2.getInstance(graph); + Resource copy = null; + if (graph.isInstanceOf(source, STR.Connection)) { + // Configuration connections are not named, can't use TG copy for + // them at the moment. + copy = CopyAdvisorUtil.copy2(graph, source, null, map); + } else { +// Resource model = graph.syncRequest(new PossibleModel(targetContainer)); +// copy = CopyAdvisorUtil.copy4(graph, source, model); + copy = CopyAdvisorUtil.copy2(graph, source, tester, map); + } - @Override - public Boolean call(ReadGraph graph, Statement statement) { - /* - SysdynResource sr = SysdynResource.getInstance(graph); - try { - if(graph.isInstanceOf(statement.getSubject(), sr.IndependentVariable)) { - if(statement.getPredicate().equals(sr.HasExpressions) || - statement.getPredicate().equals(sr.HasArrayIndexes) ) - return false; - } - } catch (ServiceException e) { - e.printStackTrace(); - } - */ - return false; - } - - }; - - Resource copy; - - StructuralResource2 sr2 = StructuralResource2.getInstance(graph); - if(graph.isInstanceOf(source, sr2.Connection)) { - copy = CopyAdvisorUtil.copy(graph, source, tester, map); - } else { - copy = CopyAdvisorUtil.copy4(graph, source); - } + Layer0 L0 = Layer0.getInstance(graph); + if (graph.hasStatement(sourceContainer, L0.ConsistsOf, source)) + graph.claim(targetContainer, L0.ConsistsOf, copy); + if (context.get(SynchronizationHints.NO_RENAME) == null) +// renameComponent(context, graph, source, copy, sourceContainer, targetContainer); + rename(context, graph, source, (Resource)copy, sourceContainer, targetContainer); - rename(context, graph, source, copy, sourceContainer, targetContainer); return copy; } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/SysdynElementFactory.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/SysdynElementFactory.java index f71225be..a3975bdf 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/SysdynElementFactory.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/SysdynElementFactory.java @@ -97,7 +97,7 @@ public abstract class SysdynElementFactory extends SyncElementFactory { if (graph.isInstanceOf(element, dr.FontProvider)) { Resource fontResource = graph.getPossibleObject(element, g2d.HasFont); - if (fontResource != null) + if (fontResource != null && graph.hasStatement(fontResource)) ElementUtils.setTextFont(e, G2DUtils.getFont(graph, fontResource)); } if (graph.isInstanceOf(element, dr.ColorProvider)) { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewEnumerationNodeHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewEnumerationNodeHandler.java index e0e60a14..270b11e5 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewEnumerationNodeHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewEnumerationNodeHandler.java @@ -11,6 +11,8 @@ *******************************************************************************/ package org.simantics.sysdyn.ui.handlers.newComponents; +import java.util.ArrayList; + import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -19,8 +21,8 @@ import org.eclipse.ui.handlers.HandlerUtil; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.NameUtils; -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; @@ -28,7 +30,7 @@ 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; +import org.simantics.utils.ui.AdaptionUtils; /** * Creates a new Enumeration node to a configuration or module @@ -69,14 +71,14 @@ public class NewEnumerationNodeHandler extends AbstractHandler { } // Create the enumeartion - Resource enumerationIndexes = OrderedSetUtils.create(g, sr.EnumerationIndexes); +// Resource enumerationIndexes = OrderedSetUtils.create(g, sr.EnumerationIndexes); String name = NameUtils.findFreshName(g, "Enum", configuration, l0.ConsistsOf, "%s%d"); GraphUtils.create2(g, sr.Enumeration, l0.HasName, name, - sr.Enumeration_enumerationIndexes, enumerationIndexes, + sr.Enumeration_enumerationIndexList, ListUtils.create(g, new ArrayList()), l0.PartOf, configuration); } }); 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 964a1417..193e42a8 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 @@ -33,10 +33,11 @@ import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; import org.simantics.db.common.ResourceArray; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.NameUtils; -import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.management.ISessionContext; +import org.simantics.layer0.Layer0; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.ui.properties.widgets.ColumnKeys; import org.simantics.utils.RunnableWithObject; @@ -100,12 +101,19 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); for(Resource r : input.resources) { - Resource arrayIndexes = graph.getPossibleObject(r, sr.Variable_arrayIndexes); + Resource arrayIndexes = graph.getPossibleObject(r, sr.Variable_arrayIndexesList); if(arrayIndexes == null) { - arrayIndexes = OrderedSetUtils.create(graph, sr.ArrayIndexes); - graph.claim(r, sr.Variable_arrayIndexes, arrayIndexes); +// arrayIndexes = OrderedSetUtils.create(graph, sr.ArrayIndexes); + graph.claim(r, sr.Variable_arrayIndexesList, ListUtils.create(graph, enumerationResources)); + } else { +// OrderedSetUtils.addAll(graph, arrayIndexes, enumerationResources); + ArrayList filtered = new ArrayList(); + for(Resource enumeration : enumerationResources) { + if(ListUtils.getNode(graph, arrayIndexes, enumeration) == null) + filtered.add(enumeration); + } + ListUtils.insertBack(graph, arrayIndexes, filtered); } - OrderedSetUtils.addAll(graph, arrayIndexes, enumerationResources); } } }); @@ -174,13 +182,14 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg public void apply(WriteGraph graph, ResourceArray input) throws DatabaseException { - + Layer0 L0 = Layer0.getInstance(graph); SysdynResource sr = SysdynResource.getInstance(graph); for(Resource variable : input) { - Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexes); + Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexesList); if(arrayIndexes != null) { - List enumerations = OrderedSetUtils.toList(graph, arrayIndexes); +// List enumerations = OrderedSetUtils.toList(graph, arrayIndexes); + List enumerations = ListUtils.toList(graph, arrayIndexes); List toBeMoved = new ArrayList(); for(Integer index : selectedIndexes) { if(index < enumerations.size()) { @@ -191,10 +200,13 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg } for(Resource enumeration : toBeMoved) { - Resource prev = OrderedSetUtils.prev(graph, arrayIndexes, enumeration); - if(!prev.equals(arrayIndexes) && !toBeMoved.contains(prev)) { - OrderedSetUtils.remove(graph, arrayIndexes, enumeration); - OrderedSetUtils.addBefore(graph, arrayIndexes, prev, enumeration); +// Resource prev = OrderedSetUtils.prev(graph, arrayIndexes, enumeration); + Resource node = ListUtils.getNode(graph, arrayIndexes, enumeration); + Resource prev = graph.getSingleObject(node, L0.List_Previous); + if(!arrayIndexes.equals(prev) && !toBeMoved.contains(graph.getPossibleObject(prev, L0.List_Element))) { + ListUtils.swapWithPrevious(graph, arrayIndexes, enumeration); +// OrderedSetUtils.remove(graph, arrayIndexes, enumeration); +// OrderedSetUtils.addBefore(graph, arrayIndexes, prev, enumeration); } } } @@ -244,13 +256,14 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg public void apply(WriteGraph graph, ResourceArray input) throws DatabaseException { - + Layer0 L0 = Layer0.getInstance(graph); SysdynResource sr = SysdynResource.getInstance(graph); for(Resource variable : input) { - Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexes); + Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexesList); if(arrayIndexes != null) { - List enumerations = OrderedSetUtils.toList(graph, arrayIndexes); +// List enumerations = OrderedSetUtils.toList(graph, arrayIndexes); + List enumerations = ListUtils.toList(graph, arrayIndexes); List toBeMoved = new ArrayList(); for(Integer index : selectedIndexes) { if(index < enumerations.size()) { @@ -261,10 +274,13 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg } for(Resource enumeration : toBeMoved) { - Resource next = OrderedSetUtils.next(graph, arrayIndexes, enumeration); - if(!next.equals(arrayIndexes) && !toBeMoved.contains(next)) { - OrderedSetUtils.remove(graph, arrayIndexes, enumeration); - OrderedSetUtils.addAfter(graph, arrayIndexes, next, enumeration); +// Resource next = OrderedSetUtils.next(graph, arrayIndexes, enumeration); + Resource node = ListUtils.getNode(graph, arrayIndexes, enumeration); + Resource next = graph.getSingleObject(node, L0.List_Next); + if(!arrayIndexes.equals(next) && !toBeMoved.contains(graph.getPossibleObject(next, L0.List_Element))) { + ListUtils.swapWithNext(graph, arrayIndexes, enumeration); +// OrderedSetUtils.remove(graph, arrayIndexes, enumeration); +// OrderedSetUtils.addAfter(graph, arrayIndexes, next, enumeration); } } } @@ -317,9 +333,10 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg SysdynResource sr = SysdynResource.getInstance(graph); for(Resource variable : input) { - Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexes); + Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexesList); if(arrayIndexes != null) { - List enumerations = OrderedSetUtils.toList(graph, arrayIndexes); +// List enumerations = OrderedSetUtils.toList(graph, arrayIndexes); + List enumerations = ListUtils.toList(graph, arrayIndexes); List toBeRemoved = new ArrayList(); for(Integer index : selectedIndexes) { if(index < enumerations.size()) { @@ -330,7 +347,8 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg } for(Resource enumeration : toBeRemoved) - OrderedSetUtils.remove(graph, arrayIndexes, enumeration); +// OrderedSetUtils.remove(graph, arrayIndexes, enumeration); + ListUtils.removeElement(graph, arrayIndexes, enumeration); } } } 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 08be0f8b..84312521 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 @@ -11,6 +11,7 @@ *******************************************************************************/ package org.simantics.sysdyn.ui.properties; +import java.util.ArrayList; import java.util.HashSet; import java.util.List; @@ -43,8 +44,8 @@ import org.simantics.db.Resource; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.ReadRequest; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.NameUtils; -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; @@ -61,8 +62,8 @@ import org.simantics.sysdyn.ui.properties.widgets.arrays.ReplaceableIndexesWidge 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.AdaptionUtils; public class EnumerationTab extends LabelPropertyTabContributor implements Widget { @@ -160,7 +161,7 @@ public class EnumerationTab extends LabelPropertyTabContributor implements Widge @Override public void run(ReadGraph graph) throws DatabaseException { - enumerationIndexes = graph.getSingleObject(enumeration, SysdynResource.getInstance(graph).Enumeration_enumerationIndexes); + enumerationIndexes = graph.getSingleObject(enumeration, SysdynResource.getInstance(graph).Enumeration_enumerationIndexList); } }); } catch (DatabaseException e) { @@ -179,14 +180,18 @@ public class EnumerationTab extends LabelPropertyTabContributor implements Widge Layer0 l0 = Layer0.getInstance(graph); HashSet names = new HashSet(); - for(Resource r : OrderedSetUtils.toList(graph, enumerationIndexes)) { +// for(Resource r : OrderedSetUtils.toList(graph, enumerationIndexes)) { + for(Resource r : ListUtils.toList(graph, enumerationIndexes)) { names.add(NameUtils.getSafeName(graph, r)); } Resource ei = GraphUtils.create2(graph, sr.EnumerationIndex, l0.HasName, NameUtils.findFreshName(graph, "index", names, "")); - OrderedSetUtils.add(graph, enumerationIndexes, ei); +// OrderedSetUtils.add(graph, enumerationIndexes, ei); + ArrayList index = new ArrayList(); + index.add(ei); + ListUtils.insertBack(graph, enumerationIndexes, index); } }); } catch (DatabaseException e1) { @@ -218,7 +223,7 @@ public class EnumerationTab extends LabelPropertyTabContributor implements Widge @Override public void run(ReadGraph graph) throws DatabaseException { - enumerationIndexes = graph.getSingleObject(enumeration, SysdynResource.getInstance(graph).Enumeration_enumerationIndexes); + enumerationIndexes = graph.getSingleObject(enumeration, SysdynResource.getInstance(graph).Enumeration_enumerationIndexList); } }); } catch (DatabaseException e) { @@ -240,7 +245,8 @@ public class EnumerationTab extends LabelPropertyTabContributor implements Widge Resource r = AdaptionUtils.adaptToSingle(o, Resource.class); if(r == null) continue; - OrderedSetUtils.remove(graph, enumerationIndexes, r); +// OrderedSetUtils.remove(graph, enumerationIndexes, r); + ListUtils.removeElement(graph, enumerationIndexes, r); } } }); @@ -275,9 +281,13 @@ public class EnumerationTab extends LabelPropertyTabContributor implements Widge @Override public Boolean perform(ReadGraph graph) throws DatabaseException { + if(!graph.hasStatement(enumeration)) + return null; + SysdynResource sr = SysdynResource.getInstance(graph); - enumerationIndexes = graph.getSingleObject(enumeration, sr.Enumeration_enumerationIndexes); - List indexes = OrderedSetUtils.toList(graph, enumerationIndexes); + enumerationIndexes = graph.getSingleObject(enumeration, sr.Enumeration_enumerationIndexList); +// List indexes = OrderedSetUtils.toList(graph, enumerationIndexes); + List indexes = ListUtils.toList(graph, enumerationIndexes); for(Resource index : indexes) { Boolean show = graph.getPossibleRelatedValue(index, sr.EnumerationIndex_showEnumerationIndexInCharts, Bindings.BOOLEAN); if(!Boolean.TRUE.equals(show)) @@ -294,7 +304,8 @@ public class EnumerationTab extends LabelPropertyTabContributor implements Widge @Override public void run() { - showAll.getWidget().setSelection(result.booleanValue()); + if(result != null) + showAll.getWidget().setSelection(result.booleanValue()); } }); } @@ -324,7 +335,8 @@ public class EnumerationTab extends LabelPropertyTabContributor implements Widge @Override public void perform(WriteGraph graph) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); - List indexes = OrderedSetUtils.toList(graph, enumerationIndexes); +// List indexes = OrderedSetUtils.toList(graph, enumerationIndexes); + List indexes = ListUtils.toList(graph, enumerationIndexes); for(Resource index : indexes) { Boolean show = graph.getPossibleRelatedValue(index, sr.EnumerationIndex_showEnumerationIndexInCharts, Bindings.BOOLEAN); if(selected && !Boolean.TRUE.equals(show)) { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java index 7e57c1fc..ebda5b9c 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java @@ -11,7 +11,9 @@ *******************************************************************************/ package org.simantics.sysdyn.ui.properties; +import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -56,10 +58,11 @@ import org.simantics.db.VirtualGraph; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; import org.simantics.db.common.request.WriteResultRequest; +import org.simantics.db.common.utils.ListUtils; +import org.simantics.db.common.utils.NameUtils; 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.procedure.AsyncListener; import org.simantics.db.request.Read; @@ -76,8 +79,8 @@ import org.simantics.sysdyn.ui.properties.widgets.arrays.NameAndArrayRangeModify import org.simantics.sysdyn.ui.properties.widgets.expressions.ExpressionWidgetInput; 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.Pair; +import org.simantics.utils.ui.AdaptionUtils; /** * Tab for displaying equation information of a variable @@ -112,6 +115,9 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { @Override public Resource perform(ReadGraph graph) throws DatabaseException { + System.out.println(var.getURI(graph)); + System.out.println(NameUtils.getSafeName(graph, var.getRepresents(graph))); + return var.getRepresents(graph); } }); @@ -202,7 +208,7 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { @Override public Resource perform(ReadGraph graph) throws DatabaseException { - return (Resource)var.getPropertyValue(graph, Variables.REPRESENTS); + return var.getRepresents(graph); } }); } catch (DatabaseException e) { @@ -222,6 +228,8 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { @Override public Resource perform(ReadGraph graph) throws DatabaseException { + System.out.println(NameUtils.getSafeName(graph, variable, true)); + return getActiveExpression(graph, variable); } }); @@ -239,8 +247,9 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); Layer0 l0 = Layer0.getInstance(graph); - Resource expressions = OrderedSetUtils.create(graph, sr.Expressions); - graph.claim(variable, sr.Variable_expressions, expressions); +// Resource expressions = OrderedSetUtils.create(graph, sr.Expressions); + Resource expressions = ListUtils.create(graph, Collections.emptyList()); + graph.claim(variable, sr.Variable_expressionList, expressions); final Resource expression = graph.newResource(); if(graph.isInstanceOf(variable, sr.Auxiliary) || @@ -252,7 +261,11 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { graph.claim(expression, l0.InstanceOf, null, sr.StockExpression); graph.claimLiteral(expression, sr.StockExpression_initialEquation, ""); } - OrderedSetUtils.add(graph, expressions, expression); +// OrderedSetUtils.add(graph, expressions, expression); + ArrayList addition = new ArrayList(1); + addition.add(expression); + ListUtils.insertBack(graph, expressions, addition); + graph.claim(variable, l0.ConsistsOf, expression); VirtualGraphSupport support = graph.getService(VirtualGraphSupport.class); @@ -290,11 +303,12 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { @Override public Pair perform(ReadGraph graph) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); - Resource expressions = graph.getPossibleObject(variable, sr.Variable_expressions); + Resource expressions = graph.getPossibleObject(variable, sr.Variable_expressionList); if(expressions == null) { return new Pair(false, false); } - List expressionList = OrderedSetUtils.toList(graph, expressions); +// List expressionList = OrderedSetUtils.toList(graph, expressions); + List expressionList = ListUtils.toList(graph, expressions); if(expressionList.isEmpty()) { return new Pair(false, false); } @@ -431,7 +445,7 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { SysdynResource sr = SysdynResource.getInstance(graph); Layer0 l0 = Layer0.getInstance(graph); - Resource expressions = graph.getPossibleObject(input, sr.Variable_expressions); + Resource expressions = graph.getPossibleObject(input, sr.Variable_expressionList); if(expressions == null) { return; } @@ -448,7 +462,10 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { // If there was no active expression, create a normal expression graph.claim(newExpression, l0.InstanceOf, sr.NormalExpression); } - OrderedSetUtils.add(graph, expressions, newExpression); + //OrderedSetUtils.add(graph, expressions, newExpression); + ArrayList addition = new ArrayList(1); + addition.add(newExpression); + ListUtils.insertBack(graph, expressions, addition); graph.claim(input, l0.ConsistsOf, newExpression); } }); @@ -698,13 +715,16 @@ public class EquationTab extends LabelPropertyTabContributor implements Widget { */ private Resource getActiveExpression(ReadGraph graph, Resource variable) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); + System.out.println("Active expression for " + NameUtils.getSafeName(graph, variable)); Resource expression = graph.getPossibleObject(variable, sr.IndependentVariable_activeExpression); + System.out.println(" " + NameUtils.getSafeName(graph, expression)); if(expression == null) { - Resource expressions = graph.getPossibleObject(variable, sr.Variable_expressions); + Resource expressions = graph.getPossibleObject(variable, sr.Variable_expressionList); if(expressions == null) { return null; } - List expressionList = OrderedSetUtils.toList(graph, expressions); + //List expressionList = OrderedSetUtils.toList(graph, expressions); + List expressionList = ListUtils.toList(graph, expressions); if(expressionList.isEmpty()) { return null; } 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 1d5c8616..44967509 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 @@ -23,6 +23,7 @@ import org.simantics.browsing.ui.model.nodetypes.SpecialNodeType; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.common.request.ObjectsWithType; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.exception.ManyObjectsForFunctionalRelationException; @@ -183,10 +184,11 @@ public class ResourceSelectionProcessor implements SelectionProcessor expressionList = OrderedSetUtils.toList(backend, expressions); + Resource expressions = backend.getPossibleObject(r, sr.Variable_expressionList); + // List expressionList = OrderedSetUtils.toList(backend, expressions); + List expressionList = ListUtils.toList(backend, expressions); if(expressionList.isEmpty()) { System.err.println("expressionList is empty for " + r); return Collections.emptyList(); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ArrayExpressionCombo.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ArrayExpressionCombo.java index bab2c395..b27d96a0 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ArrayExpressionCombo.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ArrayExpressionCombo.java @@ -12,8 +12,8 @@ import org.simantics.browsing.ui.swt.widgets.impl.ReadFactoryImpl; import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.NameUtils; -import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.management.ISessionContext; import org.simantics.db.procedure.Listener; @@ -144,21 +144,22 @@ public class ArrayExpressionCombo extends TrackedCombo { private ArrayList getExpressions(ReadGraph graph, Resource variable) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); - Resource hasExpressions = graph.getPossibleObject(variable, sr.Variable_expressions); + Resource hasExpressions = graph.getPossibleObject(variable, sr.Variable_expressionList); if(hasExpressions == null) return new ArrayList(); else - return new ArrayList(OrderedSetUtils.toList(graph, hasExpressions)); + return new ArrayList(ListUtils.toList(graph, hasExpressions)); } public static String getDefaultRange(ReadGraph graph, Resource variable) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); - Resource hasArrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexes); + Resource hasArrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexesList); if(hasArrayIndexes == null) return null; - Iterator iterator = OrderedSetUtils.iterator(graph, hasArrayIndexes); +// Iterator iterator = OrderedSetUtils.iterator(graph, hasArrayIndexes); + Iterator iterator = ListUtils.toList(graph, hasArrayIndexes).iterator(); if(!iterator.hasNext()) return null; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java index 0b1c36cf..95a6e95b 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java @@ -13,37 +13,26 @@ package org.simantics.sysdyn.ui.properties.widgets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.Collection; import java.util.HashMap; import java.util.Map; -import java.util.concurrent.CopyOnWriteArrayList; import javax.swing.Timer; -import org.eclipse.jface.fieldassist.SimpleContentProposalProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.SWT; import org.eclipse.swt.custom.VerifyKeyListener; import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.graphics.Color; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Table; -import org.eclipse.swt.widgets.TableItem; import org.simantics.browsing.ui.swt.widgets.impl.Widget; import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; -import org.simantics.db.AsyncReadGraph; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; -import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; import org.simantics.db.management.ISessionContext; -import org.simantics.db.procedure.AsyncListener; import org.simantics.db.request.Read; import org.simantics.layer0.Layer0; -import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.ui.properties.widgets.ExpressionTypes.ExpressionType; import org.simantics.sysdyn.ui.properties.widgets.expressions.AuxiliaryExpression; import org.simantics.sysdyn.ui.properties.widgets.expressions.ConstantExpression; @@ -55,12 +44,9 @@ import org.simantics.sysdyn.ui.properties.widgets.expressions.LookupExpression; import org.simantics.sysdyn.ui.properties.widgets.expressions.ParameterExpression; import org.simantics.sysdyn.ui.properties.widgets.expressions.StockExpression; import org.simantics.sysdyn.ui.properties.widgets.expressions.WithLookupExpression; -import org.simantics.sysdyn.ui.trend.chart.properties.VariableProposalProvider; import org.simantics.sysdyn.ui.utils.ExpressionUtils; -import org.simantics.sysdyn.ui.validation.ValidationUtils; import org.simantics.ui.SimanticsUI; -import org.simantics.ui.utils.AdaptionUtils; -import org.simantics.utils.ui.ISelectionUtils; +import org.simantics.utils.ui.AdaptionUtils; /** * Widget for displaying an expression. Widget creates the IExpression for displaying @@ -240,13 +226,8 @@ public class ExpressionWidget implements Widget { @Override public Resource perform(ReadGraph graph) throws DatabaseException { - SysdynResource sr = SysdynResource.getInstance(graph); Layer0 l0 = Layer0.getInstance(graph); - Collection expressionLists = OrderedSetUtils.getOwnerLists(graph, expr, l0.OrderedSet); - Resource variable = null; - if(expressionLists.size() == 1) - variable = graph.getPossibleObject(expressionLists.iterator().next(), sr.Variable_expressions_Inverse); - return variable; + return graph.getPossibleObject(expr, l0.PartOf); } }); // Validate the variable diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/AvailableEnumerations.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/AvailableEnumerations.java index ea785c0a..76a46f00 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/AvailableEnumerations.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/AvailableEnumerations.java @@ -46,7 +46,7 @@ public class AvailableEnumerations extends ViewpointContributorImpl { SysdynResource sr = SysdynResource.getInstance(graph); if(!graph.isInstanceOf(input, sr.Enumeration)) return null; - Resource enumerationIndexList = graph.getPossibleObject(input, sr.Enumeration_enumerationIndexes); + Resource enumerationIndexList = graph.getPossibleObject(input, sr.Enumeration_enumerationIndexList); if(enumerationIndexList == null) return null; ArrayList> result = new ArrayList>(); - for(Resource r : OrderedSetUtils.toList(graph, enumerationIndexList)) { +// for(Resource r : OrderedSetUtils.toList(graph, enumerationIndexList)) { + for(Resource r : ListUtils.toList(graph, enumerationIndexList)) { result.add(new EnumerationIndexNode(r)); } return result; 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 801b4853..b8c367fb 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 @@ -1,14 +1,14 @@ package org.simantics.sysdyn.ui.properties.widgets.arrays; import java.util.HashMap; -import java.util.ListIterator; +import java.util.Iterator; 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.ListUtils; 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; @@ -25,8 +25,9 @@ public class EnumerationLabeler extends ColumnLabelerContributorImpl indexes = OrderedSetUtils.iterator(graph, enumerationIndexes); + Resource enumerationIndexes = graph.getPossibleObject(input.data, sr.Enumeration_enumerationIndexList); +// ListIterator indexes = OrderedSetUtils.iterator(graph, enumerationIndexes); + Iterator indexes = ListUtils.toList(graph, enumerationIndexes).iterator(); StringBuilder sb = new StringBuilder(); sb.append("["); while(indexes.hasNext()) { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/UsedEnumerations.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/UsedEnumerations.java index 681b9ef2..d3a6059f 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/UsedEnumerations.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/arrays/UsedEnumerations.java @@ -10,7 +10,7 @@ import org.simantics.browsing.ui.graph.impl.contributor.viewpoint.ViewpointContr import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.common.ResourceArray; -import org.simantics.db.common.utils.OrderedSetUtils; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.sysdyn.SysdynResource; @@ -36,9 +36,10 @@ public class UsedEnumerations extends ViewpointContributorImpl { */ ArrayList> variableEnumerations = new ArrayList>(); for(Resource variable : selection) { - Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexes); + Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexesList); if(arrayIndexes != null) { - variableEnumerations.add(OrderedSetUtils.toList(graph, arrayIndexes)); +// variableEnumerations.add(OrderedSetUtils.toList(graph, arrayIndexes)); + variableEnumerations.add(ListUtils.toList(graph, arrayIndexes)); } else { variableEnumerations.add(new ArrayList()); } @@ -110,6 +111,6 @@ public class UsedEnumerations extends ViewpointContributorImpl { @Override public String getViewpointId() { - return "Available enumerations"; + return "Used enumerations"; } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java index 062d452a..b469b00d 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java @@ -12,7 +12,6 @@ package org.simantics.sysdyn.ui.properties.widgets.expressions; import java.util.Arrays; -import java.util.Collection; import java.util.List; import java.util.Map; @@ -32,12 +31,12 @@ import org.eclipse.swt.widgets.Table; import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; -import org.simantics.db.VirtualGraph; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; -import org.simantics.db.common.utils.OrderedSetUtils; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; +import org.simantics.db.service.VirtualGraphSupport; import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.sysdyn.SysdynResource; @@ -155,24 +154,36 @@ public class BasicExpression implements IExpression { // If the current expression type is different than the target expression type, create a new expression if(!g.isInstanceOf(expression, expressionType)) { - Collection ownerLists = OrderedSetUtils.getOwnerLists(g, expression, l0.OrderedSet); - if(ownerLists.size() != 1) - return; - Resource ownerList = ownerLists.iterator().next(); + final Resource newExpression = GraphUtils.create2(g, expressionType, sr.Expression_equation, currentText); String arrayRange = g.getPossibleRelatedValue(expression, sr.Expression_arrayRange, Bindings.STRING); if(arrayRange != null) g.claimLiteral(newExpression, sr.Expression_arrayRange, arrayRange); - final Resource variable = g.getSingleObject(ownerList, sr.Variable_expressions_Inverse); - OrderedSetUtils.replace(g, ownerList, expression, newExpression); +// Collection ownerLists = OrderedSetUtils.getOwnerLists(g, expression, l0.OrderedSet); +// if(ownerLists.size() != 1) +// return; +// Resource ownerList = ownerLists.iterator().next(); +// +// final Resource variable = g.getSingleObject(ownerList, sr.Variable_expressions_Inverse); + final Resource variable = g.getPossibleObject(expression, l0.PartOf); + if(variable == null) + return; + Resource ownerList = g.getPossibleObject(variable, sr.Variable_expressionList); + if(ownerList == null) + return; + +// OrderedSetUtils.replace(g, ownerList, expression, newExpression); + ListUtils.replace(g, ownerList, expression, newExpression); + g.deny(expression, l0.PartOf); + g.claim(newExpression, l0.PartOf, variable); - VirtualGraph runtime = g.getService(VirtualGraph.class); - g.syncRequest(new WriteRequest(runtime) { + VirtualGraphSupport support = g.getService(VirtualGraphSupport.class); + g.syncRequest(new WriteRequest(support.getWorkspacePersistent("expressions")) { @Override public void perform(WriteGraph graph) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/DelayExpression.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/DelayExpression.java index ab5f6749..ce8cdb81 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/DelayExpression.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/DelayExpression.java @@ -39,7 +39,7 @@ import org.simantics.db.Resource; import org.simantics.db.VirtualGraph; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; -import org.simantics.db.common.utils.OrderedSetUtils; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; import org.simantics.layer0.Layer0; @@ -243,14 +243,17 @@ public class DelayExpression implements IExpression { if(!g.isInstanceOf(expression, sr.DelayExpression)) { // Create a new DelayExpression, if the old expression was something else - Resource ownerList = OrderedSetUtils.getSingleOwnerList(g, expression); +// Resource ownerList = OrderedSetUtils.getSingleOwnerList(g, expression); final Resource newExpression = GraphUtils.create2(g, sr.DelayExpression); String arrayRange = g.getPossibleRelatedValue(expression, sr.Expression_arrayRange, Bindings.STRING); if(arrayRange != null) g.claimLiteral(newExpression, sr.Expression_arrayRange, arrayRange); - final Resource variable = g.getSingleObject(ownerList, sr.Variable_expressions_Inverse); - OrderedSetUtils.replace(g, ownerList, expression, newExpression); +// final Resource variable = g.getSingleObject(ownerList, sr.Variable_expressions_Inverse); + final Resource variable = g.getPossibleObject(expression, l0.PartOf); + Resource ownerList = g.getPossibleObject(expression, sr.Variable_expressionList); +// OrderedSetUtils.replace(g, ownerList, expression, newExpression); + ListUtils.replace(g, ownerList, expression, newExpression); g.deny(expression, l0.PartOf); g.claim(newExpression, l0.PartOf, variable); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java index 0e3e7f5d..f34ca73a 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java @@ -33,8 +33,9 @@ import org.simantics.db.ReadGraph; 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.common.utils.ListUtils; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.util.RemoverUtil; import org.simantics.db.request.Read; import org.simantics.layer0.Layer0; import org.simantics.sysdyn.SysdynResource; @@ -142,18 +143,26 @@ public class StockExpression implements IExpression { Layer0 l0 = Layer0.getInstance(g); if(!g.isInstanceOf(expression, sr.StockExpression)) { - Resource expressionList = g.getSingleObject(expression, l0.HasNext); +// Resource expressionList = g.getSingleObject(expression, l0.HasNext); + Resource variable = g.getPossibleObject(expression, l0.PartOf); + Resource expressionList = g.getPossibleObject(variable, sr.Variable_expressionList); Resource temp = g.newResource(); - OrderedSetUtils.replace(g, expressionList, expression, temp); +// OrderedSetUtils.replace(g, expressionList, expression, temp); + ListUtils.replace(g, expressionList, expression, temp); + for(Resource predicate : g.getPredicates(expression)) { - g.deny(expression, predicate); + g.deny(expression, predicate); } g.claim(expression, l0.InstanceOf, null, sr.StockExpression); - - Resource variable = g.getSingleObject(expressionList, sr.Variable_expressions_Inverse); - OrderedSetUtils.replace(g, expressionList, temp, expression); - g.deny(expression, l0.PartOf); - g.claim(expression, l0.PartOf, variable); + +// Resource variable = g.getSingleObject(expressionList, sr.Variable_expressions_Inverse); +// OrderedSetUtils.replace(g, expressionList, temp, expression); + ListUtils.replace(g, expressionList, temp, expression); + +// g.deny(expression, l0.PartOf); // Should be temp? + RemoverUtil.remove(g, temp); + + g.claim(expression, l0.PartOf, variable); } g.claimLiteral(expression, sr.StockExpression_initialEquation, currentText); } @@ -186,8 +195,9 @@ public class StockExpression implements IExpression { Layer0 l0 = Layer0.getInstance(graph); // find the variable - Resource expressionList = OrderedSetUtils.getSingleOwnerList(graph, expression); - Resource variable = graph.getPossibleObject(expressionList, sr.Variable_expressions_Inverse); +// Resource expressionList = OrderedSetUtils.getSingleOwnerList(graph, expression); +// Resource variable = graph.getPossibleObject(expressionList, sr.Variable_expressions_Inverse); + Resource variable = graph.getPossibleObject(expression, l0.PartOf); if(variable == null) return ""; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java index 8da88f5d..67d51338 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java @@ -54,7 +54,7 @@ import org.simantics.db.Resource; import org.simantics.db.VirtualGraph; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; -import org.simantics.db.common.utils.OrderedSetUtils; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.procedure.Listener; import org.simantics.db.request.Read; @@ -273,7 +273,7 @@ public class WithLookupExpression implements IExpression { if(!g.isInstanceOf(expr, sr.WithLookupExpression)) { - Resource ownerList = OrderedSetUtils.getSingleOwnerList(g, expression); +// Resource ownerList = OrderedSetUtils.getSingleOwnerList(g, expression); final Resource newExpression = GraphUtils.create2(g, sr.WithLookupExpression, sr.WithLookupExpression_minX, 0.0, sr.WithLookupExpression_maxX, 10.0, @@ -283,8 +283,14 @@ public class WithLookupExpression implements IExpression { if(arrayRange != null) g.claimLiteral(newExpression, sr.Expression_arrayRange, arrayRange); - final Resource variable = g.getSingleObject(ownerList, sr.Variable_expressions_Inverse); - OrderedSetUtils.replace(g, ownerList, expression, newExpression); +// final Resource variable = g.getSingleObject(ownerList, sr.Variable_expressions_Inverse); +// OrderedSetUtils.replace(g, ownerList, expression, newExpression); + final Resource variable = g.getSingleObject(expression, l0.PartOf); + Resource expressions = g.getPossibleObject(variable, sr.Variable_expressionList); + Resource node = ListUtils.getNode(g, expressions, expression); + g.deny(node, l0.List_Element); + g.claim(node, l0.List_Element, newExpression); + g.deny(expression, l0.PartOf); g.claim(newExpression, l0.PartOf, variable); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/modules/ModuleParameterOverrideUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/modules/ModuleParameterOverrideUtils.java index ee6fad6b..b4d5521e 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/modules/ModuleParameterOverrideUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/modules/ModuleParameterOverrideUtils.java @@ -16,8 +16,8 @@ import java.util.List; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.common.request.ObjectsWithType; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.NameUtils; -import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.Layer0; import org.simantics.sysdyn.SysdynResource; @@ -42,7 +42,7 @@ public class ModuleParameterOverrideUtils { public static String getParameterExpression(IndependentVariable variable) throws DatabaseException { String result = null; try { - result = variable.getExpressions().getExpressions().get(0).getExpression(variable); + result = variable.getExpressions().get(0).getExpression(variable); if(result.contains("/* Actual value read from init file */")) result = result.substring(0, result.indexOf("/* Actual value read from init file */")); } catch (NullPointerException e) { @@ -89,9 +89,9 @@ public class ModuleParameterOverrideUtils { public static boolean hasParameterExpression(ReadGraph graph, Resource variable) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); boolean result = false; - Resource expressionsResource = graph.getPossibleObject(variable, sr.Variable_expressions); + Resource expressionsResource = graph.getPossibleObject(variable, sr.Variable_expressionList); if(expressionsResource != null) { - List expressions = OrderedSetUtils.toList(graph, expressionsResource); + List expressions = ListUtils.toList(graph, expressionsResource); if(expressions.size() == 1 && graph.isInstanceOf(expressions.get(0), sr.ParameterExpression)) { result = true; } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/chart/properties/RangeComposite.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/chart/properties/RangeComposite.java index 7ccce029..8e0b1c55 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/chart/properties/RangeComposite.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/chart/properties/RangeComposite.java @@ -36,8 +36,8 @@ import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.NameUtils; -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; @@ -48,10 +48,10 @@ import org.simantics.layer0.Layer0; import org.simantics.sysdyn.JFreeChartResource; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.ui.trend.chart.ChartUtils; -import org.simantics.ui.utils.AdaptionUtils; import org.simantics.utils.RunnableWithObject; import org.simantics.utils.datastructures.Quad; import org.simantics.utils.datastructures.Triple; +import org.simantics.utils.ui.AdaptionUtils; /** * Composite for range controls in chart series properties @@ -123,10 +123,11 @@ public class RangeComposite extends Composite implements Widget { Resource variable = v.getRepresents(graph); // Return the enumerations assigned to that variable - Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexes); + Resource arrayIndexes = graph.getPossibleObject(variable, sr.Variable_arrayIndexesList); if(arrayIndexes != null) { LinkedHashMap result = new LinkedHashMap(); - for(Resource enumeration : OrderedSetUtils.toList(graph, arrayIndexes)) { +// for(Resource enumeration : OrderedSetUtils.toList(graph, arrayIndexes)) { + for(Resource enumeration : ListUtils.toList(graph, arrayIndexes)) { // Find possible redeclarations for enumeration Resource redeclaration = enumeration; @@ -298,8 +299,9 @@ public class RangeComposite extends Composite implements Widget { public Map perform(ReadGraph graph, Resource series) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); LinkedHashMap result = new LinkedHashMap(); - Resource enumerationIndexes = graph.getPossibleObject(enumeration, sr.Enumeration_enumerationIndexes); - List indexes = OrderedSetUtils.toList(graph, enumerationIndexes); + Resource enumerationIndexes = graph.getPossibleObject(enumeration, sr.Enumeration_enumerationIndexList); +// List indexes = OrderedSetUtils.toList(graph, enumerationIndexes); + List indexes = ListUtils.toList(graph, enumerationIndexes); // First add "All" and "Sum", then all of the enumeration indexes in order result.put("All", "All"); result.put("Sum", "Sum"); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ArrayVariableUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ArrayVariableUtils.java index 88cc7229..ef49ba46 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ArrayVariableUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ArrayVariableUtils.java @@ -33,8 +33,8 @@ public class ArrayVariableUtils { Map result = new HashMap(); // Not an array variable if(variable.getArrayIndexes() == null || - variable.getArrayIndexes().getEnumerations() == null || - variable.getArrayIndexes().getEnumerations().size() == 0) { + variable.getArrayIndexes() == null || + variable.getArrayIndexes().size() == 0) { for(int i = 0; i < elements.length ; i++) { error = new SyntaxError(); error.setMessage("Variable is not an array variable"); @@ -44,7 +44,7 @@ public class ArrayVariableUtils { return result; } - ArrayList enumerations = variable.getArrayIndexes().getEnumerations(); + ArrayList enumerations = variable.getArrayIndexes(); // Too many elements if(elements.length > enumerations.size()) { error = new SyntaxError(); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/VariableNameUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/VariableNameUtils.java index 9438d48c..b3f4cc39 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/VariableNameUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/VariableNameUtils.java @@ -21,6 +21,7 @@ import java.util.regex.Pattern; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; @@ -57,9 +58,10 @@ public class VariableNameUtils { Resource configuration = graph.getSingleObject(variable, l0.PartOf); for(Resource r : graph.getObjects(configuration, l0.ConsistsOf)) { if(graph.isInstanceOf(r, sr.IndependentVariable)) { - Resource expressions = graph.getPossibleObject(r, sr.Variable_expressions); + Resource expressions = graph.getPossibleObject(r, sr.Variable_expressionList); if(expressions == null) continue; - List expressionList = OrderedSetUtils.toList(graph, expressions); +// List expressionList = OrderedSetUtils.toList(graph, expressions); + List expressionList = ListUtils.toList(graph, expressions); for(Resource s : expressionList) { for(Resource p : graph.getPredicates(s)) { Resource o = graph.getPossibleObject(s, p); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/imports/ImportUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/imports/ImportUtils.java index 82416ea8..d69272b1 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/imports/ImportUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/imports/ImportUtils.java @@ -146,7 +146,7 @@ public class ImportUtils { Object result = ImportUtils.readFile(path, handlers); if(result == null || !(result instanceof Resource)) { - return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Import model failed: Model could not be imported.", null); + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Import model failed: File could not be read.", null); } else { try { final Resource ModelRoot = (Resource) result; @@ -224,7 +224,7 @@ public class ImportUtils { } } } catch(Throwable t) { - return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Import model failed: Model could not be imported.", t); + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Batch validate failed: Model could not be imported.", t); } worked(monitor, 1); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/imports/SysdynImportFormatHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/imports/SysdynImportFormatHandler.java index 05d02714..713041e2 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/imports/SysdynImportFormatHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/imports/SysdynImportFormatHandler.java @@ -21,7 +21,6 @@ import org.simantics.databoard.container.DataFormatException; import org.simantics.databoard.container.FormatHandler; import org.simantics.db.Resource; import org.simantics.db.Session; -import org.simantics.db.layer0.adapter.impl.DefaultPasteHandler; import org.simantics.db.layer0.adapter.impl.DefaultPasteImportAdvisor; import org.simantics.db.layer0.migration.MigrationState; import org.simantics.db.layer0.migration.MigrationStateKeys; @@ -89,15 +88,20 @@ public class SysdynImportFormatHandler implements FormatHandler { MigrationState state = MigrationUtils.newState(); state.setProperty(MigrationStateKeys.CURRENT_TG, tg); step.applyTo(session, state); - tg = state.getProperty(MigrationStateKeys.CURRENT_TG); +// tg = state.getProperty(MigrationStateKeys.CURRENT_TG); worked(1); subTask("Import"); - DefaultPasteHandler.defaultExecute(tg, parent, ia); +// DefaultPasteHandler.defaultExecute(tg, parent, ia); + MigrationUtils.importTo(session, state, parent, ia); worked(1); - return ia.getRoot(); + Resource result = state.getProperty(MigrationStateKeys.CURRENT_RESOURCE); + if(result == null) + result = ia.getRoot(); + + return result; } catch (Exception e) { return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Import module failed", e); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/EnumerationFunction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/EnumerationFunction.java index 21e9bb95..bffc0331 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/EnumerationFunction.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/EnumerationFunction.java @@ -17,7 +17,7 @@ import java.util.List; import org.simantics.db.Issue; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; -import org.simantics.db.common.utils.OrderedSetUtils; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; import org.simantics.issues.common.StandardIssue; @@ -45,8 +45,9 @@ public class EnumerationFunction { boolean noIndexes = false; try { - Resource indexList = graph.getPossibleObject(component, sr.Enumeration_enumerationIndexes); - List indexes = OrderedSetUtils.toList(graph, indexList); + Resource indexList = graph.getPossibleObject(component, sr.Enumeration_enumerationIndexList); +// List indexes = OrderedSetUtils.toList(graph, indexList); + List indexes = ListUtils.toList(graph, indexList); if(indexes.size() == 0) noIndexes = true; } catch (DatabaseException e) { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/ValidationUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/ValidationUtils.java index 5088e5b3..c862ed63 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/ValidationUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/ValidationUtils.java @@ -20,6 +20,7 @@ import java.util.List; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Statement; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.NameUtils; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; @@ -103,9 +104,10 @@ public class ValidationUtils { */ public static List getExpressions(ReadGraph graph, Resource r) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); - Resource hasExpressions = graph.getPossibleObject(r, sr.Variable_expressions); + Resource hasExpressions = graph.getPossibleObject(r, sr.Variable_expressionList); if(hasExpressions != null) - return OrderedSetUtils.toList(graph, hasExpressions); +// return OrderedSetUtils.toList(graph, hasExpressions); + return ListUtils.toList(graph, hasExpressions); else return null; } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/VariableRVIUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/VariableRVIUtils.java index 09f7f5d7..0f24cc58 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/VariableRVIUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/VariableRVIUtils.java @@ -20,7 +20,7 @@ import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.common.request.ObjectsWithType; -import org.simantics.db.common.utils.OrderedSetUtils; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; import org.simantics.db.layer0.variable.Variables; @@ -79,10 +79,10 @@ public class VariableRVIUtils { private static void traverseIndexes(ReadGraph g, String rvi, HashMap rvis, List arrayIndexes, int currentIndex, String indexesSoFar, String indexNamesSoFar) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(g); // Enumeration indexes of the current enumeration (e.g. the first EnumIndexes in Var[EnumIndexes, EnumIndexes, EnumIndexes]) - Resource enumerationIndexes = g.getPossibleObject(arrayIndexes.get(currentIndex), sr.Enumeration_enumerationIndexes); + Resource enumerationIndexes = g.getPossibleObject(arrayIndexes.get(currentIndex), sr.Enumeration_enumerationIndexList); if(enumerationIndexes == null) return; - List indexes = OrderedSetUtils.toList(g, enumerationIndexes); + List indexes = ListUtils.toList(g, enumerationIndexes); for(int i = 0; i < indexes.size(); i++) { Boolean b = g.getPossibleRelatedValue(indexes.get(i), sr.EnumerationIndex_showEnumerationIndexInCharts, Bindings.BOOLEAN); // If this index is not wanted to be shown in charts, the recursion does not go any further and rvis.put() is not called for this enumeration @@ -166,13 +166,13 @@ public class VariableRVIUtils { Resource r = variable.getRepresents(graph); - Resource arrayIndexes = graph.getPossibleObject(r, sr.Variable_arrayIndexes); + Resource arrayIndexes = graph.getPossibleObject(r, sr.Variable_arrayIndexesList); if(arrayIndexes == null) { // If variable is single-dimensional, use the same rvi rvis.put(rvi, rvi); } else { // If variable is multidimensional, get all indexes that are active and add them to rvis-map - List arrayIndexList= OrderedSetUtils.toList(graph, arrayIndexes); + List arrayIndexList = ListUtils.toList(graph, arrayIndexes); resolveActiveArrayIndexes(graph, variable, arrayIndexList); if(arrayIndexList.size() > 0) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java index 4b74e5f5..b5c5e6e0 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java @@ -468,8 +468,8 @@ public class SysdynModel implements IMappingListener, IModel, VariableSubscripti } else if (element instanceof IndependentVariable) { IndependentVariable variable = (IndependentVariable) element; //FIXME: more general solution for finding out if the variable is a parameter - if(variable != null && variable.getExpressions() != null && variable.getExpressions().getExpressions() != null && variable.getExpressions().getExpressions().get(0) != null) { - IExpression expression = variable.getExpressions().getExpressions().get(0); + if(variable != null && variable.getExpressions() != null && variable.getExpressions() != null && variable.getExpressions().get(0) != null) { + IExpression expression = variable.getExpressions().get(0); if (expression instanceof ParameterExpression) { Double value = ((ParameterExpression)expression).getValue(); if(value != null) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Subscript.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Subscript.java index a0087d4e..5be6073e 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Subscript.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Subscript.java @@ -11,9 +11,11 @@ *******************************************************************************/ package org.simantics.sysdyn.mdlImport.mdlElements; +import java.util.ArrayList; + import org.simantics.db.Resource; import org.simantics.db.WriteGraph; -import org.simantics.db.common.utils.OrderedSetUtils; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; @@ -38,22 +40,21 @@ public class Subscript extends Variable { if(!graph.isInstanceOf(parent, sr.Configuration)) return; Layer0 l0 = Layer0.getInstance(graph); - Resource enumerationIndexes = OrderedSetUtils.create(graph, sr.EnumerationIndexes); - + ArrayList enumerationIndexes = new ArrayList(); if(expressions != null && expressions.get(0) != null) { String[] indexes = expressions.get(0).getExpression().split(","); for(String s : indexes) { Resource ei = GraphUtils.create2(graph, sr.EnumerationIndex, l0.HasName, s.trim()); - OrderedSetUtils.add(graph, enumerationIndexes, ei); + enumerationIndexes.add(ei); } } Resource enumeration = GraphUtils.create2(graph, sr.Enumeration, l0.HasName, this.getName(), - sr.Enumeration_enumerationIndexes, enumerationIndexes); + sr.Enumeration_enumerationIndexList, ListUtils.create(graph, enumerationIndexes)); graph.claim(parent, l0.ConsistsOf, enumeration); diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Variable.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Variable.java index 02c5f706..ad27b79b 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Variable.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Variable.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; +import org.simantics.db.common.utils.ListUtils; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.diagram.stubs.DiagramResource; @@ -44,8 +45,6 @@ public abstract class Variable extends Element { if(diagram == null) return; - Resource expressionList = OrderedSetUtils.create(graph, sr.Expressions); - // Make sure at least one expression exist if(getExpressions().isEmpty()) { Expression e = new Expression(); @@ -53,15 +52,12 @@ public abstract class Variable extends Element { getExpressions().add(e); } - Resource arrayIndexList = OrderedSetUtils.create(graph, sr.ArrayIndexes); - - Resource variable = GraphUtils.create2(graph, variableType, - l0.HasName, ImportUtils.escapeName(name), - sr.Variable_expressions, expressionList); + l0.HasName, ImportUtils.escapeName(name)); graph.claim(variable, mr.Mapped, variable); + ArrayList expressions = new ArrayList(); for(Expression e : getExpressions()) { // Get expression from the variable. They have different types @@ -70,16 +66,18 @@ public abstract class Variable extends Element { if(e.getRange() != null) { graph.claimLiteral(expression, sr.Expression_arrayRange, "[" + e.getRange().trim() + "]"); } - OrderedSetUtils.add(graph, expressionList, expression); + expressions.add(expression); graph.claim(variable, l0.ConsistsOf, expression); } + graph.claim(variable, sr.Variable_expressionList, ListUtils.create(graph, expressions)); if(subscripts != null) { + ArrayList arrayIndexes = new ArrayList(); for(Subscript sub : subscripts) { if(sub.getResource() != null) - OrderedSetUtils.add(graph, arrayIndexList, sub.getResource()); + arrayIndexes.add(sub.getResource()); } - graph.claim(variable, sr.Variable_arrayIndexes, arrayIndexList); + graph.claim(variable, sr.Variable_arrayIndexesList, ListUtils.create(graph, arrayIndexes)); } if(units != null && units.length() > 0) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/ArrayIndexes.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/ArrayIndexes.java deleted file mode 100644 index 869ff09e..00000000 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/ArrayIndexes.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.simantics.sysdyn.representation; - -import java.util.ArrayList; - -import org.simantics.objmap.annotations.GraphType; -import org.simantics.objmap.annotations.RelatedOrderedSetElements; -import org.simantics.sysdyn.SysdynResource; - -@GraphType(SysdynResource.URIs.ArrayIndexes) -public class ArrayIndexes { - - @RelatedOrderedSetElements - private ArrayList enumerations = new ArrayList(); - - public ArrayList getEnumerations() { - return enumerations; - } - -} 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 51996a19..32a73ccd 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Enumeration.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Enumeration.java @@ -14,8 +14,8 @@ package org.simantics.sysdyn.representation; import java.util.ArrayList; import org.simantics.objmap.annotations.GraphType; -import org.simantics.objmap.annotations.RelatedElement; import org.simantics.objmap.annotations.RelatedElements; +import org.simantics.objmap.annotations.RelatedListElements; import org.simantics.objmap.annotations.RelatedValue; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid; @@ -23,8 +23,8 @@ import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid; @GraphType(SysdynResource.URIs.Enumeration) public class Enumeration extends Variable { - @RelatedElement(SysdynResource.URIs.Enumeration_enumerationIndexes) - private EnumerationIndexes enumerationIndexes; + @RelatedListElements(SysdynResource.URIs.Enumeration_enumerationIndexList) + private ArrayList enumerationIndexes = new ArrayList(); @RelatedValue(SysdynResource.URIs.Enumeration_isReplaceable) private Boolean isReplaceable; @@ -53,7 +53,7 @@ public class Enumeration extends Variable { } public ArrayList getEnumerationIndexes() { - return enumerationIndexes.getEnumerationIndexes(); + return enumerationIndexes; } public boolean isReplaceable() { diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/EnumerationIndexes.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/EnumerationIndexes.java deleted file mode 100644 index fa7eca93..00000000 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/EnumerationIndexes.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.simantics.sysdyn.representation; - -import java.util.ArrayList; - -import org.simantics.objmap.annotations.GraphType; -import org.simantics.objmap.annotations.RelatedOrderedSetElements; -import org.simantics.sysdyn.SysdynResource; - -@GraphType(SysdynResource.URIs.EnumerationIndexes) -public class EnumerationIndexes { - - @RelatedOrderedSetElements - private ArrayList enumerationIndexes = new ArrayList(); - - public ArrayList getEnumerationIndexes() { - return enumerationIndexes; - } -} diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IndependentVariable.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IndependentVariable.java index c2975cb7..bf4f2ad7 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IndependentVariable.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IndependentVariable.java @@ -50,7 +50,7 @@ public abstract class IndependentVariable extends Variable { // [= expression] if(variability == Variability.PARAMETER || variability == Variability.CONSTANT) { // parameters and constants are guaranteed to have only one expression - String equation = FormatUtils.formatExpressionForModelica(this, getExpressions().getExpressions().get(0).getExpression(this)); + String equation = FormatUtils.formatExpressionForModelica(this, getExpressions().get(0).getExpression(this)); sb.append(" = " + equation); } @@ -60,7 +60,7 @@ public abstract class IndependentVariable extends Variable { // Possible additions to expressions. e.g. helper classes and variables if(getExpressions() != null) { String addition; - for(IExpression e : getExpressions().getExpressions()) { + for(IExpression e : getExpressions()) { addition = e.getDeclarationAddition(this); if(addition != null) sb.append(addition); @@ -77,11 +77,7 @@ public abstract class IndependentVariable extends Variable { * @return Range of this variable, if it is an array variable. Empty string otherwise. */ public String getRange() { - ArrayIndexes ai = getArrayIndexes(); - ArrayList enumerations = null; - if(ai != null) - enumerations = ai.getEnumerations(); - + ArrayList enumerations = getArrayIndexes(); String range = ""; if(enumerations != null && enumerations.size() > 0) { StringBuilder sb = new StringBuilder(); @@ -106,7 +102,7 @@ public abstract class IndependentVariable extends Variable { public String getInitialEquation() { StringBuilder sb = new StringBuilder(); - for(IExpression expression : expressions.getExpressions()) { + for(IExpression expression : getExpressions()) { String initialEquation = expression.getInitialEquation(this); if(initialEquation != null) sb.append(initialEquation); @@ -137,11 +133,8 @@ public abstract class IndependentVariable extends Variable { if(this.expressions == null) return null; - ArrayList expressions = this.expressions.getExpressions(); - ArrayIndexes ai = this.getArrayIndexes(); - ArrayList enumerations = null; - if(ai != null) - enumerations = ai.getEnumerations(); + ArrayList expressions = getExpressions(); + ArrayList enumerations = getArrayIndexes(); IExpression firstExpression = expressions.get(0); if(enumerations == null || enumerations.size() < 1) { if(firstExpression == null) 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 f3e10ac9..97de3b0f 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Input.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Input.java @@ -50,14 +50,14 @@ public class Input extends Variable { * @return Default input value. */ public String getDefaultInputValue(String inModule) { - if( getArrayIndexes() == null || getArrayIndexes().getEnumerations().isEmpty()) { + if( getArrayIndexes() == null || getArrayIndexes().isEmpty()) { return defaultInputValue.toString(); } else { StringBuilder sb = new StringBuilder(); sb.append("fill("); sb.append(defaultInputValue); sb.append(", "); - Iterator i = getArrayIndexes().getEnumerations().iterator(); + Iterator i = getArrayIndexes().iterator(); while(i.hasNext()) { Enumeration e = i.next(); sb.append((inModule != null && !inModule.isEmpty() ? inModule + "." : "") + e.getName() + ".size"); @@ -101,11 +101,7 @@ public class Input extends Variable { * @return declaration of this input variable without a default value */ public String getDeclaration() { - ArrayIndexes ai = getArrayIndexes(); - ArrayList enumerations = null; - if(ai != null) - enumerations = ai.getEnumerations(); - + ArrayList enumerations = getArrayIndexes(); String range = ""; if(enumerations != null && enumerations.size() > 0) { StringBuilder sb = new StringBuilder(); diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Stock.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Stock.java index c7994cd1..7b740633 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Stock.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Stock.java @@ -56,22 +56,20 @@ public class Stock extends IndependentVariable { @Override public String getDeclaration() { - ArrayIndexes ai = getArrayIndexes(); - String each = ""; // each is required when a single value is used for all dimensions e.g. Stock[30](each start = 0) if (Variability.getVariability(this) == Variability.CONTINUOUS) { // start parameter is not used, everything needs to be fixed=false - if(ai != null && !ai.getEnumerations().isEmpty()) + if(getArrayIndexes() != null && !getArrayIndexes().isEmpty()) each = "each"; return " " + getType() + " " + getName() + getRange() + "(" + each + " fixed=false);\n"; } else { // Start parameter is used. Parameter guarantees that there is only one expression. - StockExpression e = (StockExpression)getExpressions().getExpressions().get(0); + StockExpression e = (StockExpression)getExpressions().get(0); String initialEquation = e.getExpression(this); initialEquation = SheetFormatUtils.reformatSheetReferences(this, initialEquation); - if(ai != null && !ai.getEnumerations().isEmpty()) + if(getArrayIndexes() != null && !getArrayIndexes().isEmpty()) each = "each"; 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 5b8812b0..9d4eab26 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/SysdynSchema.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/SysdynSchema.java @@ -17,7 +17,6 @@ import org.simantics.objmap.schema.MappingSchemas; import org.simantics.objmap.schema.SimpleSchema; import org.simantics.sysdyn.representation.expressions.ConstantExpression; import org.simantics.sysdyn.representation.expressions.DelayExpression; -import org.simantics.sysdyn.representation.expressions.Expressions; import org.simantics.sysdyn.representation.expressions.LookupExpression; import org.simantics.sysdyn.representation.expressions.NormalExpression; import org.simantics.sysdyn.representation.expressions.ParameterExpression; @@ -39,11 +38,8 @@ public class SysdynSchema extends SimpleSchema { addLinkType(MappingSchemas.fromAnnotations(g, Input.class)); addLinkType(MappingSchemas.fromAnnotations(g, ModuleType.class)); addLinkType(MappingSchemas.fromAnnotations(g, Model.class)); - addLinkType(MappingSchemas.fromAnnotations(g, Expressions.class)); addLinkType(MappingSchemas.fromAnnotations(g, Enumeration.class)); addLinkType(MappingSchemas.fromAnnotations(g, EnumerationIndex.class)); - addLinkType(MappingSchemas.fromAnnotations(g, EnumerationIndexes.class)); - addLinkType(MappingSchemas.fromAnnotations(g, ArrayIndexes.class)); addLinkType(MappingSchemas.fromAnnotations(g, NormalExpression.class)); addLinkType(MappingSchemas.fromAnnotations(g, ParameterExpression.class)); addLinkType(MappingSchemas.fromAnnotations(g, StockExpression.class)); diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variability.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variability.java index 27504514..dda7cbd4 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variability.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variability.java @@ -187,7 +187,7 @@ public enum Variability { if(variable == null || variable.getExpressions() == null) return Variability.CONTINUOUS; - ArrayList expressions = variable.getExpressions().getExpressions(); + ArrayList expressions = variable.getExpressions(); if(expressions.size() != 1) return Variability.CONTINUOUS; // Cannot handle multiple expressions as parameters diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variable.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variable.java index 1f1e1fc5..b5109d9d 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variable.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variable.java @@ -11,11 +11,14 @@ *******************************************************************************/ package org.simantics.sysdyn.representation; +import java.util.ArrayList; + import org.simantics.layer0.Layer0; import org.simantics.objmap.annotations.RelatedElement; +import org.simantics.objmap.annotations.RelatedListElements; import org.simantics.objmap.annotations.RelatedValue; import org.simantics.sysdyn.SysdynResource; -import org.simantics.sysdyn.representation.expressions.Expressions; +import org.simantics.sysdyn.representation.expressions.IExpression; /** * Abstract class for representing a variable in system dynamics models @@ -33,11 +36,11 @@ public abstract class Variable implements IElement { @RelatedElement(Layer0.URIs.PartOf) protected Object parent; - @RelatedElement(SysdynResource.URIs.Variable_arrayIndexes) - protected ArrayIndexes arrayIndexes; + @RelatedListElements(SysdynResource.URIs.Variable_arrayIndexesList) + protected ArrayList arrayIndexes = new ArrayList(); - @RelatedElement(SysdynResource.URIs.Variable_expressions) - protected Expressions expressions; + @RelatedListElements(SysdynResource.URIs.Variable_expressionList) + protected ArrayList expressions = new ArrayList(); @RelatedValue(SysdynResource.URIs.Variable_variability) protected String variability; @@ -84,7 +87,7 @@ public abstract class Variable implements IElement { * * @return Array indexes for this variable */ - public ArrayIndexes getArrayIndexes() { + public ArrayList getArrayIndexes() { return this.arrayIndexes; } @@ -92,7 +95,7 @@ public abstract class Variable implements IElement { * * @return Expressions of this variable */ - public Expressions getExpressions() { + public ArrayList getExpressions() { return this.expressions; } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/Expressions.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/Expressions.java deleted file mode 100644 index d05b9873..00000000 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/Expressions.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.simantics.sysdyn.representation.expressions; - -import java.util.ArrayList; - -import org.simantics.objmap.annotations.GraphType; -import org.simantics.objmap.annotations.RelatedOrderedSetElements; -import org.simantics.sysdyn.SysdynResource; - -@GraphType(SysdynResource.URIs.Expressions) -public class Expressions { - - @RelatedOrderedSetElements - private ArrayList expressions = new ArrayList(); - - public ArrayList getExpressions() { - return expressions; - } -} diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java index 469f52fd..19f56201 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java @@ -20,7 +20,6 @@ import org.simantics.objmap.annotations.RelatedValue; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.expressionParser.ExpressionParser; import org.simantics.sysdyn.expressionParser.ParseException; -import org.simantics.sysdyn.representation.ArrayIndexes; import org.simantics.sysdyn.representation.Book; import org.simantics.sysdyn.representation.Enumeration; import org.simantics.sysdyn.representation.IElement; @@ -66,12 +65,8 @@ public class StockExpression extends Expression { ArrayList outgoing = ((Stock)variable).getOutgoingValves(); if(incoming.isEmpty() && outgoing.isEmpty()) { // No connections, add 0 for each array index if any. - ArrayIndexes ai = variable.getArrayIndexes(); - ArrayList enumerations = null; - if(ai != null) - enumerations = ai.getEnumerations(); - - if(ai == null || enumerations == null || enumerations.isEmpty()) { + ArrayList enumerations = variable.getArrayIndexes(); + if(enumerations == null || enumerations.isEmpty()) { b.append(" 0.0"); } else { b.append(" zeros("); @@ -166,7 +161,7 @@ public class StockExpression extends Expression { */ public Double getStartValue(IndependentVariable variable) { Double value = null; - ArrayList expressions = variable.getExpressions().getExpressions(); + ArrayList expressions = variable.getExpressions(); if(expressions.size() == 1) { IExpression e = expressions.get(0); if(e.getInitialEquation(variable) == null) { diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/FormatUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/FormatUtils.java index 70d43a56..568774bc 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/FormatUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/FormatUtils.java @@ -73,8 +73,8 @@ public class FormatUtils { String condition; boolean array = reference.getArrayIndexes() != null && - reference.getArrayIndexes().getEnumerations() != null && - !reference.getArrayIndexes().getEnumerations().isEmpty(); + reference.getArrayIndexes() != null && + !reference.getArrayIndexes().isEmpty(); String refName = reference.getName(); if(reference.getType().equals("Boolean")) { diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java index 053d146a..e2f5cf45 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java @@ -18,7 +18,6 @@ import java.util.StringTokenizer; import org.simantics.sysdyn.expressionParser.ExpressionParser; import org.simantics.sysdyn.expressionParser.ExpressionParser.ForRange; import org.simantics.sysdyn.expressionParser.ParseException; -import org.simantics.sysdyn.representation.ArrayIndexes; import org.simantics.sysdyn.representation.Configuration; import org.simantics.sysdyn.representation.Enumeration; import org.simantics.sysdyn.representation.EnumerationIndex; @@ -44,10 +43,9 @@ public class IndexUtils { if(variable == null) return range; StringBuilder sb = new StringBuilder(); - ArrayIndexes arrayIndexes = variable.getArrayIndexes(); - if(arrayIndexes == null || range == null) + if(variable.getArrayIndexes() == null || range == null) return ""; - ArrayList enumerations = arrayIndexes.getEnumerations(); + ArrayList enumerations = variable.getArrayIndexes(); StringTokenizer st = new StringTokenizer(range, "[]:,", true); int index = 0; while(st.hasMoreTokens()) { -- 2.47.1