From 1b996426e315717d692d3e55236f5619f1cb476a Mon Sep 17 00:00:00 2001 From: lempinen Date: Tue, 27 Mar 2012 06:23:36 +0000 Subject: [PATCH] Almost completely functional model browser defined in sysdynmodelbrowserviewpoint. The main thing missing is deleting module types and datasets and removing delete-option from nodes that can not / should not be deleted. (refs #2926) git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@24540 ac1ea38d-2e2b-0410-8846-a27921b304fc --- org.simantics.sysdyn.ontology/graph.tg | Bin 92066 -> 63318 bytes .../graph/Sysdyn.pgraph | 5 +- .../graph/SysdynModelingViewpoint.pgraph | 246 ++++++++++++++++++ .../Sysdyn_ModelBrowser_Viewpoint.pgraph | 114 -------- .../graph/WorkModel.pgraph | 16 +- .../org/simantics/sysdyn/SysdynResource.java | 168 +++++++----- org.simantics.sysdyn.ontology/testGraph.tg | Bin 0 -> 38796 bytes org.simantics.sysdyn.ui/adapters.xml | 2 +- org.simantics.sysdyn.ui/plugin.xml | 22 +- .../actions/ShowInstantiatedModuleAction.java | 33 ++- .../sysdyn/ui/browser/SysdynModelBrowser.java | 24 +- .../actions/ActivateResultDatasetAction.java | 60 +++++ .../NewSharedFunctionLibraryAction.java | 22 -- .../ui/browser/actions/OpenSheetAction.java | 68 +++++ .../browser/actions/OpenWorkbookAction.java | 82 ------ .../browser/actions/drop/ChartDropAction.java | 180 +++++++++++++ .../actions/drop/FunctionDropAction.java | 86 ++++++ .../actions/newActions/NewBarChartAction.java | 111 ++++++++ .../NewEnumerationAction.java | 29 ++- .../newActions/NewExperimentAction.java | 89 +++++++ .../{ => newActions}/NewFunctionAction.java | 20 +- .../NewFunctionLibraryAction.java | 19 +- .../newActions/NewHistoryDataAction.java | 69 +++++ .../newActions/NewLineChartAction.java | 110 ++++++++ .../{ => newActions}/NewModuleTypeAction.java | 47 +++- .../actions/newActions/NewPieChartAction.java | 90 +++++++ .../NewSharedFunctionLibraryAction.java | 38 +++ .../actions/newActions/NewSheetAction.java | 51 ++++ ...NewSimulationPlaybackExperimentAction.java | 55 ++++ .../actions/remove/ModuleTypeRemover.java | 47 ++++ .../childrules/ModuleContentChildRule.java | 19 ++ .../childrules/ModuleTypeChildRule.java | 18 +- .../browser/childrules/VariableChildRule.java | 86 ++++++ .../ui/browser/imagerules/ChartImageRule.java | 58 +++++ .../browser/imagerules/ResultImageRule.java | 46 ++++ .../browser/imagerules/VariableImageRule.java | 58 +++++ .../labelrules/VariableNameLabelRule.java | 40 +++ .../nodeTypes/ModuleSymbolNodeType.java | 108 ++++++++ .../ui/editor/SysdynEditorNamingService.java | 9 +- .../sysdyn/ui/project/SysdynProject.java | 22 +- .../ResourceSelectionProcessor.java | 35 ++- .../widgets/modules/ParameterChildRule.java | 2 +- .../ui/validation/DependencyFunction.java | 23 +- .../sysdyn/ui/validation/ValidationUtils.java | 4 +- .../sysdyn/manager/HistoryDatasetResult.java | 3 +- .../representation/IndependentVariable.java | 17 +- .../sysdyn/representation/Variability.java | 3 + 47 files changed, 2101 insertions(+), 353 deletions(-) create mode 100644 org.simantics.sysdyn.ontology/graph/SysdynModelingViewpoint.pgraph delete mode 100644 org.simantics.sysdyn.ontology/graph/Sysdyn_ModelBrowser_Viewpoint.pgraph create mode 100644 org.simantics.sysdyn.ontology/testGraph.tg create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/ActivateResultDatasetAction.java delete mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewSharedFunctionLibraryAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/OpenSheetAction.java delete mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/OpenWorkbookAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/drop/ChartDropAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/drop/FunctionDropAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewBarChartAction.java rename org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/{ => newActions}/NewEnumerationAction.java (69%) create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewExperimentAction.java rename org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/{ => newActions}/NewFunctionAction.java (68%) rename org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/{ => newActions}/NewFunctionLibraryAction.java (77%) create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewHistoryDataAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewLineChartAction.java rename org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/{ => newActions}/NewModuleTypeAction.java (70%) create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewPieChartAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSharedFunctionLibraryAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSheetAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSimulationPlaybackExperimentAction.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/remove/ModuleTypeRemover.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/VariableChildRule.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/ChartImageRule.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/ResultImageRule.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/VariableImageRule.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/labelrules/VariableNameLabelRule.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodeTypes/ModuleSymbolNodeType.java diff --git a/org.simantics.sysdyn.ontology/graph.tg b/org.simantics.sysdyn.ontology/graph.tg index 958e4d0a6dfaaed8d9b53331928b481d2c81d4a0..6dc2005bc56701b57c036f1afdbc3f409ac6465d 100644 GIT binary patch literal 63318 zcmeI5cbr{S)%VXiHEEgli}UNSR*fsW2LnkQurNH#0ZMg_(PYd+#KfpkfCL zDk7kuDE5Ym2nZ;}O0iNz0Xr%xC}7t|eSg2T%UNed#_#3 zK4-#|DE(<@t`=*RvFc!PRb{MPPbg_B4He7vQoU5HHIk?BKlUeSboxehsJNw6hH9le z&8gt`q)D49m3k)Mq;g@TIGH+=>f@v4u5r!Ida+tA3}-Yaj~1%%FZR=1jT=Vk#ppIP z_Lb9|4NbLrp0{%B_m8V zKXJ_8vv=&+v8+}aDIi>fwPls+RwPcLD4x2iGF+)HZC%y^nj}fnHdZTV7YFM|Y(?Vh znK)_orsBC{B?NUn;!_(f3>M++_Y}Q;N?&< zwn`hAuwuq>g7Co9QIh*=M3R{b9rs~Nak~X!kRvRmtq}=O} zlDKMsx$R11UW6st&m2Spb&NOs&^C^!>ESy`wR*N&AX zJPo`{6EGvRf6tt-{g{-yHPiF~pJl0BxezD2Z3 zsXh+gOA=i{lI4PpN}+`*%Ny2Is}&SHX&0Pwa-m8$2vmZEC~jI;7%x^^Y-C@>w4`xE zxsD#Rm2R$-l&SE&VKX}r1pZj_X{tbd_8RKnmvu{RaUTUqJH zAWUvl4fRIR&Yifa4}$9jSlx});`UNyj7{<;No>jl^CG0>-Zb?j*d8j>SI3kJIcVoU_n`eDAjbw#yWV7YIW#ObPqIk_yA)G6yq zo2!K?)#{SKXbcobMj33x7gG+VQHJy{5GVDtV9`^?Y#)Zs$Y`Zj9AXKg>5|&ihtX6h z4;G~*8zn6_P+*6Cjle9p+2q!h;X;ibeoDz}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G*LM$i|P$THmDH7Zf7aYBL` zbR`}kK{H;{a}Q)U7oc{3fxtt>2_YAt!inH6QEex~frknq{DFsxG6F6@GC)yZ;Gu$; zQ80YducPt-7QeB0#^g_^u-sd+nU|wMdI=bo`C&Q-|B_96AfqD>)&5k*>hOg2n5W(WJHNm1Rn83OlTrM^K$SGE~SB`WJYbDPt=#<#eT)5V)x))MZBa5Jp3vcn;)O56-W&!r*iDa$2B zr~u>X@L>rTzYa@6S_BY@{aZjM!wHxKE|N1b9Q)T7O8Fd0`DqB55$0&b6C|U}Zb_Jz z_N4(OunHvpFEG@4<&ebxg-DC zAH#@$2qXSJjQG1S;%ON1H{z`X3r?Q>t&m$!gyDtz3-T|<|JTn+;mc1og~)fL`vuO9 zdcN)Pqv2SuukEitk(LV&7d#5RzPA5))pFs!CJ>4B`j-CNs-=%YuP^0)NmJ0@XMwDH zeJS6Yt$RZ!*Lvv zwo1r*^5!B^qwM>)LM9wh7as4VBYDGr04j)vH)s)Vyit;@EqSePozC4tn^616K#9GW1s7h zLfMeMebc+#BL$u!2{A4H1|FVOFdHf;FpSrjvQ|ENWoLFwvt9(69rii!t$S2 z!-xq%bZjf~nGhm&wMQ;KP~9zP-GWBE(IbV*p9-%FTDL%9zDEk1PZb3n8i2xFj}*M1 z;&V@g68`hg{_9;ML;CFrUeWPyF#86#E!X5N;m!pr@vMW_Tdw8Rjt=qm7Ot|l5rcQ^ z`eqwS-m2NA+XhoN?IvzHbzrrsb>Mqe*>)-(Opg1Kax~4$QE|S=0aWxL)^O~C7{WCdtq!9X&xC~^r{N1t31L=>n>9dJY7{HZ}aQoOn{0%&^q%+mG++ArC8ul*5 edDIfg`*nShi{pq5J;3YoxDMu(M@7HM@BahERvB{u diff --git a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph index 74f88326..aa7e10bc 100644 --- a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph +++ b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph @@ -67,6 +67,7 @@ SYSDYN.SymbolReferences : DIA.SymbolReferenceLibrary BasicSymbols = SYSDYN.SymbolReferences.BasicSymbols : DIA.SymbolReferenceLibrary SYSDYN.Configuration -- SYSDYN.ValveSymbol.orientation --> SYSDYN.Orientation -- SYSDYN.ValveSymbol.orientation --> SYSDYN.Orientation -- SYSDYN.ValveSymbol.textLocation --> SYSDYN.Location -- SYSDYN.ValveSymbol.textLocation --> SYSDYN.Location +VP = +SIMU = +PROJECT = +IMAGE = +ACT = +MOD = +STR = +SYSDYN = +SILK = +SHEET = +JFREE = + + +SBC = SYSDYN.ModelingBrowseContext : VP.BrowseContext +SAC = SYSDYN.ModelingActionContext : VP.BrowseContext + VP.BrowseContext.IsIncludedIn PROJECT.ProjectActionContext + +SBC.VariableNodeType +SBC.BuiltinFunctions : VP.ResourceNodeType +SBC.ModuleTypeChildRule : VP.ChildRule +SBC.ModuleContentChildRule : VP.ChildRule +SBC.VariableChildRule : VP.ChildRule + +SBC + @VP.relationChildRuleWithFolder SIMU.Model L0.ConsistsOf SYSDYN.Experiment + SBC.ExperimentsFolder : VP.ResourceNodeType + + @VP.relationChildRule SYSDYN.Experiment SYSDYN.Experiment.result SYSDYN.Result + + @VP.customChildRule MBC.Configuration SBC.VariableChildRule + SBC.Variable : SBC.VariableNodeType + + @VP.customChildRule SBC.Variable SBC.VariableChildRule + SBC.Variable + + @VP.relationChildRule MBC.Configuration L0.ConsistsOf SHEET.Book + @VP.relationChildRule SHEET.Book L0.ConsistsOf SHEET.Spreadsheet + + + // Function libraries + // Functions folder + @VP.relationChildRuleWithFolder MOD.StructuralModel L0.ConsistsOf SYSDYN.SysdynModelicaFunction + SBC.FunctionsFolder : VP.ResourceNodeType + @VP.relationChildRule SBC.FunctionsFolder L0.ConsistsOf SYSDYN.SysdynModelicaFunctionLibrary + + // Function libraries + @VP.relationChildRule SYSDYN.SysdynModelicaFunctionLibrary L0.ConsistsOf SYSDYN.SysdynModelicaFunctionLibrary + @VP.relationChildRule SYSDYN.SysdynModelicaFunctionLibrary L0.ConsistsOf SYSDYN.SysdynModelicaFunction + @VP.relationChildRule SYSDYN.SharedFunctionOntology L0.ConsistsOf SYSDYN.SysdynModelicaFunctionLibrary + @VP.relationChildRule SYSDYN.SharedFunctionOntology L0.ConsistsOf SYSDYN.SysdynModelicaFunction + + // Built-in functions + VP.BrowseContext.HasChildContribution _ : VP.ChildContribution + VP.ChildContribution.HasParentNodeType SBC.FunctionsFolder + VP.ChildContribution.HasChildNodeType SBC.BuiltinFunctions + VP.ChildContribution.HasRule _ : VP.ConstantChildRule + VP.ConstantChildRule.HasChild BuiltinFunctions + @VP.relationChildRule SBC.BuiltinFunctions L0.ConsistsOf SYSDYN.SysdynModelicaFunctionLibrary + @VP.relationChildRule SBC.BuiltinFunctions L0.ConsistsOf SYSDYN.SysdynModelicaFunction + + // Shared functions linked to a model + @VP.relationChildRuleWithFolder SBC.FunctionsFolder L0.IsLinkedTo SYSDYN.SharedFunctionOntology + SBC.SharedFunctionsFolder : VP.ResourceNodeType + + + // Modules + @VP.equalContentChildRule MOD.StructuralModel + SBC.ModulesFolder : VP.ResourceNodeType + @VP.customChildRule SBC.ModulesFolder SBC.ModuleTypeChildRule + SBC.ModuleSymbol + @VP.customChildRule SBC.ModuleSymbol SBC.ModuleContentChildRule STR.Component + + // Charts + @VP.relationChildRuleWithFolder MOD.StructuralModel L0.ConsistsOf JFREE.Chart + SBC.ChartsFolder : VP.ResourceNodeType + +// Labels +SBC.VariableNameLabelRule : VP.LabelRule +SBC.ModuleTypeLabelRule : VP.LabelRule + +SBC + @VP.constantLabelRule SBC.ExperimentsFolder "Experiments" + @VP.constantLabelRule SBC.FunctionsFolder "Functions" + @VP.constantLabelRule SBC.ChartsFolder "Charts" + @VP.constantLabelRule SBC.ModulesFolder "Modules" + @VP.constantLabelRule SBC.SharedFunctionsFolder "Shared Functions" + @VP.constantLabelRule SHEET.Book "Spreadsheets" + + @VP.customLabelRule SIMU.Run PROJECT.ProjectBrowseContext.RunLabelRule + @VP.customLabelRule SBC.BuiltinFunctions VP.ResourceNameLabelRule + @VP.customLabelRule SBC.ModuleSymbol SBC.ModuleTypeLabelRule + @VP.customLabelRule SBC.Variable SBC.VariableNameLabelRule + @VP.customLabelRule SHEET.Spreadsheet VP.ResourceNameLabelRule + @VP.customLabelRule SYSDYN.HistoryDataset VP.ResourceLabelLabelRule + @VP.customLabelRule JFREE.Chart VP.ResourceLabelLabelRule + +// Modifiers +SBC + @VP.customLabelRule SYSDYN.SysdynModelicaFunction VP.ResourceNameModifierRule + @VP.customLabelRule SYSDYN.HistoryDataset VP.ResourceLabelModifierRule + @VP.customLabelRule JFREE.Chart VP.ResourceLabelModifierRule + @VP.customLabelRule SBC.FunctionsFolder VP.NoModifierRule + + +// Decorations +SBC.ActiveLabelDecorationRule : VP.ConstantLabelDecorationRule + VP.ConstantLabelDecorationRule.HasFormat "%s [ACTIVE]" + VP.ConstantLabelDecorationRule.HasStyle "B" + + +// Images +SBC.VariableImageRule : VP.ImageRule +SBC.ChartImageRule : VP.ImageRule +SBC.ResultImageRule : VP.ImageRule + +SBC + @VP.customImageRule SBC.Variable SBC.VariableImageRule + @VP.customImageRule JFREE.Chart SBC.ChartImageRule + @VP.customImageRule SYSDYN.Result SBC.ResultImageRule + + + @VP.constantImageRule SBC.ExperimentsFolder SILK.folder + @VP.constantImageRule SBC.FunctionsFolder SILK.folder + @VP.constantImageRule SBC.SharedFunctionsFolder SILK.folder_link + @VP.constantImageRule SYSDYN.SysdynModelicaFunctionLibrary SILK.folder + @VP.constantImageRule SYSDYN.SysdynModelicaFunction SILK.brick + @VP.constantImageRule SBC.ModulesFolder SILK.folder + @VP.constantImageRule SBC.ModuleSymbol SILK.bricks + @VP.constantImageRule SBC.BuiltinFunctions SILK.folder_link + @VP.constantImageRule SYSDYN.SharedFunctionOntology SILK.folder_link + @VP.constantImageRule SHEET.Book SILK.table_multiple + @VP.constantImageRule SHEET.Spreadsheet SILK.table + @VP.constantImageRule SYSDYN.BasicExperiment SILK.time + @VP.constantImageRule SYSDYN.PlaybackExperiment SILK.timeline_marker + @VP.constantImageRule SBC.ChartsFolder SILK.folder + @VP.constantImageRule SYSDYN.HistoryDataset SILK.table + +SBC + // Active experiment + VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution + VP.VisualsContribution.HasNodeType SYSDYN.Experiment + VP.VisualsContribution.HasCondition _ : VP.HasStatementTest + VP.HasStatementTest.HasRelation SIMU.IsActive + VP.VisualsContribution.HasRule SBC.ActiveLabelDecorationRule + + // Show result in charts + VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution + VP.VisualsContribution.HasNodeType SYSDYN.Result + VP.VisualsContribution.HasCondition _ : VP.HasStatementTest + VP.HasStatementTest.HasRelation SYSDYN.Result.showResult + VP.VisualsContribution.HasRule SBC.ActiveLabelDecorationRule + + +// Actions +ACTIONS = SAC.Actions : L0.Library + +// NEW -Actions +ACTIONS.NewModuleType : ACT.Action +ACTIONS.NewEnumeration : ACT.Action +ACTIONS.NewFunction : ACT.Action +ACTIONS.NewFunctionLibrary : ACT.Action +ACTIONS.NewSharedFunctionLibrary : ACT.Action +ACTIONS.NewExperiment : ACT.Action +ACTIONS.NewSimulationPlaybackExperiment : ACT.Action +ACTIONS.NewLineChart : ACT.Action +ACTIONS.NewBarChart : ACT.Action +ACTIONS.NewPieChart : ACT.Action +ACTIONS.NewSheet : ACT.Action +ACTIONS.NewHistoryData : ACT.Action + +SAC + @VP.actionContribution "Module" SBC.ModulesFolder SILK.bricks VP.NewActionCategory ACTIONS.NewModuleType + @VP.actionContribution "Enumeration" MBC.Configuration SILK.brick VP.NewActionCategory ACTIONS.NewEnumeration + @VP.actionContribution "Enumeration" SBC.ModuleSymbol SILK.brick VP.NewActionCategory ACTIONS.NewEnumeration + @VP.actionContribution "Function" SBC.FunctionsFolder SILK.brick VP.NewActionCategory ACTIONS.NewFunction + @VP.actionContribution "Function" SYSDYN.SysdynModelicaFunctionLibrary SILK.brick VP.NewActionCategory ACTIONS.NewFunction + @VP.actionContribution "Function" SYSDYN.SharedFunctionOntology SILK.brick VP.NewActionCategory ACTIONS.NewFunction + @VP.actionContribution "Function Library" SBC.FunctionsFolder SILK.folder VP.NewActionCategory ACTIONS.NewFunctionLibrary + @VP.actionContribution "Function Library" SYSDYN.SysdynModelicaFunctionLibrary SILK.folder VP.NewActionCategory ACTIONS.NewFunctionLibrary + @VP.actionContribution "Function Library" SYSDYN.SharedFunctionOntology SILK.folder VP.NewActionCategory ACTIONS.NewFunctionLibrary + @VP.actionContribution "Shared Function Library" SBC.SharedFunctionsFolder SILK.folder VP.NewActionCategory ACTIONS.NewSharedFunctionLibrary + @VP.actionContribution "Experiment" SBC.ExperimentsFolder SILK.time VP.NewActionCategory ACTIONS.NewExperiment + @VP.actionContribution "Simulation Playback Experiment" SBC.ExperimentsFolder SILK.timeline_marker VP.NewActionCategory ACTIONS.NewSimulationPlaybackExperiment + @VP.actionContribution "Line Chart" SBC.ChartsFolder SILK.chart_line VP.NewActionCategory ACTIONS.NewLineChart + @VP.actionContribution "Pie Chart" SBC.ChartsFolder SILK.chart_pie VP.NewActionCategory ACTIONS.NewPieChart + @VP.actionContribution "Bar Chart" SBC.ChartsFolder SILK.chart_bar VP.NewActionCategory ACTIONS.NewBarChart + @VP.actionContribution "Sheet" SHEET.Book SILK.table VP.NewActionCategory ACTIONS.NewSheet + @VP.actionContribution "History Data" SYSDYN.Experiment SILK.table VP.NewActionCategory ACTIONS.NewHistoryData + + +// Drop actions +ACTIONS.FunctionDropAction : ACT.DropAction +ACTIONS.ChartDropAction : ACT.DropAction + +SBC + @VP.dropActionContribution SBC.FunctionsFolder ACTIONS.FunctionDropAction 1.0 + @VP.dropActionContribution SYSDYN.SysdynModelicaFunction ACTIONS.FunctionDropAction 1.0 + @VP.dropActionContribution SYSDYN.SysdynModelicaFunctionLibrary ACTIONS.FunctionDropAction 1.0 + @VP.dropActionContribution SYSDYN.SharedFunctionOntology ACTIONS.FunctionDropAction 1.0 + @VP.dropActionContribution JFREE.Chart ACTIONS.ChartDropAction 1.0 + diff --git a/org.simantics.sysdyn.ontology/graph/Sysdyn_ModelBrowser_Viewpoint.pgraph b/org.simantics.sysdyn.ontology/graph/Sysdyn_ModelBrowser_Viewpoint.pgraph deleted file mode 100644 index 29442e80..00000000 --- a/org.simantics.sysdyn.ontology/graph/Sysdyn_ModelBrowser_Viewpoint.pgraph +++ /dev/null @@ -1,114 +0,0 @@ -L0 = -VP = -SIMU = -PROJECT = -IMAGE = -ACT = -MOD = -STR = -SYSDYN = -SILK = - -SBC = SYSDYN.ProjectBrowseContext : VP.BrowseContext -SAC = SYSDYN.ProjectActionContext : VP.BrowseContext - -MBC = MOD.ModelingBrowseContext : VP.BrowseContext - VP.BrowseContext.IsIncludedIn PROJECT.ProjectBrowseContext -MAC = MOD.ModelingActionContext : VP.BrowseContext - VP.BrowseContext.IsIncludedIn PROJECT.ProjectActionContext - -BuiltinFunctions = -SBC.BuiltinFunctions : VP.ResourceNodeType -SBC.ModuleTypeChildRule : VP.ChildRule -SBC.ModuleContentChildRule : VP.ChildRule -SBC.ModuleTypeLabelRule : VP.LabelRule - -MBC - @VP.relationChildRuleWithFolder SIMU.Model L0.ConsistsOf SIMU.Experiment - SBC.ExperimentsFolder : VP.ResourceNodeType - //@VP.relationChildRule SIMU.Experiment L0.ConsistsOf SIMU.Run - // Function libraries - // Functions folder - @VP.relationChildRuleWithFolder MOD.StructuralModel L0.ConsistsOf SYSDYN.SysdynModelicaFunction - SBC.FunctionsFolder : VP.ResourceNodeType - @VP.relationChildRule SBC.FunctionsFolder L0.ConsistsOf SYSDYN.SysdynModelicaFunctionLibrary - // Function libraries - @VP.relationChildRule SYSDYN.SysdynModelicaFunctionLibrary L0.ConsistsOf SYSDYN.SysdynModelicaFunctionLibrary - @VP.relationChildRule SYSDYN.SysdynModelicaFunctionLibrary L0.ConsistsOf SYSDYN.SysdynModelicaFunction - // Built-in functions - VP.BrowseContext.HasChildContribution _ : VP.ChildContribution - VP.ChildContribution.HasParentNodeType SBC.FunctionsFolder - VP.ChildContribution.HasChildNodeType SBC.BuiltinFunctions - VP.ChildContribution.HasRule _ : VP.ConstantChildRule - VP.ConstantChildRule.HasChild BuiltinFunctions - @VP.relationChildRule SBC.BuiltinFunctions L0.ConsistsOf SYSDYN.SysdynModelicaFunctionLibrary - @VP.relationChildRule SBC.BuiltinFunctions L0.ConsistsOf SYSDYN.SysdynModelicaFunction - // Shared functions linked to a model - @VP.relationChildRuleWithFolder SBC.FunctionsFolder L0.IsLinkedTo SYSDYN.SharedFunctionOntology - SBC.SharedFunctionsFolder : VP.ResourceNodeType - - - //Modules - @VP.equalContentChildRule MOD.StructuralModel - SBC.ModulesFolder : VP.ResourceNodeType - @VP.customChildRule SBC.ModulesFolder SBC.ModuleTypeChildRule - SBC.ModuleSymbol : VP.ResourceNodeType - @VP.customChildRule SBC.ModuleSymbol SBC.ModuleContentChildRule STR.Component - - -// Labels -MBC - @VP.constantLabelRule SBC.ExperimentsFolder "Experiments" - @VP.customLabelRule SIMU.Run PROJECT.ProjectBrowseContext.RunLabelRule - @VP.constantLabelRule SBC.FunctionsFolder "Functions" - @VP.constantLabelRule SBC.SharedFunctionsFolder "Shared Functions" - @VP.constantLabelRule SBC.ModulesFolder "Modules" - @VP.customLabelRule SBC.BuiltinFunctions VP.ResourceNameLabelRule - @VP.customLabelRule SBC.ModuleSymbol SBC.ModuleTypeLabelRule - - -// Images -MBC - @VP.constantImageRule SBC.ExperimentsFolder PROJECT.ProjectBrowseContext.Images.Folder - @VP.constantImageRule SBC.FunctionsFolder SILK.folder - @VP.constantImageRule SBC.SharedFunctionsFolder SILK.folder - @VP.constantImageRule SYSDYN.SysdynModelicaFunction SILK.brick - @VP.constantImageRule SBC.ModulesFolder SILK.folder - @VP.constantImageRule SBC.ModuleSymbol SILK.bricks - @VP.constantImageRule SBC.BuiltinFunctions SILK.folder - -// Modifiers -MBC - @VP.customLabelRule SYSDYN.SysdynModelicaFunction VP.ResourceNameModifierRule - - -// Actions -ACTIONS = SAC.Actions : L0.Library - -// NEW -Actions -ACTIONS.NewModuleType : ACT.Action -ACTIONS.NewEnumeration : ACT.Action -ACTIONS.NewFunction : ACT.Action -ACTIONS.NewFunctionLibrary : ACT.Action -ACTIONS.NewSharedFunctionLibrary : ACT.Action -ACTIONS.OpenWorkbook : ACT.Action - - -MAC - @VP.actionContribution "Module" SBC.ModulesFolder SILK.bricks VP.NewActionCategory ACTIONS.NewModuleType - VP.BrowseContext.HasActionContribution _ : VP.ActionContribution - L0.HasLabel "Open Workbook" - VP.ActionContribution.HasImage SILK.brick - VP.ActionContribution.HasNodeType MBC.Configuration - VP.ActionContribution.HasAction ACTIONS.OpenWorkbook - - @VP.actionContribution "Enumeration" MBC.Configuration SILK.brick VP.NewActionCategory ACTIONS.NewEnumeration - //@VP.actionContribution "Open Workbook" MBC.Configuration SILK.brick VP.NewActionCategory ACTIONS.OpenWorkbook - @VP.actionContribution "Enumeration" SBC.ModuleSymbol SILK.brick VP.NewActionCategory ACTIONS.NewEnumeration - @VP.actionContribution "Function" SBC.FunctionsFolder SILK.brick VP.NewActionCategory ACTIONS.NewFunction - @VP.actionContribution "Function" SYSDYN.SysdynModelicaFunctionLibrary SILK.brick VP.NewActionCategory ACTIONS.NewFunction - @VP.actionContribution "Function" SYSDYN.SharedFunctionOntology SILK.brick VP.NewActionCategory ACTIONS.NewFunction - @VP.actionContribution "Function Library" SBC.FunctionsFolder SILK.folder VP.NewActionCategory ACTIONS.NewFunctionLibrary - @VP.actionContribution "Function Library" SYSDYN.SysdynModelicaFunctionLibrary SILK.folder VP.NewActionCategory ACTIONS.NewFunctionLibrary - @VP.actionContribution "Function Library" SYSDYN.SharedFunctionOntology SILK.folder VP.NewActionCategory ACTIONS.NewFunctionLibrary - @VP.actionContribution "Shared Function Library" SBC.SharedFunctionsFolder SILK.folder VP.NewActionCategory ACTIONS.NewSharedFunctionLibrary \ No newline at end of file diff --git a/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph b/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph index aa22c018..6205b847 100644 --- a/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph +++ b/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph @@ -17,6 +17,7 @@ WM = : PROJ.Project @L0.new */ +/* WM = : PROJ.Project @L0.new @@ -463,12 +464,7 @@ WMC.f41 : SYSDYN.Flow WorkModuleConfigurationDiagram : SYSDYN.ConfigurationDiagram 2LW#7J_%6wzA(B#;D1 zBfa+qA;syv7t-Stl8`T?kdU5m-*@f3_N=|p2T`8q-uqAVJjZi>d%f#j>+DlCA~|ET z#!vHvdS#$CRPU;sSR3jaEEs94c31iatAo|bKr4AH|M5RXtLmM!yRxa;2WhRZT_yNz zYFb~b4MurQedXRt3pGuH+xy*G>&k6|m3m*fCsMZbm+Po6{*A2G)B0J(X`5SD_cbz` z+Xe>9gOy$+xrQaRWlOnd=$W^mS!CncSX%|{^bMfOz&NsWE0HWK?!&;}IqH7ebAGn2 ztJf~6bPWz*ef${w(?0dATK&?}skQD(Pss-{JcqII;~0|==wS}cndOIudNBWeo2r|K z>Sb;wVvkYq@MLeYzEbYq-d7o5rSD6movEh}m3yj#+p{b`R0hX%A9^HUslpL}B?^ZF z7AqVESfsEFuu$PpzygJ(fcXkb0P_?U0}fGGgtoQ|OkZEQY^YkVbhEu`-{uYdl}b0F z|Bz_Q%6h$4=SDmtJjwA%mA(o#T!hz2pq1$>YJC+{IZj5#Y&w)Bk5xd)d>;p0OW9^g z0kZ7d0@F?{Z>#nW^~SyA2Rmi=QcllY1y0XF3Y?w;6*xTyC~$iAS76=!6gWNmDzJ$G zf!XV70|V8IdMdVy)qVX#gU~mLWMXHvx6)Z#ft}n_;0Xw0Ui+_0k+xM4>raKnyN;D#NczzsWGfg83=fgARF0oh0Bx`vTm zGBVz7B9hu=bfUD?(^KoxV|z%(<={WD*4y7x;W5uS&}qqBqTj6519JGoaFUGsqh=L0 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0 z$mZR{Srd~B|H5B+#co@=P-fYiPJx>EuGubo0&LZpAZTz~5JkG~?@=-I>Gi#Ck|GZVcsv}!} zAb;{-Mwg8-$z=nAU)a<0zZZ;u^Mb)|2)SElj(Cxn`jm@=oGsBsLf&`3+tXYmX8%9C zNId-&K;Dl%(iLC^&xrqvR{%L}(<^{`hxpT60pyC8UIAvY)$t==0p!FUA6)_DqA)(a z0?3Qc$B%dgD8W8GW79L5XZ0k122aL1d75Yb=1iXAc`DX9X7%J*K2C4)4A1;R+W+J~ zf2K43k^i3Y<{{_beMI2y;nF_h89(kRXZ+LLsNH+x$IGJuzJ>7bcX!VMEvJ_I`zw4l zmuG-HzMac0e(YGj;2Sqxh~#D~11IBA5CbFKO69;!Pb4`{p6*u4!-&UOn?J^Q7b3TM zmZvB%e)6A1$6WewI;LLP1kq3bd))m8#~p9%Tqb628vj2ZfpXZ49qEA*zdLNI)CW5G zA2a-C$EjS2)8q7+FZigJUTgo&<2KtMzXcSF7sKN;zrGBI>i3c_Jo4|P0}rPI={G|8 zQ@#;eAqC|7X#BF5Kjr(N4vCNBuML}O_?-=!&&zowrO@Fs|A}kWFl6|i<-(oviGPj} z)0s4t>&=O^zD?E5L-jI$-$I2?kFrANusC--r$avR&yiB0ZRNK9N*!Mx_6@@IlcRJ! z%ei%&p{DuAN9nNEWi}kLWio9Y{320)@{f+vQvXKfzpI7GQr#13`H@jt>i${3(>r8~ z-0U@eSH$eSQ^w|m17X8pt?SZ*@e5}6P}g8}3%=xp=xri8V5Bb? - none 0 fill 1 + none 0 fill 1 \ No newline at end of file diff --git a/org.simantics.sysdyn.ui/plugin.xml b/org.simantics.sysdyn.ui/plugin.xml index 05cd9c9c..6a90ec0e 100644 --- a/org.simantics.sysdyn.ui/plugin.xml +++ b/org.simantics.sysdyn.ui/plugin.xml @@ -159,12 +159,6 @@ relationship="left" relative="org.eclipse.ui.editorss"> - - + + + + + + + + bss = ISelectionUtils.filterSetSelection(e.getResource(), BrowserSelection.class); if(!bss.isEmpty()) { - Layer0 l0 = Layer0.getInstance(g); + // Find varaible from BrowserSelection. (Will be replaced with the Variable adaption above) for(BrowserSelection bs : bss) { Resource configuration = (Resource)bs.getAdapter(Resource.class); Resource instanceOf = g.getSingleObject(configuration, l0.InstanceOf); SysdynResource sr = SysdynResource.getInstance(g); - StructuralResource2 sr2 = StructuralResource2.getInstance(g); if(g.isInheritedFrom(instanceOf, sr.Module)) { configuration = g.getSingleObject(instanceOf, sr2.IsDefinedBy); - Variable variable = (Variable) bs.getAdapter(Variable.class); + variable = (Variable) bs.getAdapter(Variable.class); String rvi = Variables.getRVI(g, variable).substring(1); Resource model = Variables.getModel(g, variable); addShowModuleAction(e, getResourceEditorInput(g, model, configuration, rvi)); @@ -65,8 +88,6 @@ public class ShowInstantiatedModuleAction implements IDoubleClickAction { } else { ModuleNode moduleNode = ISelectionUtils.filterSingleSelection(e.getResource(), ModuleNode.class); if(moduleNode != null) { - Layer0 l0 = Layer0.getInstance(g); - StructuralResource2 sr2 = StructuralResource2.getInstance(g); Resource model; String rvi; if(moduleNode.getVariable() != null) { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynModelBrowser.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynModelBrowser.java index bf28f106..00115826 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynModelBrowser.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynModelBrowser.java @@ -1,3 +1,14 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser; import java.util.Arrays; @@ -5,18 +16,23 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import org.simantics.structural.ui.modelBrowser.ModelBrowser; +import org.simantics.structural.ui.modelBrowser.ModelBrowser2; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.ui.properties.SysdynPropertyPage; import org.simantics.ui.workbench.IPropertyPage; -public class SysdynModelBrowser extends ModelBrowser { +/** + * Model browser for sysdyn models. Content configured in SysdynModelingViewpoint.pgraph + * @author Teemu Lempinen + * + */ +public class SysdynModelBrowser extends ModelBrowser2 { - final private Set browseContexts = new HashSet(Arrays.asList(SysdynResource.URIs.ProjectBrowseContext, "http://www.simantics.org/Operating-1.1/Browser", "http://www.simantics.org/Image-1.0/Browser")); + final private Set browseContexts = new HashSet(Arrays.asList(SysdynResource.URIs.ModelingBrowseContext, "http://www.simantics.org/Operating-1.1/Browser", "http://www.simantics.org/Image-1.0/Browser")); @Override protected IPropertyPage getPropertyPage() { - return new SysdynPropertyPage(getSite(), Collections.singleton(SysdynResource.URIs.ModelBrowser)); + return new SysdynPropertyPage(getSite(), Collections.singleton(SysdynResource.URIs.ModelingBrowseContext)); } @Override diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/ActivateResultDatasetAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/ActivateResultDatasetAction.java new file mode 100644 index 00000000..8c7e6fbf --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/ActivateResultDatasetAction.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions; + +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.exception.DatabaseException; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.ui.DoubleClickEvent; +import org.simantics.ui.IDoubleClickAction; +import org.simantics.ui.utils.ResourceAdaptionUtils; + +/** + * Activates a result dataset to be shown in charts and other result visualizations + * + * @author Teemu Lempinen + * + */ +public class ActivateResultDatasetAction implements IDoubleClickAction { + + @Override + public void doubleClickEvent(DoubleClickEvent e) throws DatabaseException { + final Resource result = ResourceAdaptionUtils.toSingleResource(e.getResource()); + if (result == null) + return; + + ReadGraph graph = e.getGraph(); + + if(graph.isInstanceOf(result, SysdynResource.getInstance(graph).Result)) { + + graph.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + if(graph.isInstanceOf(result, sr.Result)) { + if (graph.hasStatement(result, sr.Result_showResult)) { + graph.denyStatement(result, sr.Result_showResult, result); + } else { + graph.claim(result, sr.Result_showResult, result); + } + } + } + }); + } + + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewSharedFunctionLibraryAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewSharedFunctionLibraryAction.java deleted file mode 100644 index c5bdeba4..00000000 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewSharedFunctionLibraryAction.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.simantics.sysdyn.ui.browser.actions; - -import org.simantics.db.Resource; - -public class NewSharedFunctionLibraryAction extends NewFunctionLibraryAction { - - - @Override - public Runnable create(Object target) { - if(!(target instanceof Resource)) - return null; - final Resource resource = (Resource)target; - - return new Runnable() { - @Override - public void run() { - createLibrary(resource, true); - } - }; - } - -} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/OpenSheetAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/OpenSheetAction.java new file mode 100644 index 00000000..17e37c0b --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/OpenSheetAction.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions; + +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.db.layer0.variable.Variables; +import org.simantics.spreadsheet.resource.SpreadsheetResource; +import org.simantics.ui.DoubleClickEvent; +import org.simantics.ui.IDoubleClickAction; +import org.simantics.ui.utils.ResourceAdaptionUtils; +import org.simantics.ui.workbench.ResourceEditorInput2; +import org.simantics.utils.ui.workbench.WorkbenchUtils; + +/** + * Opens the selected spreadsheet in a spreadsheet editor + * @author Teemu Lempinen + * + */ +public class OpenSheetAction implements IDoubleClickAction { + + @Override + public void doubleClickEvent(DoubleClickEvent e) throws DatabaseException { + Resource result = ResourceAdaptionUtils.toSingleResource(e.getResource()); + if (result == null) + return; + + ReadGraph graph = e.getGraph(); + SpreadsheetResource SHEET = SpreadsheetResource.getInstance(graph); + + final Resource sheet = result; + + if(graph.isInstanceOf(sheet, SHEET.Spreadsheet)) { + Variable variable = graph.adapt(sheet, Variable.class); + Resource model = Variables.getModel(graph, variable); + final String modelURI = graph.getURI(model); + final String RVI = Variables.getRVI(graph, variable); + + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + + private static final String EDITOR_ID = "org.simantics.spreadsheet.ui.editor2"; + + @Override + public void run() { + try { + WorkbenchUtils.openEditor(EDITOR_ID, new ResourceEditorInput2(EDITOR_ID, sheet, modelURI, RVI)); + } catch (PartInitException e) { + e.printStackTrace(); + } + } + }); + + } + } +} \ No newline at end of file diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/OpenWorkbookAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/OpenWorkbookAction.java deleted file mode 100644 index f233f3a4..00000000 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/OpenWorkbookAction.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.simantics.sysdyn.ui.browser.actions; - -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.common.request.PossibleObjectWithType; -import org.simantics.db.common.request.ReadRequest; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.adapter.ActionFactory; -import org.simantics.db.layer0.util.Simantics; -import org.simantics.db.layer0.variable.Variable; -import org.simantics.db.layer0.variable.Variables; -import org.simantics.layer0.Layer0; -import org.simantics.modeling.ui.diagramEditor.OpenSheetAdapter; -import org.simantics.simulation.ontology.SimulationResource; -import org.simantics.spreadsheet.resource.SpreadsheetResource; -import org.simantics.ui.SimanticsUI; -import org.simantics.ui.workbench.ResourceEditorInput2; -import org.simantics.utils.ui.workbench.WorkbenchUtils; - -public class OpenWorkbookAction implements ActionFactory{ - - @Override - public Runnable create(Object target) { - - if(!(target instanceof Resource)) - return null; - - final Resource resource = (Resource)target; - - return new Runnable() { - - @Override - public void run() { - - try { - - SimanticsUI.getSession().asyncRequest(new ReadRequest() { - @Override - public void run(ReadGraph graph) throws DatabaseException { - - Layer0 L0 = Layer0.getInstance(graph); - SpreadsheetResource sr = SpreadsheetResource.getInstance(graph); - - Resource book = graph.syncRequest(new PossibleObjectWithType(resource, L0.ConsistsOf, sr.Book)); - final Resource sheet = graph.syncRequest(new PossibleObjectWithType(book, L0.ConsistsOf, sr.Spreadsheet)); - - SimulationResource SIMU = SimulationResource.getInstance(graph); - Variable variable = graph.adapt(sheet, Variable.class); - Resource model = Variables.getModel(graph, variable); - final String modelURI = graph.getURI(model); - final String RVI = Variables.getRVI(graph, variable); - - PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { - - private static final String EDITOR_ID = "org.simantics.spreadsheet.ui.editor2"; - - @Override - public void run() { - try { - System.out.println("Activating sheet: model=" + modelURI + " rvi=" + RVI); - WorkbenchUtils.openEditor(EDITOR_ID, new ResourceEditorInput2(EDITOR_ID, sheet, modelURI, RVI)); - } catch (PartInitException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - }); - } - }); - } catch (Exception e) { - e.printStackTrace(); - } - - } - - }; - - } - -} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/drop/ChartDropAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/drop/ChartDropAction.java new file mode 100644 index 00000000..19ec9743 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/drop/ChartDropAction.java @@ -0,0 +1,180 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.drop; + +import java.util.Iterator; + +import org.eclipse.jface.viewers.IStructuredSelection; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.PossibleObjectWithType; +import org.simantics.db.common.request.SingleObjectWithType; +import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.ListUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.DropActionFactory; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.db.layer0.variable.Variables; +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.SimanticsUI; +import org.simantics.ui.utils.AdaptionUtils; + +/** + * Action for droppin variables to charts + * @author Teemu Lempinen + * + */ +public class ChartDropAction implements DropActionFactory { + + @Override + public Runnable create(ReadGraph g, Object target, Object source) throws DatabaseException { + + final Resource targetChart = AdaptionUtils.adaptToSingle(target, Resource.class); + if(targetChart == null || source == null || !(source instanceof IStructuredSelection)) + return null; + + final IStructuredSelection selection = (IStructuredSelection) source; + + return new Runnable() { + + @Override + public void run() { + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 L0 = Layer0.getInstance(graph); + JFreeChartResource JFREE = JFreeChartResource.getInstance(graph); + + Iterator iterator = selection.iterator(); + + // Run through all selections and add all IndependentVariables and Inputs to the target chart + while(iterator.hasNext()) { + + Variable variable = AdaptionUtils.adaptToSingle(iterator.next(), Variable.class); + if(variable == null) + continue; + + Resource represents = (Resource)variable.getPropertyValue(graph, Variables.REPRESENTS); + if(represents == null || + !(graph.isInstanceOf(represents, sr.IndependentVariable) || + graph.isInstanceOf(represents, sr.Input))) + continue; + + Resource plot = graph.syncRequest(new PossibleObjectWithType(targetChart, L0.ConsistsOf, JFREE.Plot)); + if(plot != null) { + if(graph.isInstanceOf(plot, JFREE.XYPlot)) { + dropToLineChart(graph, targetChart, variable); + } else if(graph.isInstanceOf(plot, JFREE.CategoryPlot)) { + dropToBarChart(graph, targetChart, variable); + } else if(graph.isInstanceOf(plot, JFREE.PiePlot)) { + dropToPieChart(graph, targetChart, variable); + } + } + } + + } + }); + } + }; + } + + + /** + * Drop variable to a pie chart + * @param graph ReadGraph + * @param pieChart Pie chart resource + * @param variable Dropped variable + * @throws DatabaseException + */ + private void dropToPieChart(WriteGraph graph, Resource pieChart, Variable variable) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + JFreeChartResource jfree = JFreeChartResource.getInstance(graph); + + Resource plot = graph.syncRequest(new SingleObjectWithType(pieChart, l0.ConsistsOf, jfree.Plot)); + if(plot == null) + return; + + Resource dataset = graph.syncRequest(new PossibleObjectWithType(plot, l0.ConsistsOf, jfree.Dataset)); + + if(dataset == null) + return; + + // Create the series and attach it to the dataset + String rvi = Variables.getRVI(graph, variable); + Resource series = ChartUtils.createSeries(graph, dataset, rvi); + graph.claimLiteral(series, jfree.Series_exploded, false); + } + + /** + * Drop variable to a bar chart + * @param graph ReadGraph + * @param barChart Bar chart resource + * @param variable Dropped variable + * @throws DatabaseException + */ + private void dropToBarChart(WriteGraph graph, Resource barChart, Variable variable) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + JFreeChartResource jfree = JFreeChartResource.getInstance(graph); + + Resource plot = graph.syncRequest(new SingleObjectWithType(barChart, l0.ConsistsOf, jfree.Plot)); + if(plot == null) + return; + + Resource dataset = graph.syncRequest(new PossibleObjectWithType(plot, l0.ConsistsOf, jfree.Dataset)); + + if(dataset == null) + return; + + // Create the series and attach it to the dataset + String rvi = Variables.getRVI(graph, variable); + ChartUtils.createSeries(graph, dataset, rvi); + } + + /** + * Drop variable to a line chart + * @param graph ReadGraph + * @param lineChart Line chart resource + * @param variable Dropped variable + * @throws DatabaseException + */ + private void dropToLineChart(WriteGraph graph, Resource lineChart, Variable variable) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + JFreeChartResource jfree = JFreeChartResource.getInstance(graph); + + Resource plot = graph.syncRequest(new SingleObjectWithType(lineChart, l0.ConsistsOf, jfree.Plot)); + if(plot == null) + return; + + Resource rangeAxis = null; + Resource dataset = null; + Resource rangeAxisList = graph.getPossibleObject(plot, jfree.Plot_rangeAxisList); + if(rangeAxisList == null || ListUtils.toList(graph, rangeAxisList).isEmpty()) { + // No range axis -> Create a new one + rangeAxis = ChartUtils.createNumberRangeAxis(graph, plot); + Resource domainAxis = graph.getPossibleObject(plot, jfree.Plot_domainAxis); + dataset = ChartUtils.createXYDataset(graph, plot, domainAxis, rangeAxis); + } else { + rangeAxis = ListUtils.toList(graph, rangeAxisList).get(0); + dataset = graph.getPossibleObject(rangeAxis, jfree.Dataset_mapToRangeAxis_Inverse); + } + + // Create the series and attach it to the dataset + String rvi = Variables.getRVI(graph, variable); + ChartUtils.createSeries(graph, dataset, rvi); + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/drop/FunctionDropAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/drop/FunctionDropAction.java new file mode 100644 index 00000000..588ac878 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/drop/FunctionDropAction.java @@ -0,0 +1,86 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.drop; + +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.exception.DatabaseException; +import org.simantics.db.layer0.adapter.DropActionFactory; +import org.simantics.layer0.Layer0; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.manager.FunctionUtils; +import org.simantics.ui.SimanticsUI; +import org.simantics.ui.utils.AdaptionUtils; + +/** + * Action for moving functions and function libraries in model browser + * @author Teemu Lempinen + * + */ +public class FunctionDropAction implements DropActionFactory { + + @Override + public Runnable create(ReadGraph g, Object target, Object source) throws DatabaseException { + Resource t = AdaptionUtils.adaptToSingle(target, Resource.class); + Resource s = AdaptionUtils.adaptToSingle(source, Resource.class); + + if(t == null || s == null) + return null; + + SysdynResource sr = SysdynResource.getInstance(g); + Layer0 L0 = Layer0.getInstance(g); + + // If target is a function, find functions parent to be the drop target + if(g.isInstanceOf(t, sr.SysdynModelicaFunction)) + t = g.getSingleObject(t, L0.PartOf); + + final Resource library = t; + final Resource tobemoved = s; + + // Libraries and model accept drops + if(!(g.isInstanceOf(library, sr.SysdynModelicaFunctionLibrary) || + g.isInstanceOf(library, sr.SysdynModel) || + g.isInstanceOf(library, sr.SharedFunctionOntology))) + return null; + + // Functions and function libraries can be dropped + if(!(g.isInstanceOf(tobemoved, sr.SysdynModelicaFunction) || + g.isInstanceOf(tobemoved, sr.SysdynModelicaFunctionLibrary))) + return null; + + + return new Runnable() { + + @Override + public void run() { + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + Layer0 L0 = Layer0.getInstance(graph); + Resource oldLib = graph.getSingleObject(tobemoved, L0.PartOf); + + // Remove dragged entity from its parent and add it to the new parent + graph.claim(tobemoved, L0.PartOf, library); + graph.deny(tobemoved, L0.PartOf, oldLib); + FunctionUtils.updateFunctionFileForLibrary(graph, oldLib); + FunctionUtils.updateFunctionFileForLibrary(graph, library); + } + + }); + } + }; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewBarChartAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewBarChartAction.java new file mode 100644 index 00000000..2e16bcec --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewBarChartAction.java @@ -0,0 +1,111 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; + +import java.util.Collections; +import java.util.UUID; + +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.exception.DatabaseException; +import org.simantics.db.layer0.adapter.ActionFactory; +import org.simantics.diagram.stubs.G2DResource; +import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.sysdyn.JFreeChartResource; +import org.simantics.ui.SimanticsUI; + +/** + * Creates a new bar chart to a model + * @author Teemu Lempinen + * + */ +public class NewBarChartAction implements ActionFactory{ + + @Override + public Runnable create(Object target) { + if(!(target instanceof Resource)) + return null; + final Resource model = (Resource)target; + + return new Runnable() { + @Override + public void run() { + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + JFreeChartResource jfree = JFreeChartResource.getInstance(graph); + G2DResource g2d = G2DResource.getInstance(graph); + + // Chart + Resource jfreechart = GraphUtils.create2(graph, jfree.Chart, + l0.HasName, "BarChart" + UUID.randomUUID().toString(), + l0.HasLabel, NameUtils.findFreshLabel(graph, "Bar Chart", model), + l0.PartOf, model, + jfree.Chart_visibleBorder, true, + jfree.Chart_borderWidth, 3, + jfree.Chart_visibleLegend, false + ); + + // Border color + graph.claimLiteral(jfreechart, jfree.Chart_borderColor, g2d.Color, new float[] {0,0,0,1}); + + // Title + GraphUtils.create2(graph, jfree.TextTitle, + l0.HasName, "TextTitle" + UUID.randomUUID().toString(), + l0.HasLabel, "Bar Chart Title", + jfree.Title_position, jfree.Top, + l0.PartOf, jfreechart); + + // X-axis + Resource domainAxis = GraphUtils.create2(graph, jfree.CategoryAxis, + l0.HasName, "CategoryAxis" + UUID.randomUUID().toString()); + + // Y-axis + Resource rangeAxis = GraphUtils.create2(graph, jfree.NumberAxis, + l0.HasName, "NumberAxis" + UUID.randomUUID().toString()); + + // Renderer + Resource renderer = GraphUtils.create2(graph, jfree.BarRenderer); + + // Dataset + Resource dataset = GraphUtils.create2(graph, jfree.CategoryDataset, + l0.HasName, "CategoryDataset" + UUID.randomUUID().toString(), + jfree.Dataset_mapToDomainAxis, domainAxis, + jfree.Dataset_mapToRangeAxis, rangeAxis, + jfree.Dataset_seriesList, ListUtils.create(graph, Collections.emptyList()), + jfree.Dataset_renderer, renderer); + + // Plot + GraphUtils.create2(graph, jfree.CategoryPlot, + l0.HasName, "Category plot" + UUID.randomUUID().toString(), + l0.PartOf, jfreechart, + jfree.Plot_domainAxis, domainAxis, + jfree.Plot_rangeAxis, rangeAxis, + jfree.Plot_rangeAxisList, ListUtils.create(graph, Collections.singletonList(rangeAxis)), + l0.ConsistsOf, dataset, + l0.ConsistsOf, domainAxis, + l0.ConsistsOf, rangeAxis); + } + + }); + } + }; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewEnumerationAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewEnumerationAction.java similarity index 69% rename from org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewEnumerationAction.java rename to org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewEnumerationAction.java index 8984a09b..dc3d4d0d 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewEnumerationAction.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewEnumerationAction.java @@ -1,4 +1,15 @@ -package org.simantics.sysdyn.ui.browser.actions; +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -14,6 +25,11 @@ import org.simantics.structural.stubs.StructuralResource2; import org.simantics.sysdyn.SysdynResource; import org.simantics.ui.SimanticsUI; +/** + * Creates a new enumeration to a model or module + * @author Teemu Lempinen + * + */ public class NewEnumerationAction implements ActionFactory{ @Override @@ -34,13 +50,16 @@ public class NewEnumerationAction implements ActionFactory{ SysdynResource sr = SysdynResource.getInstance(g); Layer0 l0 = Layer0.getInstance(g); + // Find the configuration from... Resource configuration = null; if(g.isInstanceOf(resource, sr.Configuration)) { configuration = resource; } else if(g.isInheritedFrom(resource, sr.ModuleSymbol)) { + // Module symbol Resource module = g.getPossibleObject(resource,ModelingResources.getInstance(g).SymbolToComponentType); configuration = g.getPossibleObject(module, StructuralResource2.getInstance(g).IsDefinedBy); } else { + // Module instance Resource instanceOf = g.getSingleObject(resource, l0.InstanceOf); if(g.isInheritedFrom(instanceOf, sr.Module)) { configuration = g.getPossibleObject(instanceOf, StructuralResource2.getInstance(g).IsDefinedBy); @@ -49,14 +68,14 @@ public class NewEnumerationAction implements ActionFactory{ } } - Resource enumerationIndexes = OrderedSetUtils.create(g, sr.EnumerationIndexes); - + // Find unique name String name = NameUtils.findFreshName(g, "Enum", configuration, l0.ConsistsOf, "%s%d"); - + + // Create enumeration GraphUtils.create2(g, sr.Enumeration, l0.HasName, name, - sr.Enumeration_enumerationIndexes, enumerationIndexes, + sr.Enumeration_enumerationIndexes, OrderedSetUtils.create(g, sr.EnumerationIndexes), l0.PartOf, configuration); } }); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewExperimentAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewExperimentAction.java new file mode 100644 index 00000000..05f79146 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewExperimentAction.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; + +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.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.ActionFactory; +import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.ui.SimanticsUI; + +/** + * Creates a new basic experiment + * @author Teemu Lempinen + * + */ +public class NewExperimentAction implements ActionFactory{ + + @Override + public Runnable create(Object target) { + if(!(target instanceof Resource)) + return null; + final Resource model = (Resource)target; + + return new Runnable() { + @Override + public void run() { + + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + String name = NameUtils.findFreshName(graph, getNameSuggestion(), model, l0.ConsistsOf, "%s%d"); + + Resource experiment = GraphUtils.create2(graph, getExperimentType(graph), + l0.HasName, name, + l0.HasLabel, name, + l0.PartOf, model); + + configureExperiment(graph, experiment); + } + }); + } + }; + } + + /** + * Override to do experiment-specific alterations + */ + protected void configureExperiment(WriteGraph graph, Resource experiment) throws DatabaseException { + + } + + /** + * Get the type of this experiment. + * + * @param g ReadGraph + * @return The type resource of this experiment + */ + protected Resource getExperimentType(ReadGraph g) { + return SysdynResource.getInstance(g).BasicExperiment; + } + + /** + * Returns the suggested name for this experiment. + * If the name has already been taken, appropriate prefix needs to be added. + * + * @return Suggested name for this experiment. + */ + protected String getNameSuggestion() { + return "Experiment"; + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewFunctionAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewFunctionAction.java similarity index 68% rename from org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewFunctionAction.java rename to org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewFunctionAction.java index 506f7bcc..c4e0b3dc 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewFunctionAction.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewFunctionAction.java @@ -1,4 +1,15 @@ -package org.simantics.sysdyn.ui.browser.actions; +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -12,6 +23,11 @@ import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.manager.FunctionUtils; import org.simantics.ui.SimanticsUI; +/** + * Creates a new modelica function to a model, function library or shared function library. + * @author Teemu Lempinen + * + */ public class NewFunctionAction implements ActionFactory{ @Override @@ -49,7 +65,7 @@ public class NewFunctionAction implements ActionFactory{ sr.SysdynModelicaFunction_modelicaFunctionCode, "", l0.PartOf, library); - FunctionUtils.updateFunctionFileForLibrary(g, library); + FunctionUtils.updateFunctionFileForLibrary(g, library); } }); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewFunctionLibraryAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewFunctionLibraryAction.java similarity index 77% rename from org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewFunctionLibraryAction.java rename to org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewFunctionLibraryAction.java index 1064e019..38670b8c 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewFunctionLibraryAction.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewFunctionLibraryAction.java @@ -1,4 +1,15 @@ -package org.simantics.sysdyn.ui.browser.actions; +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -13,6 +24,11 @@ import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.manager.FunctionUtils; import org.simantics.ui.SimanticsUI; +/** + * Creates a new function library + * @author Teemu Lempinen + * + */ public class NewFunctionLibraryAction implements ActionFactory{ @Override @@ -44,6 +60,7 @@ public class NewFunctionLibraryAction implements ActionFactory{ Layer0 l0 = Layer0.getInstance(g); SysdynResource sr = SysdynResource.getInstance(g); + // Libraries can be created to model, function library and shared function library if(!(g.isInstanceOf(libraryLocation, sr.SysdynModel) || g.isInstanceOf(libraryLocation, sr.SysdynModelicaFunctionLibrary) || g.isInstanceOf(libraryLocation, sr.SharedFunctionOntology))) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewHistoryDataAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewHistoryDataAction.java new file mode 100644 index 00000000..43f0ffac --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewHistoryDataAction.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; + +import java.util.UUID; + +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.ActionFactory; +import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.ui.SimanticsUI; + +/** + * Create a new history data + * + * @author Teemu Lempinen + * + */ +public class NewHistoryDataAction implements ActionFactory{ + + @Override + public Runnable create(Object target) { + if(!(target instanceof Resource)) + return null; + final Resource experiment = (Resource)target; + + return new Runnable() { + @Override + public void run() { + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 l0 = Layer0.getInstance(graph); + if(!graph.isInstanceOf(experiment, sr.Experiment)) + return; // Not called from an experiment + + Resource model = graph.getPossibleObject(experiment, l0.PartOf); + // Create the history dataset + GraphUtils.create2(graph, + sr.HistoryDataset, + l0.HasName, "HistoryDataset" + UUID.randomUUID().toString(), + l0.HasLabel, NameUtils.findFreshLabel(graph, "History Dataset", experiment), + sr.Experiment_result_Inverse, experiment, + sr.HistoryDataset_columns, Boolean.TRUE, + l0.PartOf, model); + } + }); + } + }; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewLineChartAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewLineChartAction.java new file mode 100644 index 00000000..b21e7fcf --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewLineChartAction.java @@ -0,0 +1,110 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.UUID; + +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.exception.DatabaseException; +import org.simantics.db.layer0.adapter.ActionFactory; +import org.simantics.diagram.stubs.G2DResource; +import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.sysdyn.JFreeChartResource; +import org.simantics.ui.SimanticsUI; + +/** + * Creates a new line chart + * @author Teemu Lempinen + * + */ +public class NewLineChartAction implements ActionFactory{ + + @Override + public Runnable create(Object target) { + if(!(target instanceof Resource)) + return null; + final Resource model = (Resource)target; + + return new Runnable() { + @Override + public void run() { + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + JFreeChartResource jfree = JFreeChartResource.getInstance(graph); + G2DResource g2d = G2DResource.getInstance(graph); + + // Chart + Resource jfreechart = GraphUtils.create2(graph, jfree.Chart, + l0.HasName, "Chart" + UUID.randomUUID().toString(), + l0.HasLabel, NameUtils.findFreshLabel(graph, "Chart", model), + l0.PartOf, model, + jfree.Chart_visibleBorder, true, + jfree.Chart_borderWidth, 3); + graph.claimLiteral(jfreechart, jfree.Chart_borderColor, g2d.Color, new float[] {0,0,0,1}); + + // Title + GraphUtils.create2(graph, jfree.TextTitle, + l0.HasName, "TextTitle" + UUID.randomUUID().toString(), + l0.HasLabel, "Chart Title", + jfree.Title_position, jfree.Top, + l0.PartOf, jfreechart); + + // X-axis + Resource domainAxis = GraphUtils.create2(graph, jfree.NumberAxis, + l0.HasName, "NumberAxis" + UUID.randomUUID().toString()); + + // Y-axis + Resource rangeAxis = GraphUtils.create2(graph, jfree.NumberAxis, + l0.HasName, "NumberAxis" + UUID.randomUUID().toString(), + l0.HasLabel, "Y-axis"); + + // Renderer + Resource renderer = GraphUtils.create2(graph, jfree.XYLineRenderer); + + // Dataset + Resource dataset = GraphUtils.create2(graph, jfree.XYDataset, + l0.HasName, "XYDataset" + UUID.randomUUID().toString(), + jfree.Dataset_mapToDomainAxis, domainAxis, + jfree.Dataset_mapToRangeAxis, rangeAxis, + jfree.Dataset_seriesList, ListUtils.create(graph, new ArrayList()), + jfree.Dataset_renderer, renderer); + + // Plot + GraphUtils.create2(graph, jfree.XYPlot, + l0.HasName, "XYPlot" + UUID.randomUUID().toString(), + l0.PartOf, jfreechart, + jfree.Plot_domainAxis, domainAxis, + jfree.Plot_rangeAxis, rangeAxis, + jfree.Plot_rangeAxisList, ListUtils.create(graph, Collections.singletonList(rangeAxis)), + l0.ConsistsOf, dataset, + l0.ConsistsOf, domainAxis, + l0.ConsistsOf, rangeAxis); + } + + }); + } + }; + } + + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewModuleTypeAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewModuleTypeAction.java similarity index 70% rename from org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewModuleTypeAction.java rename to org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewModuleTypeAction.java index 0f8234e2..8b400bde 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/NewModuleTypeAction.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewModuleTypeAction.java @@ -1,4 +1,15 @@ -package org.simantics.sysdyn.ui.browser.actions; +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; @@ -8,7 +19,6 @@ import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.adapter.ActionFactory; import org.simantics.db.layer0.adapter.Template; -import org.simantics.diagram.stubs.DiagramResource; import org.simantics.diagram.synchronization.graph.DiagramGraphUtil; import org.simantics.layer0.Layer0; import org.simantics.layer0.utils.direct.GraphUtils; @@ -19,6 +29,11 @@ import org.simantics.sysdyn.SysdynResource; import org.simantics.ui.SimanticsUI; import org.simantics.utils.datastructures.ArrayMap; +/** + * Creates a new module type + * @author Teemu Lempinen + * + */ public class NewModuleTypeAction implements ActionFactory{ @Override @@ -34,13 +49,11 @@ public class NewModuleTypeAction implements ActionFactory{ @Override public void perform(WriteGraph g) throws DatabaseException { - // Same as in SysdynProject.java. Should use the same code, not copy. SysdynResource sr = SysdynResource.getInstance(g); Layer0 l0 = Layer0.getInstance(g); Layer0X L0X = Layer0X.getInstance(g); ModelingResources mr = ModelingResources.getInstance(g); StructuralResource2 sr2 = StructuralResource2.getInstance(g); - DiagramResource dr = DiagramResource.getInstance(g); String name = NameUtils.findFreshName(g, "ModuleType", model, l0.ConsistsOf, "%s%d"); @@ -49,6 +62,8 @@ public class NewModuleTypeAction implements ActionFactory{ g.claim(moduleType, l0.Inherits, sr.Module); g.claim(moduleType, l0.PartOf, model); + + Resource configuration = GraphUtils.create2(g, sr.Configuration, l0.HasName, name + "Configuration", @@ -70,6 +85,25 @@ public class NewModuleTypeAction implements ActionFactory{ g.deny(diagram, L0X.HasTrigger, trigger); } } + + GraphUtils.create2(g, + sr.Validations_Dependencies_MissingDependencyConnectionsIssueSource, + L0X.IsActivatedBy, model, + l0.PartOf, moduleType + ); + + GraphUtils.create2(g, + sr.Validations_Dependencies_DependencyConnectionsIssueSource, + L0X.IsActivatedBy, model, + l0.PartOf, moduleType + ); + + GraphUtils.create2(g, + sr.Validations_Expressions_ExpressionIssueSource, + L0X.IsActivatedBy, model, + l0.PartOf, moduleType + ); + Resource mapping = g.newResource(); g.claim(mapping, l0.InstanceOf, null, sr.DiagramToCompositeMapping); g.claim(diagram, L0X.HasTrigger, mapping); @@ -83,15 +117,16 @@ public class NewModuleTypeAction implements ActionFactory{ Resource terminal = g.newResource(); g.claim(terminal, l0.InstanceOf, sr.SysdynTerminal); - DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal, sr.IsHeadOfTerminal); + DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal, sr.IsHeadOfTerminal); Resource terminal2 = g.newResource(); g.claim(terminal2, l0.InstanceOf, sr.SysdynTerminal); DiagramGraphUtil.addConnectionPoint(g, moduleSymbol, terminal2, sr.IsTailOfTerminal); - + g.claim(moduleSymbol, sr2.IsDefinedBy, OrderedSetUtils.create(g, sr2.Composite, terminal, terminal2)); + } }); } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewPieChartAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewPieChartAction.java new file mode 100644 index 00000000..1ae83a6a --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewPieChartAction.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; + +import java.util.Collections; +import java.util.UUID; + +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.exception.DatabaseException; +import org.simantics.db.layer0.adapter.ActionFactory; +import org.simantics.diagram.stubs.G2DResource; +import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.sysdyn.JFreeChartResource; +import org.simantics.ui.SimanticsUI; + +/** + * Creates a new pie chart + * @author Teemu Lempinen + * + */ +public class NewPieChartAction implements ActionFactory{ + + @Override + public Runnable create(Object target) { + if(!(target instanceof Resource)) + return null; + final Resource model = (Resource)target; + + return new Runnable() { + @Override + public void run() { + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + JFreeChartResource jfree = JFreeChartResource.getInstance(graph); + G2DResource g2d = G2DResource.getInstance(graph); + + // Chart + Resource jfreechart = GraphUtils.create2(graph, jfree.Chart, + l0.HasName, "PieChart" + UUID.randomUUID().toString(), + l0.HasLabel, NameUtils.findFreshLabel(graph, "Pie Chart", model), + l0.PartOf, model, + jfree.Chart_visibleBorder, true, + jfree.Chart_borderWidth, 3); + graph.claimLiteral(jfreechart, jfree.Chart_borderColor, g2d.Color, new float[] {0,0,0,1}); + + // Title + GraphUtils.create2(graph, jfree.TextTitle, + l0.HasName, "TextTitle" + UUID.randomUUID().toString(), + l0.HasLabel, "Pie Chart Title", + jfree.Title_position, jfree.Top, + l0.PartOf, jfreechart); + + // Dataset + Resource dataset = GraphUtils.create2(graph, jfree.PieDataset, + l0.HasName, "CategoryDataset" + UUID.randomUUID().toString(), + jfree.Dataset_seriesList, ListUtils.create(graph, Collections.emptyList()) + ); + + // Plot + GraphUtils.create2(graph, jfree.PiePlot, + l0.HasName, "PiePlot" + UUID.randomUUID().toString(), + l0.PartOf, jfreechart, + l0.ConsistsOf, dataset + ); + } + + }); + } + }; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSharedFunctionLibraryAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSharedFunctionLibraryAction.java new file mode 100644 index 00000000..98efd114 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSharedFunctionLibraryAction.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; + +import org.simantics.db.Resource; + +/** + * Creates a new shared function library + * @author Teemu Lempinen + * + */ +public class NewSharedFunctionLibraryAction extends NewFunctionLibraryAction { + + + @Override + public Runnable create(Object target) { + if(!(target instanceof Resource)) + return null; + final Resource resource = (Resource)target; + + return new Runnable() { + @Override + public void run() { + createLibrary(resource, true); + } + }; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSheetAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSheetAction.java new file mode 100644 index 00000000..418f0194 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSheetAction.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; + +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.ActionFactory; +import org.simantics.sysdyn.ui.utils.SheetUtils; +import org.simantics.ui.SimanticsUI; + +/** + * Creates a new spreadsheet to a book + * @author Teemu Lempinen + * + */ +public class NewSheetAction implements ActionFactory{ + + @Override + public Runnable create(Object target) { + if(!(target instanceof Resource)) + return null; + final Resource book = (Resource)target; + + return new Runnable() { + @Override + public void run() { + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + SheetUtils.createSheet(graph, book, null, new String[] {}, new int[] {50}); + } + + }); + } + }; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSimulationPlaybackExperimentAction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSimulationPlaybackExperimentAction.java new file mode 100644 index 00000000..b0363b95 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/newActions/NewSimulationPlaybackExperimentAction.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.newActions; + +import java.awt.Color; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.diagram.stubs.G2DResource; +import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.sysdyn.SysdynResource; + +/** + * Creates a new simulation playback experiment + * @author Teemu Lempinen + * + */ +public class NewSimulationPlaybackExperimentAction extends NewExperimentAction { + + protected void configureExperiment(WriteGraph graph, Resource experiment) throws DatabaseException { + G2DResource g2d = G2DResource.getInstance(graph); + Resource defaultGradient = GraphUtils.create2(graph, g2d.ColorGradient); + graph.claim(experiment, g2d.HasColorGradient, defaultGradient); + + Resource placement = GraphUtils.create2(graph, g2d.ColorPlacement, + g2d.HasGradientPosition, 0.0); + graph.claimLiteral(placement, g2d.HasColor, g2d.Color, new Color(0, 62, 133).getColorComponents(new float[4])); + graph.claim(defaultGradient, g2d.HasColorPlacement, placement); + + placement = GraphUtils.create2(graph, g2d.ColorPlacement, + g2d.HasGradientPosition, 1.0); + graph.claimLiteral(placement, g2d.HasColor, g2d.Color, new Color(255, 230, 0).getColorComponents(new float[4])); + graph.claim(defaultGradient, g2d.HasColorPlacement, placement); + } + + protected Resource getExperimentType(ReadGraph g) { + return SysdynResource.getInstance(g).PlaybackExperiment; + } + + protected String getNameSuggestion() { + return "Playback Experiment"; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/remove/ModuleTypeRemover.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/remove/ModuleTypeRemover.java new file mode 100644 index 00000000..e21bd811 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/actions/remove/ModuleTypeRemover.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.actions.remove; + +import java.util.Map; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.Remover; +import org.simantics.modeling.ui.modelBrowser.handlers.DeleteNodeHandler; + +/** + * Remover for module type nodes. Not functioning - {@link DeleteNodeHandler} prevents deleting other than entityNodes + * + * @author Teemu Lempinen + * + */ +public class ModuleTypeRemover implements Remover { + + private Resource resource; + + public ModuleTypeRemover(ReadGraph graph, Resource resource) { + this.resource = resource; + } + + @Override + public String canRemove(ReadGraph graph, Map aux) throws DatabaseException { + return null; + } + + @Override + public void remove(WriteGraph graph) throws DatabaseException { + System.out.println("Delete resource " + resource); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/ModuleContentChildRule.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/ModuleContentChildRule.java index 3bb27557..df545e7f 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/ModuleContentChildRule.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/ModuleContentChildRule.java @@ -1,3 +1,14 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.childrules; import java.util.ArrayList; @@ -12,6 +23,11 @@ import org.simantics.layer0.Layer0; import org.simantics.modeling.ModelingResources; import org.simantics.structural.stubs.StructuralResource2; +/** + * Child rule for displaying children of module types in Modules folder + * @author Teemu Lempinen + * + */ public class ModuleContentChildRule implements ChildRule { @Override @@ -32,16 +48,19 @@ public class ModuleContentChildRule implements ChildRule { Resource symbol = (Resource)parent; + // Find module component Resource component = graph.getPossibleObject(symbol,ModelingResources.getInstance(graph).SymbolToComponentType); if(component == null) return children; + // Find component configuration Resource configuration = graph.getSingleObject(component, str.IsDefinedBy); if(configuration == null) return children; + // Add all components children.addAll(graph.syncRequest(new ObjectsWithType(configuration, l0.ConsistsOf, str.Component))); return children; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/ModuleTypeChildRule.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/ModuleTypeChildRule.java index 7afcb1b9..111d12c3 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/ModuleTypeChildRule.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/ModuleTypeChildRule.java @@ -1,3 +1,14 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.childrules; import java.util.ArrayList; @@ -13,7 +24,11 @@ import org.simantics.modeling.ModelingResources; import org.simantics.structural.stubs.StructuralResource2; import org.simantics.sysdyn.SysdynResource; - +/** + * Child rule for finding module types defined in a model + * @author Teemu Lempinen + * + */ public class ModuleTypeChildRule implements ChildRule { @Override @@ -38,6 +53,7 @@ public class ModuleTypeChildRule implements ChildRule { if(!graph.isInstanceOf(model, SysdynResource.getInstance(graph).SysdynModel)) return children; + // Find all component types that are inherited from SYSDYN.Module for(Resource r : graph.syncRequest(new ObjectsWithType(model, l0.ConsistsOf, st.ComponentType))) { if(graph.isInheritedFrom(r, SysdynResource.getInstance(graph).Module)) { Resource symbol = graph.getPossibleObject(r,ModelingResources.getInstance(graph).ComponentTypeToSymbol); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/VariableChildRule.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/VariableChildRule.java new file mode 100644 index 00000000..aaecd2d0 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/childrules/VariableChildRule.java @@ -0,0 +1,86 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.childrules; + +import java.util.ArrayList; +import java.util.Collection; + +import org.simantics.browsing.ui.model.children.ChildRule; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.db.layer0.variable.Variables; +import org.simantics.sysdyn.SysdynResource; + +/** + * Child rule for building model configuration out of Variable nodes + * @author Teemu Lempinen + * + */ +public class VariableChildRule implements ChildRule { + + @Override + public boolean isCompatible(Class contentType) { + return contentType.equals(Variable.class) || contentType.equals(Resource.class); + } + + @Override + public Collection getChildren(ReadGraph graph, Object parent) throws DatabaseException { + + ArrayList result = new ArrayList(); + + if (parent == null) { + return result; + } + + Variable variable = null; + + if(parent instanceof Variable) { + variable = (Variable) parent; + } else if(parent instanceof Resource) { + variable = Variables.getVariable(graph, (Resource)parent); + } + + if(variable == null) + return result; + + SysdynResource sr = SysdynResource.getInstance(graph); + + ArrayList variables = new ArrayList(); + + for(Variable child : variable.browseChildren(graph)) { + Resource represents = (Resource)child.getPropertyValue(graph, Variables.REPRESENTS); + if(graph.isInstanceOf(represents, sr.IndependentVariable)) { + variables.add(child); + } else if (graph.isInstanceOf(represents, sr.Input)) { + variables.add(child); + } else if (graph.isInstanceOf(represents, sr.Module)) { + variables.add(child); + } else if (graph.isInstanceOf(represents, sr.Enumeration)) { + variables.add(child); + } + } + + for (Variable v : variables) { + result.add(v); + } + + return result; + } + + @Override + public Collection getParents(ReadGraph graph, Object child) throws DatabaseException { + return null; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/ChartImageRule.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/ChartImageRule.java new file mode 100644 index 00000000..044d9bc0 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/ChartImageRule.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.imagerules; + +import java.util.Collections; +import java.util.Map; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.browsing.ui.common.ColumnKeys; +import org.simantics.browsing.ui.model.images.ImageRule; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.PossibleObjectWithType; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.sysdyn.JFreeChartResource; +import org.simantics.sysdyn.ui.Activator; + +public class ChartImageRule implements ImageRule { + + @Override + public boolean isCompatible(Class contentType) { + return Resource.class.equals(contentType); + } + + @Override + public Map getImage(ReadGraph graph, Object content) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + JFreeChartResource jfree = JFreeChartResource.getInstance(graph); + + String image = "icons/chart_line.png"; + + Resource chart = (Resource) content; + + Resource plot = graph.syncRequest(new PossibleObjectWithType(chart, l0.ConsistsOf, jfree.Plot)); + if(plot != null) { + if(graph.isInstanceOf(plot, jfree.CategoryPlot)) { + image = "icons/chart_bar.png"; + } else if(graph.isInstanceOf(plot, jfree.PiePlot)) { + image = "icons/chart_pie.png"; + } + } + + return Collections.singletonMap(ColumnKeys.SINGLE, + ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource(image)) + ); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/ResultImageRule.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/ResultImageRule.java new file mode 100644 index 00000000..ed7024ed --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/ResultImageRule.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.imagerules; + +import java.util.Collections; +import java.util.Map; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.browsing.ui.common.ColumnKeys; +import org.simantics.browsing.ui.model.images.ImageRule; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.ui.Activator; + +public class ResultImageRule implements ImageRule { + + @Override + public boolean isCompatible(Class contentType) { + return Resource.class.equals(contentType); + } + + @Override + public Map getImage(ReadGraph graph, Object content) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Resource data = (Resource) content; + + String image = "icons/chart_bar_blackAndWhite.png"; + if(graph.hasStatement(data, sr.Result_showResult)) + image ="icons/chart_bar.png"; + + return Collections.singletonMap(ColumnKeys.SINGLE, + ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource(image)) + ); + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/VariableImageRule.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/VariableImageRule.java new file mode 100644 index 00000000..c35a895d --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/imagerules/VariableImageRule.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.imagerules; + +import java.util.Collections; +import java.util.Map; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.browsing.ui.common.ColumnKeys; +import org.simantics.browsing.ui.model.images.ImageRule; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.db.layer0.variable.Variables; +import org.simantics.layer0.Layer0; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.ui.Activator; +import org.simantics.ui.utils.AdaptionUtils; + +public class VariableImageRule implements ImageRule { + + @Override + public boolean isCompatible(Class contentType) { + return Variable.class.equals(contentType); + } + + @Override + public Map getImage(ReadGraph graph, Object content) throws DatabaseException { + Variable var = AdaptionUtils.adaptToSingle(content, Variable.class); + + String image = "icons/brick.png"; + + Resource r = (Resource)var.getPropertyValue(graph, Variables.REPRESENTS); + if(r != null) { + Layer0 L0 = Layer0.getInstance(graph); + SysdynResource sr = SysdynResource.getInstance(graph); + Resource type = graph.getSingleObject(r, L0.InstanceOf); + if(graph.isInheritedFrom(type, sr.Module)) { + image = "icons/bricks.png"; + } + } + + return Collections.singletonMap(ColumnKeys.SINGLE, + ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource(image)) + ); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/labelrules/VariableNameLabelRule.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/labelrules/VariableNameLabelRule.java new file mode 100644 index 00000000..03def7f0 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/labelrules/VariableNameLabelRule.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.labelrules; + +import java.util.Collections; +import java.util.Map; + +import org.simantics.browsing.ui.common.ColumnKeys; +import org.simantics.browsing.ui.model.labels.LabelRule; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.ui.utils.AdaptionUtils; + +public class VariableNameLabelRule implements LabelRule { + public static final ModuleTypeLabelRule INSTANCE = new ModuleTypeLabelRule(); + + @Override + public boolean isCompatible(Class contentType) { + return contentType.equals(Variable.class); + } + + @Override + public Map getLabel(ReadGraph graph, Object content) throws DatabaseException { + Variable var = AdaptionUtils.adaptToSingle(content, Variable.class); + return Collections.singletonMap(ColumnKeys.SINGLE, + var != null ? var.getName(graph) : "No variable" + ); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodeTypes/ModuleSymbolNodeType.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodeTypes/ModuleSymbolNodeType.java new file mode 100644 index 00000000..3ab81f1e --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodeTypes/ModuleSymbolNodeType.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * 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.sysdyn.ui.browser.nodeTypes; + +import java.util.Collection; +import java.util.Collections; +import java.util.WeakHashMap; + +import org.simantics.browsing.ui.NodeContext; +import org.simantics.browsing.ui.common.NodeContextBuilder; +import org.simantics.browsing.ui.model.nodetypes.NodeType; +import org.simantics.browsing.ui.model.nodetypes.SpecialNodeType; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; + +/** + * Experimental node type for Module symbols. Copied mostly from {@link SpecialNodeType}. + * Not necessary needed. + * + * @author Teemu Lempinen + * + */ +public class ModuleSymbolNodeType implements NodeType { + + private Resource resource; + private Class contentType; + + private static final WeakHashMap nodeTypeCache = + new WeakHashMap(); + + public ModuleSymbolNodeType(Resource resource) { + this.resource = resource; + this.contentType = Resource.class; + } + + public static ModuleSymbolNodeType create(Resource entityType) { + synchronized(nodeTypeCache) { + ModuleSymbolNodeType result = nodeTypeCache.get(entityType); + if(result == null) { + result = new ModuleSymbolNodeType(entityType); + nodeTypeCache.put(entityType, result); + } + return result; + } + } + + @Override + public NodeContext createNodeContext(ReadGraph graph, Object content) + throws DatabaseException { + if(contentType.isInstance(content)) + return NodeContextBuilder.buildWithData(KEY_SEQUENCE, + new Object[] {content, this} + ); + else + return null; + } + + @Override + public Class getContentType() { + return contentType; + } + + @Override + public int hashCode() { + return resource.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ModuleSymbolNodeType other = (ModuleSymbolNodeType) obj; + return resource.equals(other.resource); + } + + @Override + public boolean inherits(ReadGraph graph, NodeType superType) { + // Special node type does not support inheritance + return equals(superType); + } + + @Override + public Collection getSuper(ReadGraph g) { + return Collections.emptyList(); + } + + @Override + public String toString(ReadGraph graph) throws DatabaseException { + return "(" + NameUtils.getSafeName(graph, resource) + ")"; + } + + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynEditorNamingService.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynEditorNamingService.java index 261d04db..ca386d6b 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynEditorNamingService.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynEditorNamingService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * 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 @@ -27,7 +27,7 @@ import org.simantics.ui.workbench.IResourceEditorInput2; * If the viewer shows an instantiated module, the service provides a name of type: "instanceName : instanceOf". * Otherwise works as standard EditorNamingService2. * - * @author TLTEEMU + * @author Teemu Lempinen * */ public class SysdynEditorNamingService extends EditorNamingService2 { @@ -37,8 +37,9 @@ public class SysdynEditorNamingService extends EditorNamingService2 { if(in instanceof IResourceEditorInput2) { IResourceEditorInput2 input = (IResourceEditorInput2) in; + Resource model = g.getPossibleResource(input.getModelURI()); + if(!input.getRVI().isEmpty()) { - Resource model = g.getPossibleResource(input.getModelURI()); if(model != null) { Resource configuration = g.getPossibleObject(model, SimulationResource.getInstance(g).HasConfiguration); String configurationName = NameUtils.getSafeName(g, configuration); @@ -54,6 +55,8 @@ public class SysdynEditorNamingService extends EditorNamingService2 { } } + } else { + return NameUtils.getSafeLabel(g, model); } } return super.getName(g, editorId, in); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java index d871355a..b3bc6d9f 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Association for Decentralized Information Management in + * Copyright (c) 2010, 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 @@ -99,7 +99,7 @@ public class SysdynProject extends AbstractProjectFeature { } } - + ModelManager mm; @@ -193,8 +193,8 @@ public class SysdynProject extends AbstractProjectFeature { ErrorLogger.defaultLogError(e); } } - - + + // Issues try { session.syncRequest(new ReadRequest() { @@ -233,8 +233,10 @@ public class SysdynProject extends AbstractProjectFeature { for(Resource experiment : graph.getObjects(model, l0.ConsistsOf)) { if(graph.isInstanceOf(experiment, SIMU.Experiment)) { for(Resource result : graph.getObjects(experiment, sr.Experiment_result)) { - String resultFile = (String)graph.getPossibleRelatedValue(result, sr.Result_resultFile); - if(result != null) resultPaths.put(resultFile, result); + if(!graph.isInstanceOf(result, sr.HistoryDataset)) { + String resultFile = (String)graph.getPossibleRelatedValue(result, sr.Result_resultFile); + if(result != null) resultPaths.put(resultFile, result); + } } } } @@ -279,9 +281,9 @@ public class SysdynProject extends AbstractProjectFeature { } } } - + public void onActivated(final ReadGraph graph, final IProject project) throws DatabaseException { - + GraphChangeListenerSupport changeSupport = graph.getService(GraphChangeListenerSupport.class); changeSupport.addMetadataListener(new GenericChangeListener() { @@ -294,9 +296,9 @@ public class SysdynProject extends AbstractProjectFeature { } }); - + IssueUtils.listenActiveProjectIssueSources(graph, project.get()); - + } } 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 aa8bc2a1..dab187f9 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 @@ -17,6 +17,9 @@ import java.util.Collections; import java.util.List; import org.eclipse.jface.viewers.ISelection; +import org.simantics.browsing.ui.NodeContext; +import org.simantics.browsing.ui.model.nodetypes.NodeType; +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; @@ -24,6 +27,8 @@ import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.exception.ManyObjectsForFunctionalRelationException; import org.simantics.db.exception.ServiceException; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.db.layer0.variable.Variables; import org.simantics.diagram.stubs.DiagramResource; import org.simantics.layer0.Layer0; import org.simantics.modeling.ModelingResources; @@ -51,6 +56,8 @@ import org.simantics.ui.utils.AdaptionUtils; */ public class ResourceSelectionProcessor implements SelectionProcessor { + private SpecialNodeType sharedFunctionsTestNode; + @Override public Collection process(Object selection, ReadGraph backend) { Collection tabs = new ArrayList(); @@ -60,6 +67,10 @@ public class ResourceSelectionProcessor implements SelectionProcessor && ((ArrayList) selection).size() > 1) { @@ -84,9 +95,13 @@ public class ResourceSelectionProcessor implements SelectionProcessor result = new ArrayList(); + boolean isStock = isStock(graph, component); StandardIssue noSuchVariableIssue = null; // Check that all references have corresponding arrows if (references != null && dependencies != null) { @@ -126,7 +127,12 @@ public class DependencyFunction { if (!dependencies.contains(reference)) { Resource variable = null; if ((variable = ValidationUtils.reach(graph, component, reference)) != null) { - result.add(new StandardIssue(sr.Validations_MissingLinkIssue, component, variable)); + if(isStock) { + /* Stocks do not get incoming dependencies. They are allowed + to have references without arrows */ + } else { + result.add(new StandardIssue(sr.Validations_MissingLinkIssue, component, variable)); + } } else { if (noSuchVariableIssue == null) { noSuchVariableIssue = new StandardIssue(sr.Validations_NoSuchVariableIssue, component); @@ -140,6 +146,19 @@ public class DependencyFunction { return result; } + + private static boolean isStock(ReadGraph graph, Resource variable) throws DatabaseException { + List expressionList = ValidationUtils.getExpressions(graph, variable); + if(expressionList == null || expressionList.isEmpty()) { + return false; + } else { + for(Resource expression : expressionList) { + if(!graph.isInstanceOf(expression, SysdynResource.getInstance(graph).StockExpression)) + return false; + } + return true; + } + } /** * Missing link description 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 3826bbc9..e6fa77b6 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * 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 @@ -92,7 +92,7 @@ public class ValidationUtils { * @return List of expression (resources) * @throws DatabaseException */ - private static List getExpressions(ReadGraph graph, Resource r) throws DatabaseException { + public static List getExpressions(ReadGraph graph, Resource r) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); Resource hasExpressions = graph.getPossibleObject(r, sr.Variable_expressions); if(hasExpressions != null) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/HistoryDatasetResult.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/HistoryDatasetResult.java index 21ed8b0b..9b0d515c 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/HistoryDatasetResult.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/HistoryDatasetResult.java @@ -239,7 +239,8 @@ public class HistoryDatasetResult extends SimulationResult { // Update result set and send message to model that results have been changed HistoryDatasetResult.this.variables = result.second; sysdynResult.setResult(HistoryDatasetResult.this); - result.first.resultChanged(); + if(result.first != null) + result.first.resultChanged(); } @Override 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 4ae415bf..0b95bf6b 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IndependentVariable.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/IndependentVariable.java @@ -31,7 +31,7 @@ public abstract class IndependentVariable extends Variable { */ public String getDeclaration() { Variability variability = Variability.getVariability(this); - + // [variability] type name[range] StringBuilder sb = new StringBuilder(); sb.append(" "); @@ -51,11 +51,13 @@ public abstract class IndependentVariable extends Variable { sb.append(";\n"); // Possible additions to expressions. e.g. helper classes and variables - String addition; - for(IExpression e : getExpressions().getExpressions()) { - addition = e.getDeclarationAddition(this); - if(addition != null) - sb.append(addition); + if(getExpressions() != null) { + String addition; + for(IExpression e : getExpressions().getExpressions()) { + addition = e.getDeclarationAddition(this); + if(addition != null) + sb.append(addition); + } } return sb.toString(); @@ -125,6 +127,9 @@ public abstract class IndependentVariable extends Variable { * @return equations or null */ protected String getVariableEquation() { + if(this.expressions == null) + return null; + ArrayList expressions = this.expressions.getExpressions(); ArrayIndexes ai = this.getArrayIndexes(); ArrayList enumerations = null; 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 e027774a..dc4f483f 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variability.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variability.java @@ -139,6 +139,9 @@ public enum Variability { * @return Variabilty of a variable */ static public Variability getVariability(IndependentVariable variable, boolean allowVariableReferences, Configuration configuration) { + if(variable == null || variable.getExpressions() == null) + return Variability.CONTINUOUS; + ArrayList expressions = variable.getExpressions().getExpressions(); if(expressions.size() != 1) -- 2.47.1