]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.platform.ui.ontology/graph/PlatformUIViews.pgraph
Collect model dependencies in reversed topological order
[simantics/platform.git] / bundles / org.simantics.platform.ui.ontology / graph / PlatformUIViews.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 SIMU = <http://www.simantics.org/Simulation-1.1>
3 PROJECT = <http://www.simantics.org/Project-1.2>
4 MOD = <http://www.simantics.org/Modeling-1.2>
5 STR = <http://www.simantics.org/Structural-1.2>
6 VP = <http://www.simantics.org/Viewpoint-1.2>
7 DATA = <http://www.simantics.org/Datatypes-1.1>
8 DOC = <http://www.simantics.org/Documentation-1.2>
9 SEL = <http://www.simantics.org/SelectionView-1.2>
10 SWT = <http://www.simantics.org/SWT-1.0>
11 SHEET = <http://www.simantics.org/Spreadsheet-1.2>
12 PlatformUI = <http://www.simantics.org/PlatformUI-1.0>
13
14 VIEWS = PlatformUI.Views : L0.Library
15 COMPONENTS = SWT.Components
16
17 VIEWS.UsedColumns = { columns = [
18           {key = "single", label = "Used libraries", tooltip = "Used libraries", width = 80, weight = 1, alignment = "LEFT", grab = true}
19           ]} : SWT.Literals.Columns
20
21 VIEWS.AvailableColumns = { columns = [
22           {key = "single", label = "Available libraries", tooltip = "Available libraries", width = 80, weight = 1, alignment = "LEFT", grab = true}
23           ]} : SWT.Literals.Columns
24
25 SharedLibraries = VIEWS.SharedLibraries : DOC.Document
26 SharedLibraries.Root : DOC.Components.Root
27   @DOC.child1 _ SharedLibraries.Panel
28   
29 SharedLibraries.Panel
30   @SWT.scrolledComposite
31   @DOC.child1 _ SharedLibraries.Panel2
32
33 SharedLibraries.Panel2
34   @SWT.gridComposite 4
35   @DOC.child1 _ SharedLibraries.Cell1
36   @DOC.child2 _ SharedLibraries.Cell2
37   @DOC.child3 _ SharedLibraries.Cell3
38   @DOC.child4 _ SharedLibraries.Cell4
39   @DOC.child5 _ SharedLibraries.Cell5
40   @DOC.child6 _ SharedLibraries.Cell6
41   
42 SharedLibraries.Cell1
43   @SWT.gridCell _ true false 4 SharedLibraries.Explorer1 
44
45 SharedLibraries.Cell2
46   @SWT.gridCell _ true false 1 SharedLibraries.LinkButton 
47
48 SharedLibraries.Cell3
49   @SWT.gridCell _ true false 1 SharedLibraries.UnlinkButton 
50
51 SharedLibraries.Cell4
52   @SWT.gridCell _ true false 1 SharedLibraries.NewButton 
53
54 SharedLibraries.Cell5
55   @SWT.gridCell _ true false 1 SharedLibraries.ImportButton 
56
57 SharedLibraries.Cell6
58   @SWT.gridCell _ true false 4 SharedLibraries.Explorer2 
59
60 SharedLibraries.Explorer1
61   COMPONENTS.Component.NoScroll true
62   @SWT.explorer true true
63     "http://www.simantics.org/PlatformUI-1.0/Views/SharedLibraries/UsedContext"
64     "#SharedLibrarySelection"
65     VIEWS.UsedColumns
66
67 SharedLibraries.Explorer2
68   COMPONENTS.Component.NoScroll true
69   @SWT.explorer true true
70     "http://www.simantics.org/PlatformUI-1.0/Views/SharedLibraries/AvailableContext"
71     "#SharedLibrarySelection"
72     VIEWS.AvailableColumns
73   
74 SharedLibraries.LinkButton
75   @SWT.button "Use"
76
77 SharedLibraries.UnlinkButton
78   @SWT.button "Unlink"
79
80 SharedLibraries.NewButton
81   @SWT.button "New"
82   @VIEWS.sclEvent COMPONENTS.Button.onPress "writeEventHandler input createNewHandler"
83
84 SharedLibraries.ImportButton
85   @SWT.button "Import"
86   @VIEWS.sclEvent COMPONENTS.Button.onPress "writeEventHandler input importHandler"
87
88 SharedLibraries.UseEvent
89   @DOC.commandEvent "writeEventHandler input useSelectedHandler" VIEWS.SCLValue
90   @DOC.singleData SharedLibraries.DefVar SharedLibraries.Explorer2 SharedLibraries.LinkButton DOC.Relations.click "selection" "selection" _ _ _
91
92 SharedLibraries.UnlinkEvent
93   @DOC.commandEvent "writeEventHandler input unlinkSelectedHandler" VIEWS.SCLValue
94   @DOC.singleData SharedLibraries.DefVar2 SharedLibraries.Explorer1 SharedLibraries.UnlinkButton DOC.Relations.click "selection" "selection" _ _ _
95
96 VIEWS.SharedLibraryContribution : SWT.TypedVariableTabContribution
97     SEL.AbstractVariableTabContribution.HasPriority 1
98     SEL.AbstractTypedVariableTabContribution.HasType L0.IndexRoot
99     SWT.TypedVariableTabContribution.HasView SharedLibraries
100     L0.HasLabel "Shared Libraries"
101
102 //VIEWS.SharedLibraryContribution2 : SWT.TypedVariableTabContribution
103 //    SEL.AbstractVariableTabContribution.HasPriority 1
104 //    SEL.AbstractTypedTabContribution.HasType L0.SharedOntology
105 //    SWT.TypedVariableTabContribution.HasView SharedLibraries
106 //    L0.HasLabel "Shared Libraries"
107
108 MBC = MOD.ModelingBrowseContext
109
110 SharedLibraries.UsedContext : VP.BrowseContext
111     VP.BrowseContext.HasVisualsContribution PROJECT.Contributions.StandardNameLabelRule
112     VP.BrowseContext.HasChildContribution SharedLibraries.UsedContext.Children : VP.ChildContribution
113         VP.ChildContribution.HasParentNodeType MBC.Variable
114         VP.ChildContribution.HasChildNodeType L0.SharedOntology
115         VP.ChildContribution.HasRule SharedLibraries.UsedContext.Children.Rule : MOD.SCLChildRule
116             @VIEWS.scl MOD.SCLChildRule.getChildren "usedSharedOntologies2" "Resource -> <ReadGraph> [Resource]"
117
118 SharedLibraries.AvailableContext : VP.BrowseContext
119     VP.BrowseContext.HasVisualsContribution PROJECT.Contributions.StandardNameLabelRule
120     VP.BrowseContext.HasChildContribution SharedLibraries.AvailableContext.Children : VP.ChildContribution
121         VP.ChildContribution.HasParentNodeType MBC.Variable
122         VP.ChildContribution.HasChildNodeType L0.SharedOntology
123         VP.ChildContribution.HasRule SharedLibraries.AvailableContext.Children.Rule : MOD.SCLChildRule
124             @VIEWS.scl MOD.SCLChildRule.getChildren "availableSharedOntologies2" "Resource -> <ReadGraph> [Resource]"
125
126 VIEWS.SCLValue <T DOC.SCLValue
127 /*  @L0.assert L0.SCLValue.environment
128     _ : L0.SCLValue.Environment
129       L0.SCLValue.Environment.moduleName "http://www.simantics.org/PlatformUI-1.0/Views/SCL"
130       L0.SCLValue.Environment.namespace ""*/
131
132 VIEWS.scl : L0.Template
133     @template %subject %property %expression %valueType
134         %subject
135             %property _ : VIEWS.SCLValue
136               L0.SCLValue.expression %expression
137               L0.HasValueType %valueType
138
139 VIEWS.sclEvent : L0.Template
140     @template %subject %property %expression
141         %subject
142             %property _ : VIEWS.SCLValue
143               L0.SCLValue.expression %expression
144               L0.HasValueType "EventHandler"
145
146 VIEWS.RangeSelectionTabContribution : SWT.TypedVariableTabContribution
147     SEL.AbstractVariableTabContribution.HasPriority 1
148     SEL.AbstractTypedVariableTabContribution.HasType SHEET.Spreadsheet
149     SWT.TypedVariableTabContribution.HasView RangeSelectionTab
150     L0.HasLabel "Ranges"
151
152 RangeSelectionTab = VIEWS.RangeSelectionTab : DOC.Document
153 RangeSelectionTab.Root : DOC.Components.Root
154   @DOC.child1 _ RangeSelectionTab.Panel
155
156 RangeSelectionTab.Panel 
157   @SWT.gridComposite 3
158   @DOC.child1 _ RangeSelectionTab.Cell1
159   @DOC.child2 _ RangeSelectionTab.Cell2
160   //@DOC.child3 _ RangeSelectionTab.Cell3
161   //@DOC.child4 _ RangeSelectionTab.Cell4
162
163 RangeSelectionTab.Cell1
164   @SWT.gridCell _ true false 3 RangeSelectionTab.Combo 
165
166 RangeSelectionTab.Cell2
167   @SWT.gridCell _ true true 3 RangeSelectionTab.Text
168
169 RangeSelectionTab.Combo
170   @SWT.combo
171     @DOC.sclValue "availableRanges input" "[String]"
172     @DOC.sclValue "currentRangeName self input" "String"
173     @DOC.sclValue "writeEventHandler2 $ fooHandler self" "AbstractEventHandler" 
174
175 RangeSelectionTab.Text
176   @SWT.sclTextEditor
177     @DOC.sclValue "currentRangeTextAndErrors self input" "TextAndErrors"
178     @DOC.sclValue "writeEventHandler2 $ modifyCodeHandler self input" "AbstractEventHandler" 
179
180