]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ontology/graph/ModelingViewpoint.pgraph
Merge "(refs #7259) Added Iterator.filter and MSet.filterInPlace"
[simantics/platform.git] / bundles / org.simantics.modeling.ontology / graph / ModelingViewpoint.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 VP = <http://www.simantics.org/Viewpoint-1.2>
4 SIMU = <http://www.simantics.org/Simulation-1.1>
5 STR = <http://www.simantics.org/Structural-1.2>
6 PROJECT = <http://www.simantics.org/Project-1.2>
7 MOD = <http://www.simantics.org/Modeling-1.2>
8 IMAGE = <http://www.simantics.org/Image2-1.2>
9 COLOR = <http://www.simantics.org/Color-1.1>
10 DIA = <http://www.simantics.org/Diagram-2.2>
11 ACT = <http://www.simantics.org/Action-1.1>
12 VIEW = <http://www.simantics.org/Views-1.2>
13 SILK = <http://www.simantics.org/Silk-1.1>
14 DOC = <http://www.simantics.org/Document-1.2>
15 SHEET = <http://www.simantics.org/Spreadsheet-1.2>
16
17 // Library containing all modeling viewpoint contributions
18 MOD.Contributions : L0.Library
19
20 MOD.SCLChildRule <T VP.ChildRule
21   >-- MOD.SCLChildRule.getChildren ==> "Resource -> <ReadGraph> [Resource]" <R L0.HasProperty : L0.FunctionalRelation
22
23 MOD.SCLLabelRule <T VP.ChildRule
24   >-- MOD.SCLLabelRule.getLabels ==> "Resource -> <ReadGraph> [String]" <R L0.HasProperty : L0.FunctionalRelation
25
26 MOD.SCLAction <T ACT.Action
27   --> MOD.SCLAction.action ==> "Resource -> <Proc> ()" <R L0.HasProperty : L0.FunctionalRelation 
28
29 MOD.SCLDropAction <T ACT.Action
30   --> MOD.SCLDropAction.action ==> "Resource -> Dynamic -> Integer -> <Proc> ()" <R L0.HasProperty : L0.FunctionalRelation 
31
32 MOD.SCLTest <T VP.Test
33   --> MOD.SCLTest.test ==> "Resource -> <ReadGraph> Boolean" <R L0.HasProperty : L0.FunctionalRelation 
34
35 // Legacy ModelingBrowseContext
36 MBC = MOD.ModelingBrowseContext : VP.BrowseContext
37     VP.BrowseContext.IsIncludedIn PROJECT.ProjectBrowseContext
38 MAC = MOD.ModelingActionContext : VP.BrowseContext
39     VP.BrowseContext.IsIncludedIn PROJECT.ProjectActionContext
40     
41     
42 // Browse contexts
43 MOD.DefaultStructuralBrowseContext : VP.BrowseContext
44     VP.BrowseContext.HasChildContribution MOD.Contributions.ModelConfiguration
45     VP.BrowseContext.HasChildContribution MOD.Contributions.ComponentDefinition
46     VP.BrowseContext.HasChildContribution MOD.Contributions.ComponentChildRule
47     VP.BrowseContext.HasChildContribution MOD.Contributions.ComponentTypeToSymbol
48     VP.BrowseContext.HasChildContribution MOD.Contributions.LocalLibrary
49     VP.BrowseContext.HasChildContribution MOD.Contributions.LibraryChildren
50     VP.BrowseContext.HasChildContribution MOD.Contributions.ImageChildren
51     VP.BrowseContext.HasChildContribution MOD.Contributions.ElementClassChildren
52     VP.BrowseContext.HasChildContribution MOD.Contributions.ConnectionsFolder
53     VP.BrowseContext.HasChildContribution MOD.Contributions.ConfigurationBooks
54     VP.BrowseContext.HasChildContribution MOD.Contributions.BookSheets
55     VP.BrowseContext.HasChildContribution MOD.Contributions.SubscriptionItemChildren
56     VP.BrowseContext.HasChildContribution MOD.Contributions.ChildrenInActiveExperiment
57     VP.BrowseContext.HasChildContribution MOD.Contributions.VariableChildren
58     VP.BrowseContext.HasChildContribution MOD.Contributions.ConfigurationComponents
59     VP.BrowseContext.HasChildContribution MOD.Contributions.Code
60     VP.BrowseContext.Includes MOD.DefaultStructuralLabelContext
61     VP.BrowseContext.Includes MOD.DefaultStructuralLabelModifierContext
62     VP.BrowseContext.Includes MOD.DefaultStructuralImageContext
63     
64 MOD.DefaultStructuralLabelContext : VP.BrowseContext    
65     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ComponentTypesLabel
66     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ConfigurationLabel
67     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionsLabel
68     VP.BrowseContext.HasVisualsContribution MOD.Contributions.TerminalsLabel
69     VP.BrowseContext.HasVisualsContribution MOD.Contributions.DocumentsLabel
70     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SymbolLabel
71     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionLabel
72     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionItemLabel
73     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionItemLabelDecoration
74     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ConnectionRelationLabelDecoration
75     VP.BrowseContext.HasVisualsContribution MOD.Contributions.VariableLabel
76     VP.BrowseContext.HasVisualsContribution MOD.Contributions.CodeLabel
77
78 MOD.DefaultStructuralLabelModifierContext : VP.BrowseContext     
79     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SymbolLabelModifier
80     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionLabelModifier
81     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionItemLabelModifier
82
83     
84 MOD.DefaultStructuralImageContext : VP.BrowseContext
85     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionImage
86     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionsImage
87     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ComponentTypeImage
88     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ComponentImage
89     VP.BrowseContext.HasVisualsContribution MOD.Contributions.CompositeImage
90     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ConfigurationImage
91     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ComponentTypesImage
92     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ConnectionPointDefinitionsImage
93     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SubscriptionItemImage
94     VP.BrowseContext.HasVisualsContribution MOD.Contributions.SymbolImage
95     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ConnectionRelationImage
96     VP.BrowseContext.HasVisualsContribution MOD.Contributions.DocumentsImage
97     VP.BrowseContext.HasVisualsContribution MOD.Contributions.DocumentImage
98     VP.BrowseContext.HasVisualsContribution MOD.Contributions.LibraryImage
99     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ProfileImage
100     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ProfileEntryImage
101     VP.BrowseContext.HasVisualsContribution MOD.Contributions.StyleImage
102     VP.BrowseContext.HasVisualsContribution MOD.Contributions.GroupImage
103     VP.BrowseContext.HasVisualsContribution MOD.Contributions.VariableImage
104     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ImageImage
105     VP.BrowseContext.HasVisualsContribution MOD.Contributions.CodeImage
106     
107 MOD.DefaultStructuralActionContext : VP.BrowseContext    
108
109 MOD.HasLocalLibrary <R L0.DependsOn
110     L0.HasDescription "A relation used for binding libraries to a model for UI viewing purposes. Allows the creation of specific rules for UI viewpoints."
111     L0.InverseOf MOD.IsLocalLibraryOf <R L0.IsWeaklyRelatedTo
112     <-- SIMU.Model
113     --> L0.Library
114
115 MOD.NewComposite <T ACT.Action
116 MOD.NewComposite.HasCompositeType <R L0.IsRelatedTo : L0.TotalFunction
117     L0.HasDomain MOD.NewComposite
118     L0.HasRange  L0.Type
119 MOD.NewComposite.HasDefaultName <R L0.HasProperty : L0.TotalFunction
120     L0.HasDomain MOD.NewComposite
121     L0.HasRange  L0.String
122
123 MOD.ExportModel <T ACT.Action
124     >-- MOD.ExportModel.extension --> L0.String <R L0.HasProperty : L0.FunctionalRelation
125     >-- MOD.ExportModel.format --> L0.String <R L0.HasProperty : L0.FunctionalRelation
126
127 // Rules
128 MBC.SubscriptionLabelRule : VP.LabelRule
129 MBC.SubscriptionImageRule : VP.ImageRule
130 MBC.SubscriptionItemLabelRule : VP.LabelRule
131 MBC.SubscriptionItemLabelDecorationRule : VP.LabelDecorationRule
132 MBC.ExperimentLabelRule : VP.LabelRule
133 MBC.ConnectionRelationLabelDecorationRule : VP.LabelDecorationRule
134 MBC.ConnectionRelationModifierRule : VP.ModifierRule
135
136 // Node types
137 MBC.ComponentTypesFolder : VP.ResourceNodeType
138 MBC.DocumentsFolder : VP.ResourceNodeType
139 MBC.SubscriptionsFolder : VP.ResourceNodeType
140
141 // Tests
142 MBC.IsComponent : VP.Test
143     L0.HasDescription "Returns true if the specified input Resource/Variable refers to a structural component."
144 MBC.IsUserDefinedComponentTest : VP.Test
145     L0.HasDescription "Returns true if the specified input Resource/Variable refers to an instance of a user-defined structural component type."
146
147 MOD.Contributions.ModelLibraries
148     @VP.defineRelationChildRule SIMU.Model L0.ConsistsOf L0.Library
149 MOD.Contributions.Experiments
150     @VP.defineRelationChildRule SIMU.Model L0.ConsistsOf SIMU.Experiment
151 MOD.Contributions.ExperimentRuns
152     @VP.defineRelationChildRule SIMU.Experiment L0.ConsistsOf SIMU.Run
153 MOD.Contributions.Subscriptions
154     @VP.defineRelationChildRule L0.Entity L0.ConsistsOf MOD.Subscription
155
156 // Viewpoint
157 MBC    
158     // Rules that are specific to structural models
159     @VP.namedRelationChildRule           MOD.Contributions.ModelConfiguration MOD.StructuralModel SIMU.HasConfiguration MBC.Configuration
160
161     @VP.namedRelationChildRule           MOD.Contributions.ComponentDefinition STR.ComponentType   STR.IsDefinedBy MBC.Configuration
162     VP.BrowseContext.HasChildContribution MOD.Contributions.ComponentChildRule : VP.ChildContribution
163         VP.ChildContribution.HasParentNodeType STR.Component
164         VP.ChildContribution.HasChildNodeType STR.Component
165         VP.ChildContribution.HasRule _ : VP.RelationChildRule
166             VP.RelationChildRule.HasRelation L0.ConsistsOf
167             VP.RelationChildRule.HasTest _ : VP.HasNegatedTest
168                 VP.HasNegatedTest.HasTest _ : VP.HasStatementTest
169                     VP.HasStatementTest.HasRelation MOD.HiddenComposite
170     @VP.namedRelationChildRule           MOD.Contributions.ComponentTypeToSymbol STR.ComponentType   MOD.ComponentTypeToSymbol MBC.Symbol
171     @VP.namedRelationChildRule           MOD.Contributions.ComponentTypeScript   STR.ComponentType   STR.ComponentType.hasScript STR.ComponentTypeScript
172     @VP.namedRelationChildRule           MOD.Contributions.SymbolToTerminal      MBC.Symbol L0.ConsistsOf STR.ConnectionRelation
173
174     @VP.namedRelationChildRule           MOD.Contributions.LocalLibrary MOD.StructuralModel MOD.HasLocalLibrary L0.Library
175
176     @VP.namedRelationChildRule           MOD.Contributions.LibraryChildren      L0.Library         L0.ConsistsOf   L0.Library
177     @VP.namedRelationChildRule           MOD.Contributions.ImageChildren        L0.Library         L0.ConsistsOf   IMAGE.Image
178     @VP.namedRelationChildRule           MOD.Contributions.ElementClassChildren L0.Library         L0.ConsistsOf   DIA.ElementClass
179     @VP.namedRelationChildRule           MOD.Contributions.ConfigurationBooks      MBC.Configuration L0.ConsistsOf  SHEET.Book
180     @VP.namedRelationChildRule           MOD.Contributions.LibraryBooks         L0.Library L0.ConsistsOf SHEET.Book
181     @VP.namedRelationChildRule           MOD.Contributions.BookSheets           L0.Entity L0.ConsistsOf  SHEET.Spreadsheet
182
183     @VP.namedRelationChildRule           MOD.Contributions.SCLModules L0.Entity   L0.ConsistsOf L0.SCLModule
184     
185     @VP.namedRelationChildRule           MOD.Contributions.SCLQueries L0.Library   L0.ConsistsOf MOD.SCLQuery
186     
187     @VP.namedRelationChildRule           MOD.Contributions.PGraphs L0.Ontology   L0.ConsistsOf L0.PGraph
188
189     // Contribute in product-specific browse context.
190     //@VP.relationChildRuleWithFolder MOD.StructuralModel L0.ConsistsOf   STR.ComponentType
191     //    MBC.ComponentTypesFolder
192
193     @VP.namedRelationChildRuleWithFolder MOD.Contributions.ConnectionsFolder MOD.Contributions.ConnectionRelationChildren STR.ComponentType   L0.ConsistsOf   STR.ConnectionRelation
194         MBC.ConnectionPointDefinitionsFolder : VP.ResourceNodeType
195
196     // Contribute in product-specific browse context.
197     //@VP.relationChildRuleWithFolder MOD.StructuralModel L0.ConsistsOf   MOD.Subscription
198     //    MBC.SubscriptionsFolder
199
200     @VP.namedRelationChildRule           MOD.Contributions.SubscriptionItemChildren MOD.Subscription    L0.ConsistsOf   MOD.Subscription.Item
201     
202     @VP.namedRelationChildRule           MOD.Contributions.Code STR.ProceduralComponentType STR.ProceduralComponentType.code STR.ProceduralComponentTypeCode
203
204     // Contribute in product-specific browse context.
205     //@VP.relationChildRuleWithFolder MOD.StructuralModel L0.ConsistsOf DOC.Document
206     //    MBC.DocumentsFolder
207
208     VP.BrowseContext.HasChildContribution MOD.Contributions.ChildrenInActiveExperiment : VP.ChildContribution
209         VP.ChildContribution.HasParentNodeType STR.Component    
210         VP.ChildContribution.HasChildNodeType MBC.Variable
211         VP.ChildContribution.HasRule MBC.ChildrenInActiveExperiment : VP.ChildRule
212     VP.BrowseContext.HasChildContribution MOD.Contributions.VariableChildren : VP.ChildContribution
213         VP.ChildContribution.HasParentNodeType MBC.Variable    
214         VP.ChildContribution.HasChildNodeType MBC.Variable
215         VP.ChildContribution.HasRule MBC.VariableChildRule
216     VP.BrowseContext.HasChildContribution MOD.Contributions.SharedOntologies : VP.ChildContribution
217         VP.ChildContribution.HasParentNodeType PROJECT.Project
218         VP.ChildContribution.HasChildNodeType L0.SharedOntology
219         VP.ChildContribution.HasRule MBC.SharedOntologies : MOD.SCLChildRule
220             @MOD.scl MOD.SCLChildRule.getChildren """\_ -> (getSharedOntologies ())""" "Resource -> <ReadGraph> [Resource]"
221     VP.BrowseContext.HasChildContribution MOD.Contributions.Ontologies : VP.ChildContribution
222         VP.ChildContribution.HasParentNodeType PROJECT.Project
223         VP.ChildContribution.HasChildNodeType L0.Ontology
224         VP.ChildContribution.HasRule MBC.Ontologies : MOD.SCLChildRule
225             @MOD.scl MOD.SCLChildRule.getChildren """\_ -> (getVisibleSystemOntologies ())""" "Resource -> <ReadGraph> [Resource]"
226     VP.BrowseContext.HasChildContribution MOD.Contributions.ConfigurationComponents : VP.ChildContribution
227         VP.ChildContribution.HasParentNodeType MBC.Configuration
228         VP.ChildContribution.HasChildNodeType STR.Component
229         VP.ChildContribution.HasRule _ : VP.RelationChildRule
230             VP.RelationChildRule.HasRelation L0.ConsistsOf
231             VP.RelationChildRule.HasTest _ : VP.HasNegatedTest
232                 VP.HasNegatedTest.HasTest _ : VP.HasStatementTest
233                     VP.HasStatementTest.HasRelation MOD.HiddenComposite
234
235 MBC.VariableChildRule : VP.ChildRule
236
237 MBC.VariablePropertyRule <T VP.ChildRule
238 MBC.VariablePropertyRule.RequireProperty <R L0.DependsOn
239 MBC.VariablePropertyRule.FilterProperty <R L0.DependsOn
240
241 MBC.VariableLabelRule : VP.LabelRule
242 MBC.VariableLabelRule.browseName ==> "String" <R L0.HasProperty : L0.FunctionalRelation
243     L0.HasDescription "This property can be asserted for a type to customize the label returned by VariableLabelRule. By default VariableLabelRule will return the value of Variable.getName."
244
245 MBC.Configuration : VP.ResourceNodeType
246
247 MBC.Variable : VP.NodeType
248     VP.HasContentType "Variable"
249
250 MBC.Symbol : VP.ResourceNodeType
251     // We cannot use DIA.ElementClass, because it inherits DIA.ComponentType
252     // that has already unwanted contributions.
253
254 MBC.ComponentTypeLockStatusImageDecorationRule : VP.ImageDecorationRule
255
256 // Labels
257 MBC
258     @VP.namedConstantLabelRule           MOD.Contributions.ComponentTypesLabel   MBC.ComponentTypesFolder             "User components"
259     @VP.namedConstantLabelRule           MOD.Contributions.ConfigurationLabel    MBC.Configuration                    "Configuration"
260     @VP.namedConstantLabelRule           MOD.Contributions.SubscriptionsLabel    MBC.SubscriptionsFolder              "Subscriptions"
261     @VP.namedConstantLabelRule           MOD.Contributions.TerminalsLabel        MBC.ConnectionPointDefinitionsFolder "Terminals"
262     @VP.namedConstantLabelRule           MOD.Contributions.DocumentsLabel        MBC.DocumentsFolder                  "Documents"
263     @VP.namedConstantLabelRule           MOD.Contributions.CodeLabel             STR.ProceduralComponentTypeCode      "Code"
264
265     @VP.namedCustomLabelRule             MOD.Contributions.ComponentTypeScriptLabel STR.ComponentTypeScript           VP.ResourceNameLabelRule
266     @VP.namedCustomLabelRule             MOD.Contributions.SymbolLabel           MBC.Symbol                           VP.ResourceNameLabelRule
267     @VP.namedCustomLabelRule             MOD.Contributions.SymbolLabelModifier   MBC.Symbol                           VP.ResourceNameModifierRule
268     @VP.namedCustomLabelRule             MOD.Contributions.SubscriptionLabel     MOD.Subscription                     MBC.SubscriptionLabelRule
269     @VP.namedCustomLabelRuleWithPriority MOD.Contributions.SubscriptionLabelModifier     MOD.Subscription                     VP.ResourceLabelModifierRule  1.0
270     @VP.namedCustomLabelRule             MOD.Contributions.SubscriptionItemLabel         MOD.Subscription.Item                MBC.SubscriptionItemLabelRule
271     @VP.namedCustomLabelDecorationRule   MOD.Contributions.SubscriptionItemLabelDecoration MOD.Subscription.Item                MBC.SubscriptionItemLabelDecorationRule
272     @VP.namedCustomLabelRule             MOD.Contributions.SubscriptionItemLabelModifier MOD.Subscription.Item                VP.ResourceLabelModifierRule
273     @VP.namedCustomLabelDecorationRule   MOD.Contributions.ConnectionRelationLabelDecoration STR.ConnectionRelation               MBC.ConnectionRelationLabelDecorationRule
274     @VP.namedCustomLabelRule             MOD.Contributions.ConnectionRelationModifier        STR.ConnectionRelation   MBC.ConnectionRelationModifierRule
275
276     VP.BrowseContext.HasVisualsContribution MOD.Contributions.VariableLabel : VP.VisualsContribution
277         VP.VisualsContribution.HasNodeType MBC.Variable
278         VP.VisualsContribution.HasRule MBC.VariableLabelRule
279
280
281 // Tooltips
282 MBC
283     VP.BrowseContext.HasVisualsContribution MOD.Contributions.VariableTooltip : VP.VisualsContribution
284         VP.VisualsContribution.HasNodeType MBC.Variable
285         VP.VisualsContribution.HasRule VP.DescriptionTooltipRule
286
287 // Images
288 MBC
289     @VP.namedCustomImageRule             MOD.Contributions.SubscriptionImage     MOD.Subscription                     MBC.SubscriptionImageRule
290     @VP.namedConstantImageRule           MOD.Contributions.SubscriptionsImage    MBC.SubscriptionsFolder              IMAGES.SubscriptionsFolder
291     @VP.namedConstantImageRule           MOD.Contributions.ComponentTypeImage    STR.ComponentType                    IMAGES.ComponentType
292     @VP.namedConstantImageRule           MOD.Contributions.ComponentImage        STR.Component                        SILK.brick
293     @VP.namedConstantImageRule           MOD.Contributions.CompositeImage        STR.Composite                        SILK.bricks
294     @VP.namedConstantImageRule           MOD.Contributions.ConfigurationImage    MBC.Configuration                    SILK.bricks
295     @VP.namedConstantImageRule           MOD.Contributions.ComponentTypesImage   MBC.ComponentTypesFolder             SILK.folder
296     @VP.namedConstantImageRule           MOD.Contributions.ConnectionPointDefinitionsImage MBC.ConnectionPointDefinitionsFolder SILK.folder
297     @VP.namedConstantImageRule           MOD.Contributions.SubscriptionItemImage MOD.Subscription.Item                SILK.tag_blue
298     @VP.namedConstantImageRule           MOD.Contributions.SymbolImage           MBC.Symbol                           SILK.image
299     @VP.namedConstantImageRule           MOD.Contributions.ConnectionRelationImage STR.ConnectionRelation               SILK.bullet_green
300     @VP.namedConstantImageRule           MOD.Contributions.DocumentsImage        MBC.DocumentsFolder                  SILK.folder
301     @VP.namedConstantImageRule           MOD.Contributions.DocumentImage         DOC.Document                         SILK.page_white
302     @VP.namedConstantImageRule           MOD.Contributions.UrlDocumentImage      DOC.UrlDocument                      SILK.page_white_world
303     @VP.namedConstantImageRule           MOD.Contributions.LibraryImage          L0.Library                           SILK.folder
304     @VP.namedConstantImageRule           MOD.Contributions.SharedOntologyImage   L0.SharedOntology                    SILK.folder_brick
305     @VP.namedConstantImageRule           MOD.Contributions.ProfileImage          DIA.Profile                          SILK.bullet_green
306     @VP.namedConstantImageRule           MOD.Contributions.ProfileEntryImage     DIA.ProfileEntry                     SILK.bullet_green
307     @VP.namedConstantImageRule           MOD.Contributions.StyleImage            DIA.Style                            SILK.bullet_green
308     @VP.namedConstantImageRule           MOD.Contributions.GroupImage            DIA.Group                            SILK.bullet_green
309     @VP.namedConstantImageRule           MOD.Contributions.VariableImage         MBC.Variable                         SILK.bullet_black
310     VP.BrowseContext.HasVisualsContribution MOD.Contributions.ConfiguredComponentImage : VP.VisualsContribution
311         VP.VisualsContribution.HasNodeType MBC.Variable
312         VP.VisualsContribution.HasPriority 1.0
313         VP.VisualsContribution.HasRule MOD.Contributions.ComponentImage : VP.ConstantImageRule
314             VP.ConstantImageRule.HasColumnKey "single"
315             VP.ConstantImageRule.HasImage SILK.brick
316         VP.VisualsContribution.HasCondition MBC.IsComponent
317     VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution
318         VP.VisualsContribution.HasNodeType MBC.Variable
319         VP.VisualsContribution.HasPriority 2.0
320         VP.VisualsContribution.HasRule MOD.Contributions.UserDefinedComponentImage : VP.ConstantImageRule
321             VP.ConstantImageRule.HasColumnKey "single"
322             VP.ConstantImageRule.HasImage IMAGES.UserDefinedComponent
323         VP.VisualsContribution.HasCondition MBC.IsUserDefinedComponentTest
324     VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution
325         VP.VisualsContribution.HasNodeType L0.Library
326         VP.VisualsContribution.HasPriority 2.0
327         VP.VisualsContribution.HasRule MOD.Contributions.FolderLockImage : VP.ConstantImageRule
328             VP.ConstantImageRule.HasColumnKey "single"
329             VP.ConstantImageRule.HasImage IMAGES.FolderLock
330         VP.VisualsContribution.HasCondition TESTS.IsPublished
331     VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution
332         VP.VisualsContribution.HasNodeType STR.ComponentType
333         VP.VisualsContribution.HasPriority 2.0
334         VP.VisualsContribution.HasRule MOD.Contributions.ComponentLockImage : VP.ConstantImageRule
335             VP.ConstantImageRule.HasColumnKey "single"
336             VP.ConstantImageRule.HasImage IMAGES.ComponentLock
337         VP.VisualsContribution.HasCondition TESTS.IsPublished
338     VP.BrowseContext.HasVisualsContribution _ : VP.VisualsContribution
339         VP.VisualsContribution.HasNodeType STR.Component
340         VP.VisualsContribution.HasPriority 1.0
341         VP.VisualsContribution.HasRule MOD.Contributions.UserDefinedComponentImage
342         VP.VisualsContribution.HasCondition MBC.IsUserDefinedComponentTest
343     @VP.namedConstantImageRule           MOD.Contributions.ImageImage            IMAGE.Image                          SILK.image
344     @VP.namedConstantImageRule           MOD.Contributions.ModuleImage           L0.SCLModule                         SILK.box
345     @VP.namedConstantImageRule           MOD.Contributions.PGraphImage           L0.PGraph                            SILK.box
346     @VP.namedConstantImageRule           MOD.Contributions.QueryImage            MOD.SCLQuery                         SILK.script
347     @VP.namedConstantImageRule           MOD.Contributions.CodeImage             STR.ProceduralComponentTypeCode      SILK.book_open
348     @VP.namedConstantImageRule           MOD.Contributions.ComponentTypeScriptImage STR.ComponentTypeScript           SILK.book_open
349     @VP.namedConstantImageRule           MOD.Contributions.SheetBookImage        SHEET.Book                           SILK.folder_table
350     @VP.namedConstantImageRule           MOD.Contributions.SheetImage            SHEET.Spreadsheet                    SILK.table
351     @VP.customImageDecorationRule        STR.ComponentType                       MBC.ComponentTypeLockStatusImageDecorationRule
352     
353 IMAGES = MBC.Images : L0.Library
354 IMAGES.SubscriptionsFolder : IMAGE.PngImage
355     @L0.loadBytes "images/subscriptions.png"
356 IMAGES.ComponentType : IMAGE.PngImage
357     @L0.loadBytes "images/shape_3d.png"
358 IMAGES.UserDefinedComponent : IMAGE.PngImage
359     @L0.loadBytes "images/shape_3d_gray.png"
360 IMAGES.FolderLock : IMAGE.PngImage
361     @L0.loadBytes "images/folder_lock.png"
362 IMAGES.ComponentLock : IMAGE.PngImage
363     @L0.loadBytes "images/shape_3d_lock.png"
364
365 MBC
366     @VP.dropActionContribution MOD.Subscription MAC.Actions.SubscriptionDropAction 1.0
367
368 MOD.sclChildRule : L0.Template
369     @template %action %expression
370         %action : MOD.SCLChildRule
371           MOD.SCLChildRule.getChildren _ : MOD.SCLValue
372             L0.SCLValue.expression %expression
373             L0.HasValueType "Resource -> <ReadGraph> [Resource]"
374
375 MOD.sclAction : L0.Template
376     @template %action %expression
377         %action : MOD.SCLAction
378           MOD.SCLAction.action _ : MOD.SCLValue
379             L0.SCLValue.expression %expression
380             L0.HasValueType "Resource -> <Proc> ()"
381
382 MOD.sclDropAction : L0.Template
383     @template %action %expression
384         %action : MOD.SCLDropAction
385           MOD.SCLDropAction.action _ : MOD.SCLValue
386             L0.SCLValue.expression %expression
387             L0.HasValueType "Resource -> Dynamic -> Integer -> <Proc> ()"
388
389 MOD.sclTest : L0.Template
390     @template %subject %expression
391         %subject : MOD.SCLTest
392             MOD.SCLTest.test _ : MOD.SCLValue
393                 L0.SCLValue.expression %expression
394                 L0.HasValueType "Resource -> <ReadGraph> Boolean"
395
396 MOD.Contributions.NewSheetBook : VP.ActionContribution
397     L0.HasLabel "Spreadsheet"
398     VP.ActionContribution.HasImage SILK.star
399     VP.ActionContribution.HasCategory VP.NewActionCategory
400     VP.ActionContribution.HasNodeType L0.Library
401     VP.ActionContribution.HasAction ACTIONS.NewSheetBook
402
403 MOD.Contributions.ActivateModel : VP.ActionContribution
404     L0.HasLabel "Activate"
405     VP.ActionContribution.HasImage SILK.bullet_go
406     VP.ActionContribution.HasCategory VP.EditActionCategory
407     VP.ActionContribution.HasNodeType SIMU.Model
408     VP.ActionContribution.HasAction ACTIONS.ActivateModel
409
410 MOD.Contributions.Help : VP.ActionContribution
411     L0.HasLabel "Help"
412     VP.ActionContribution.HasImage SILK.help
413     VP.ActionContribution.HasCategory VP.EditActionCategory
414     VP.ActionContribution.HasNodeType L0.Entity
415     VP.ActionContribution.HasAction ACTIONS.Help
416               
417 // Actions
418 MAC    
419     VP.BrowseContext.HasActionContribution MOD.Contributions.Help
420     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
421         L0.HasLabel "Migrate"
422         VP.ActionContribution.HasImage SILK.star
423         VP.ActionContribution.HasCategory VP.EditActionCategory
424         VP.ActionContribution.HasNodeType STR.ComponentType
425         VP.ActionContribution.HasAction ACTIONS.MigrateComponentType
426     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
427         L0.HasLabel "Migrate"
428         VP.ActionContribution.HasImage SILK.star
429         VP.ActionContribution.HasCategory VP.EditActionCategory
430         VP.ActionContribution.HasNodeType L0.SharedOntology
431         VP.ActionContribution.HasAction ACTIONS.MigrateComponentType
432     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
433         L0.HasLabel "Compile Ontology Definitions"
434         VP.ActionContribution.HasImage SILK.star
435         VP.ActionContribution.HasCategory VP.EditActionCategory
436         VP.ActionContribution.HasNodeType L0.SharedOntology
437         VP.ActionContribution.HasAction ACTIONS.CompilePGraphs
438 //    VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
439 //        L0.HasLabel "Migrate"
440 //        VP.ActionContribution.HasImage SILK.star
441 //        VP.ActionContribution.HasCategory VP.EditActionCategory
442 //        VP.ActionContribution.HasNodeType MOD.MasterTypicalCompositeType
443 //        VP.ActionContribution.HasAction ACTIONS.MigrateMasterTypical
444     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
445         L0.HasLabel "Create New Version"
446         VP.ActionContribution.HasImage SILK.new
447         VP.ActionContribution.HasCategory VP.EditActionCategory
448         VP.ActionContribution.HasNodeType STR.ComponentType
449         VP.ActionContribution.HasAction ACTIONS.CreateNewVersion
450         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
451     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
452         L0.HasLabel "Create New Version"
453         VP.ActionContribution.HasImage SILK.new
454         VP.ActionContribution.HasCategory VP.EditActionCategory
455         VP.ActionContribution.HasNodeType L0.SharedOntology
456         VP.ActionContribution.HasAction ACTIONS.CreateNewVersion
457     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
458         L0.HasLabel "Finish for Publishing"
459         VP.ActionContribution.HasImage SILK.lock
460         VP.ActionContribution.HasCategory VP.EditActionCategory
461         VP.ActionContribution.HasNodeType STR.ComponentType
462         VP.ActionContribution.IsVisibleIf TESTS.IsNotPublished
463         VP.ActionContribution.HasAction ACTIONS.FinishComponentTypeForPublishing
464     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
465         L0.HasLabel "Finish for Publishing"
466         VP.ActionContribution.HasImage SILK.lock
467         VP.ActionContribution.HasCategory VP.EditActionCategory
468         VP.ActionContribution.HasNodeType L0.SharedOntology
469         VP.ActionContribution.IsVisibleIf TESTS.IsNotPublished
470         VP.ActionContribution.HasAction ACTIONS.FinishSharedOntologyForPublishing
471     VP.BrowseContext.HasActionContribution MOD.Contributions.NewSCLModule : VP.ActionContribution
472         L0.HasLabel "SCL Module"
473         VP.ActionContribution.HasImage SILK.page_white_text
474         VP.ActionContribution.HasCategory VP.NewActionCategory
475         VP.ActionContribution.HasNodeType
476             L0.Library
477             STR.ComponentType
478         VP.ActionContribution.HasAction ACTIONS.NewSCLModule
479         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
480     VP.BrowseContext.HasActionContribution MOD.Contributions.NewPGraph : VP.ActionContribution
481         L0.HasLabel "Ontology Definition File"
482         VP.ActionContribution.HasImage SILK.page_white_text
483         VP.ActionContribution.HasCategory VP.NewActionCategory
484         VP.ActionContribution.HasNodeType L0.Ontology
485         VP.ActionContribution.HasAction ACTIONS.NewPGraph
486         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
487     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
488         L0.HasLabel "SCL Query"
489         VP.ActionContribution.HasImage SILK.script_add
490         VP.ActionContribution.HasCategory VP.NewActionCategory
491         VP.ActionContribution.HasNodeType L0.Library
492         VP.ActionContribution.HasAction ACTIONS.NewSCLQuery
493         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
494     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
495         L0.HasLabel "SCL Query Type"
496         VP.ActionContribution.HasImage SILK.script_add
497         VP.ActionContribution.HasCategory VP.NewActionCategory
498         VP.ActionContribution.HasNodeType L0.Library
499         VP.ActionContribution.HasAction ACTIONS.NewSCLQueryType
500         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
501     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
502         L0.HasLabel "User Component"
503         VP.ActionContribution.HasImage IMAGES.ComponentType
504         VP.ActionContribution.HasCategory VP.NewActionCategory
505         VP.ActionContribution.HasNodeType MBC.ComponentTypesFolder
506         VP.ActionContribution.HasAction ACTIONS.NewComponentType
507     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
508         L0.HasLabel "User Component"
509         VP.ActionContribution.HasImage IMAGES.ComponentType
510         VP.ActionContribution.HasCategory VP.NewActionCategory
511         VP.ActionContribution.HasNodeType L0.Library
512         VP.ActionContribution.HasAction ACTIONS.NewComponentType
513         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
514     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
515         L0.HasLabel "Procedural User Component"
516         VP.ActionContribution.HasImage IMAGES.ComponentType
517         VP.ActionContribution.HasCategory VP.NewActionCategory
518         VP.ActionContribution.HasNodeType MBC.ComponentTypesFolder
519         VP.ActionContribution.HasAction ACTIONS.NewProceduralComponentType
520     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
521         L0.HasLabel "Procedural User Component"
522         VP.ActionContribution.HasImage IMAGES.ComponentType
523         VP.ActionContribution.HasCategory VP.NewActionCategory
524         VP.ActionContribution.HasNodeType L0.Library
525         VP.ActionContribution.HasAction ACTIONS.NewProceduralComponentType
526         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
527     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
528         L0.HasLabel "Assign Symbol Group..."
529         VP.ActionContribution.HasCategory VP.EditActionCategory
530         VP.ActionContribution.HasNodeType MBC.Symbol
531         VP.ActionContribution.HasAction ACTIONS.AssignSymbolGroup : ACT.Action
532         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
533     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
534         L0.HasLabel "Configure Connection Types..."
535         VP.ActionContribution.HasCategory VP.EditActionCategory
536         VP.ActionContribution.HasNodeType STR.ConnectionRelation
537         VP.ActionContribution.HasAction ACTIONS.ConfigureConnectionTypes : ACT.Action
538         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
539     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
540         L0.HasLabel "Document"
541         VP.ActionContribution.HasImage SILK.page_white
542         VP.ActionContribution.HasCategory VP.NewActionCategory
543         VP.ActionContribution.HasNodeType MBC.DocumentsFolder
544         VP.ActionContribution.HasAction ACTIONS.NewDocument : ACT.Action
545         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
546     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
547         L0.HasLabel "Library"
548         VP.ActionContribution.HasImage SILK.folder
549         VP.ActionContribution.HasCategory VP.NewActionCategory
550         VP.ActionContribution.HasNodeType L0.Library
551         VP.ActionContribution.HasAction ACTIONS.NewLibrary : ACT.Action
552         VP.ActionContribution.IsVisibleIf TESTS.IsContainerNotPublished
553     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
554         L0.HasLabel "Merge Flags"
555         VP.ActionContribution.HasCategory VP.EditActionCategory
556         VP.ActionContribution.HasNodeType STR.Composite
557         VP.ActionContribution.HasAction ACTIONS.MergeFlags : ACT.Action
558     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
559         L0.HasLabel "Rename Diagram Components"
560         VP.ActionContribution.HasCategory VP.EditActionCategory
561         VP.ActionContribution.HasNodeType STR.Composite
562         VP.ActionContribution.HasAction ACTIONS.RenameDiagramComponents
563     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
564         L0.HasLabel "Connection Point"
565         VP.ActionContribution.HasCategory VP.NewActionCategory
566         VP.ActionContribution.HasNodeType STR.ProceduralComponentType
567         VP.ActionContribution.HasNodeType MBC.ConnectionPointDefinitionsFolder
568         VP.ActionContribution.HasAction ACTIONS.NewConnectionPoint : ACT.Action
569     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
570         L0.HasLabel "Symbol"
571         VP.ActionContribution.HasImage SILK.image
572         VP.ActionContribution.HasCategory VP.NewActionCategory
573         VP.ActionContribution.HasNodeType STR.ComponentType
574         VP.ActionContribution.HasAction ACTIONS.NewSymbol : ACT.Action
575     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
576         L0.HasLabel "Copy"
577         VP.ActionContribution.HasImage SILK.page_copy
578         VP.ActionContribution.HasCategory VP.EditActionCategory
579         VP.ActionContribution.HasNodeType STR.ComponentType
580         VP.ActionContribution.HasAction ACTIONS.Copy : ACT.Action        
581     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
582         L0.HasLabel "Cut"
583         VP.ActionContribution.HasImage SILK.cut
584         VP.ActionContribution.HasCategory VP.EditActionCategory
585         VP.ActionContribution.HasNodeType STR.ComponentType
586         VP.ActionContribution.HasAction ACTIONS.Cut : ACT.Action        
587     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
588         L0.HasLabel "Paste"
589         VP.ActionContribution.HasImage SILK.page_paste
590         VP.ActionContribution.HasCategory VP.EditActionCategory
591         VP.ActionContribution.HasNodeType L0.Library
592         VP.ActionContribution.HasAction ACTIONS.Paste : ACT.Action        
593         VP.ActionContribution.IsVisibleIf TESTS.HasSomethingToPaste
594     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
595         L0.HasLabel "Lock"
596         VP.ActionContribution.HasImage SILK.lock
597         VP.ActionContribution.HasCategory VP.EditActionCategory
598         VP.ActionContribution.HasNodeType STR.ComponentType
599         VP.ActionContribution.HasAction ACTIONS.Lock : ACT.Action
600         VP.ActionContribution.IsVisibleIf TESTS.IsNotLocked
601     VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
602         L0.HasLabel "Unlock"
603         VP.ActionContribution.HasImage SILK.lock_open
604         VP.ActionContribution.HasCategory VP.EditActionCategory
605         VP.ActionContribution.HasNodeType STR.ComponentType
606         VP.ActionContribution.HasAction ACTIONS.Unlock : ACT.Action
607         VP.ActionContribution.IsVisibleIf TESTS.IsLocked
608     VP.BrowseContext.SupportsRemovalOf MBC.Symbol
609     VP.BrowseContext.SupportsRenamingOf MBC.Symbol
610     VP.BrowseContext.HasActionContribution
611         MOD.Contributions.NewSheetBook
612
613     @VP.renamingTestContribution
614         L0.SharedOntology
615         TESTS.CanRename
616         0.0
617
618     @VP.actionContributionWithVisibility "Images" L0.Library SILK.image VP.ImportActionCategory ACTIONS.ImportImages MAC.Tests.IsContainerNotPublished
619
620 MOD.Contributions.Delete : VP.ActionContribution
621         L0.HasLabel "Delete"
622         VP.ActionContribution.HasImage SILK.cross
623         VP.ActionContribution.HasCategory VP.EditActionCategory
624         VP.ActionContribution.HasNodeType L0.Entity
625         VP.ActionContribution.HasAction ACTIONS.Delete        
626         VP.ActionContribution.IsVisibleIf TESTS.CanDelete
627         
628 ACTIONS = MAC.Actions : L0.Library
629 ACTIONS.ImportImages : ACT.Action
630 ACTIONS.Delete : ACT.Action
631 ACTIONS.NewLocalLibrary : ACT.Action
632 ACTIONS.SubscriptionDropAction : ACT.DropAction
633 ACTIONS.FinishComponentTypeForPublishing
634   @MOD.sclAction "publishComponentTypeAction"
635 ACTIONS.FinishSharedOntologyForPublishing
636   @MOD.sclAction "publishSharedOntologyAction"
637 ACTIONS.CreateNewVersion
638   @MOD.sclAction "newVersionAction"
639 ACTIONS.NewSCLModule
640   @MOD.sclAction "createSCLModuleAction"
641 ACTIONS.NewPGraph
642   @MOD.sclAction "createPGraphAction"
643 ACTIONS.NewSCLQuery : ACT.Action
644 ACTIONS.NewSCLQueryType
645   @MOD.sclAction "createSCLQueryTypeAction"
646 ACTIONS.NewSheetBook
647   @MOD.sclAction "createSpreadsheetBookAction"
648 ACTIONS.ActivateModel
649   @MOD.sclAction "activateModelAction"
650 ACTIONS.MigrateComponentType : ACT.Action
651 ACTIONS.CompilePGraphs : ACT.Action
652 //ACTIONS.MigrateMasterTypical : ACT.Action
653 ACTIONS.RenameDiagramComponents : ACT.Action
654 ACTIONS.Help : ACT.Action
655
656 ACTIONS.NavigateToSubstructure
657   @MOD.sclAction "navigateToSubstructureAction"
658
659 ACTIONS.NewProceduralComponentType : ACT.Action
660 ACTIONS.NewComponentType : ACT.Action
661
662 MOD.InstantiateUnder <T MOD.SCLAction
663   >-- MOD.InstantiateUnder.HasType --> L0.Type <R L0.IsRelatedTo : L0.TotalFunction
664   @MOD.sclAssertion MOD.SCLAction.action "instantiateUnderAction self" "Resource -> <Proc> ()"
665
666 ACTIONS.InstantiateUnder
667   @MOD.sclAction "instantiateUnderAction self"
668
669 MOD.InstanceOfTest <T MOD.SCLTest
670   >-- MOD.InstanceOfTest.HasType --> L0.Type <R L0.IsRelatedTo : L0.TotalFunction
671   @MOD.sclAssertion MOD.SCLTest.test "instanceOfTest self" "Resource -> <Proc> Boolean"
672
673 MOD.instanceOfTest : L0.Template
674     @template %test %type
675         %test : MOD.InstanceOfTest
676           MOD.InstanceOfTest.HasType %type
677
678 TESTS = MAC.Tests : L0.Library
679 TESTS.IsNotPublished
680   @MOD.sclTest "isNotPublished"
681 TESTS.IsPublished
682   @MOD.sclTest "isPublished"
683 TESTS.IsNotLocked
684   @MOD.sclTest "isNotLocked"
685 TESTS.IsLocked
686   @MOD.sclTest "isLocked"
687 TESTS.IsContainerNotPublished
688   @MOD.sclTest "isContainerNotPublished"
689 TESTS.HasSomethingToPaste
690   @MOD.sclTest "hasSomethingToPaste"
691 TESTS.CanDelete
692   @MOD.sclTest "canDelete"
693 TESTS.CanRename
694   @MOD.sclTest "canRename"
695
696 MOD.Functions.singleVariableSelection : L0.Function
697   L0.HasValueType "a"
698 MOD.Functions.projectSelection : L0.Function
699   L0.HasValueType "a"
700 MOD.Functions.standardPersistor : L0.Function
701   L0.HasValueType "StatePersistor"
702   
703   
704 //MOD.ModelBrowser : MOD.ModelBrowser
705