]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.charts/plugin.xml
Improved usability of shared library export wizard
[simantics/platform.git] / bundles / org.simantics.charts / plugin.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <plugin>
3
4    <extension
5          point="org.simantics.ui.doubleClick">
6       <doubleClickAction
7             name="Chart Double-click handler"
8             priority="15.0"
9             class="org.simantics.charts.ui.ChartDoubleClickHandler">
10       </doubleClickAction>
11    </extension>
12    <extension
13          point="org.eclipse.ui.editors">
14       <editor
15             default="false"
16             name="Time Series"
17             icon="icons/silk/chart_line.png"
18             class="org.simantics.charts.editor.TimeSeriesEditor"
19             matchingStrategy="org.simantics.ui.workbench.editor.input.ResourceEditorInputMatchingStrategy"
20             id="org.simantics.charts.editor.timeseries">
21       </editor>
22    </extension>
23    <extension
24          point="org.simantics.ui.resourceEditorAdapter">
25       <adapterClass
26             priority="50000"
27             class="org.simantics.charts.editor.ChartEditorAdapter">
28       </adapterClass>
29    </extension>
30    <extension
31          point="org.eclipse.ui.handlers">
32       <handler
33             commandId="org.eclipse.ui.edit.copy"
34             class="org.simantics.charts.editor.ChartCopyHandler">
35          <activeWhen>
36             <with
37                   variable="activePartId">
38                <equals
39                      value="org.simantics.charts.editor.timeseries">
40                </equals>
41             </with>
42          </activeWhen>
43       </handler>
44       <handler
45             commandId="org.eclipse.ui.file.print"
46             class="org.simantics.charts.editor.ExportToPdfHandler">
47          <activeWhen>
48             <with
49                   variable="activePartId">
50                <equals
51                      value="org.simantics.charts.editor.timeseries">
52                </equals>
53             </with>
54          </activeWhen>
55       </handler>
56       <handler
57             commandId="org.simantics.event.addMilestone"
58             class="org.simantics.charts.editor.AddMilestoneHandler">
59          <activeWhen>
60             <with
61                   variable="activePartId">
62                <equals
63                      value="org.simantics.charts.editor.timeseries">
64                </equals>
65             </with>
66          </activeWhen>
67       </handler>
68       <handler
69             commandId="org.simantics.charts.linktime"
70             class="org.simantics.charts.ui.LinkTimeHandler">
71          <enabledWhen>
72             <with
73                   variable="activePartId">
74                <equals
75                      value="org.simantics.charts.editor.timeseries">
76                </equals>
77             </with>
78          </enabledWhen>
79          <activeWhen>
80             <with
81                   variable="activePartId">
82                <equals
83                      value="org.simantics.charts.editor.timeseries">
84                </equals>
85             </with>
86          </activeWhen>
87       </handler>
88       <handler
89             commandId="org.simantics.workbench.properties"
90             class="org.simantics.charts.ui.PropertiesHandler">
91          <activeWhen>
92             <with
93                   variable="selection">
94                <or>
95                   <test
96                         args="http://www.simantics.org/Charts-0.0/Chart/Item"
97                         property="org.simantics.graph.resourceType">
98                   </test>
99                   <test
100                         args="http://www.simantics.org/Charts-0.0/TimeSeriesChart"
101                         property="org.simantics.graph.resourceType">
102                   </test>
103                </or>
104             </with>
105          </activeWhen>
106       </handler>
107       <!--<handler
108             commandId="zoomToFit"
109             class="org.simantics.diagram.handler.CanvasCommandDelegate">
110          <activeWhen>
111             <with
112                   variable="activePartId">
113                <equals
114                      value="org.simantics.charts.editor.timeseries">
115                </equals>
116             </with>
117          </activeWhen>
118       </handler>
119       <handler
120             commandId="org.simantics.chart.zoomToFitHoriz"
121             class="org.simantics.diagram.handler.CanvasCommandDelegate">
122          <enabledWhen>
123             <with
124                   variable="activePartId">
125                <equals
126                      value="org.simantics.charts.editor.timeseries">
127                </equals>
128             </with>
129          </enabledWhen>
130          <activeWhen>
131             <with
132                   variable="activePartId">
133                <equals
134                      value="org.simantics.charts.editor.timeseries">
135                </equals>
136             </with>
137          </activeWhen>
138       </handler>
139       <handler
140             commandId="org.simantics.chart.zoomToFitVert"
141             class="org.simantics.diagram.handler.CanvasCommandDelegate">
142          <enabledWhen>
143             <with
144                   variable="activePartId">
145                <equals
146                      value="org.simantics.charts.editor.timeseries">
147                </equals>
148             </with>
149          </enabledWhen>
150          <activeWhen>
151             <with
152                   variable="activePartId">
153                <equals
154                      value="org.simantics.charts.editor.timeseries">
155                </equals>
156             </with>
157          </activeWhen>
158       </handler>
159       <handler
160             commandId="org.simantics.chart.autoscale"
161             class="org.simantics.diagram.handler.CanvasCommandDelegate">
162          <enabledWhen>
163             <with
164                   variable="activePartId">
165                <equals
166                      value="org.simantics.charts.editor.timeseries">
167                </equals>
168             </with>
169          </enabledWhen>
170          <activeWhen>
171             <with
172                   variable="activePartId">
173                <equals
174                      value="org.simantics.charts.editor.timeseries">
175                </equals>
176             </with>
177          </activeWhen>
178       </handler>-->
179    </extension>
180    <extension
181          point="org.eclipse.ui.menus">
182       <menuContribution
183             allPopups="false"
184             locationURI="popup:#timeSeriesChart">
185          <command
186                commandId="org.eclipse.ui.edit.copy"
187                label="Copy Visible Data"
188                style="push"
189                tooltip="Copy Visible Chart Data to Clipboard (as CSV)">
190          </command>
191          <command
192                commandId="org.eclipse.ui.file.print"
193                label="Export To PDF"
194                style="push">
195          </command>
196          <command
197                commandId="org.simantics.event.addMilestone"
198                label="Add milestone"
199                icon="icons/milestone.png"
200                style="push">
201          </command>
202       </menuContribution>
203       <menuContribution
204             locationURI="popup:#GraphExplorerPopup?after=modelling.ext">
205          <dynamic
206                class="org.simantics.charts.ui.SetIndexActions"
207                id="org.simantics.charts.ui.setindex">
208             <visibleWhen
209                   checkEnabled="true">
210                <with
211                      variable="selection">
212                   <test
213                         args="http://www.simantics.org/Charts-0.0/Chart/Item"
214                         property="org.simantics.graph.resourceType">
215                   </test>
216                </with>
217             </visibleWhen>
218          </dynamic>
219          <command
220                commandId="org.simantics.workbench.properties"
221                label="Properties"
222                style="push">
223             <visibleWhen
224                   checkEnabled="true">
225             </visibleWhen>
226          </command>
227          <dynamic
228                class="org.simantics.charts.ui.HideItemsContribution"
229                id="org.simantics.charts.ui.item.hide">
230             <visibleWhen>
231                <with
232                      variable="selection">
233                   <test
234                         args="http://www.simantics.org/Charts-0.0/Chart/Item"
235                         property="org.simantics.graph.allResourcesOfType">
236                   </test>
237                </with>
238             </visibleWhen>
239          </dynamic>
240       </menuContribution>
241       <!--<menuContribution
242             locationURI="toolbar:org.eclipse.ui.main.toolbar">
243          <toolbar
244                label="Element Toolbar"
245                id="org.simantics.modeling.ui.elementtoolbar">
246             <command
247                   commandId="zoomToFit"
248                   icon="icons/horizAndVert16.png"
249                   style="push"
250                   tooltip="Zoom To Fit">
251                <visibleWhen
252                      checkEnabled="false">
253                   <reference
254                         definitionId="org.simantics.charts.context.active">
255                   </reference>
256                </visibleWhen>
257             </command>
258             <command
259                   commandId="org.simantics.chart.zoomToFitHoriz"
260                   icon="icons/horiz16.png"
261                   style="push"
262                   tooltip="Zoom To Fit Horizontally">
263                <visibleWhen
264                      checkEnabled="false">
265                   <reference
266                         definitionId="org.simantics.charts.context.active">
267                   </reference>
268                </visibleWhen>
269             </command>
270             <command
271                   commandId="org.simantics.chart.zoomToFitVert"
272                   icon="icons/vert16.png"
273                   style="push"
274                   tooltip="Zoom To Fit Vertically">
275                <visibleWhen
276                      checkEnabled="false">
277                   <reference
278                         definitionId="org.simantics.charts.context.active">
279                   </reference>
280                </visibleWhen>
281             </command>
282             <command
283                   commandId="org.simantics.chart.autoscale"
284                   icon="icons/autoscale16.png"
285                   style="push"
286                   tooltip="Autoscale Chart">
287                <visibleWhen
288                      checkEnabled="false">
289                   <reference
290                         definitionId="org.simantics.charts.context.active">
291                   </reference>
292                </visibleWhen>
293             </command>
294             <command
295                   commandId="org.simantics.charts.linktime"
296                   icon="icons/link.png"
297                   style="toggle"
298                   tooltip="Link Charts">
299                <visibleWhen
300                      checkEnabled="false">
301                   <reference
302                         definitionId="org.simantics.charts.context.active">
303                   </reference>
304                </visibleWhen>
305             </command>
306          </toolbar>
307       </menuContribution>-->
308    </extension>
309    <extension
310          point="org.eclipse.ui.commands">
311       <category
312             name="Chart Editor"
313             id="org.simantics.charts.category">
314       </category>
315       <command
316             name="Link time window"
317             categoryId="org.simantics.charts.category"
318             id="org.simantics.charts.linktime">
319          <state
320                class="org.simantics.charts.ui.LinkTimeState"
321                id="org.simantics.charts.linktime.state">
322          </state>
323       </command>
324       <!--
325       <command
326             name="Zoom to fit (Horiz)"
327             categoryId="org.simantics.charts.category"
328             id="org.simantics.chart.zoomToFitHoriz">
329       </command>
330       <command
331             name="Zoom to fit (Vert)"
332             categoryId="org.simantics.charts.category"
333             id="org.simantics.chart.zoomToFitVert">
334       </command>
335       <command
336             name="Autoscale"
337             categoryId="org.simantics.charts.category"
338             id="org.simantics.chart.autoscale">
339       </command>-->
340    </extension>
341    <extension
342          point="org.eclipse.ui.preferencePages">
343       <page
344             name="Chart"
345             class="org.simantics.charts.preference.ChartPreferencePage"
346             id="org.simantics.charts.pref">
347       </page>
348       <page
349             name="Default values"
350             category="org.simantics.charts.pref"
351             class="org.simantics.charts.preference.ChartDefaultsPage"
352             id="org.simantics.charts.defaults">
353       </page>
354    </extension>
355    <extension
356          point="org.eclipse.core.runtime.preferences">
357       <initializer
358             class="org.simantics.charts.preference.ChartPreferenceInitializer">
359       </initializer>
360    </extension>
361    <!--<extension
362          point="org.eclipse.ui.bindings">
363       <key
364             commandId="zoomToFit"
365             contextId="org.simantics.charts.editor.context"
366             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
367             sequence="1">
368       </key>
369       <key
370             commandId="org.simantics.chart.zoomToFitHoriz"
371             contextId="org.simantics.charts.editor.context"
372             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
373             sequence="2">
374       </key>
375       <key
376             commandId="org.simantics.chart.zoomToFitVert"
377             contextId="org.simantics.charts.editor.context"
378             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
379             sequence="3">
380       </key>
381       <key
382             commandId="org.simantics.chart.autoscale"
383             contextId="org.simantics.charts.editor.context"
384             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
385             sequence="4">
386       </key>
387       <key
388             commandId="org.simantics.charts.linktime"
389             contextId="org.simantics.charts.editor.context"
390             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
391             sequence="5">
392       </key>
393    </extension>-->
394    <extension
395          point="org.simantics.scl.reflection.binding">
396       <namespace
397             path="http://www.simantics.org/Charts-0.0/Functions">
398          <externalClass
399                className="org.simantics.db.Resource">
400          </externalClass>
401          <externalClass
402                className="org.simantics.db.ReadGraph">
403          </externalClass>
404          <externalClass
405                className="org.simantics.db.layer0.variable.Variable">
406          </externalClass>
407          <class
408                className="org.simantics.charts.function.Labels">
409          </class>
410       </namespace>
411    </extension>
412    <extension
413          point="org.eclipse.ui.contexts">
414       <context
415             name="Show Chart Toolbar"
416             description="Chart UI control visibility controlling context"
417             id="org.simantics.charts.context"
418             parentId="org.eclipse.ui.contexts.window">
419       </context>
420       <context
421             name="In Chart Editor"
422             description="Chart Editor"
423             id="org.simantics.charts.editor.context"
424             parentId="org.eclipse.ui.contexts.window">
425       </context>
426    </extension>
427    <extension
428          point="org.eclipse.core.expressions.definitions">
429       <definition
430             id="org.simantics.charts.context.active">
431          <with
432                variable="activeContexts">
433             <iterate
434                   ifEmpty="false"
435                   operator="or">
436                <equals
437                      value="org.simantics.charts.context">
438                </equals>
439             </iterate>
440          </with>
441       </definition>
442       <definition
443             id="org.simantics.charts.editor.context.active">
444          <with
445                variable="activeContexts">
446             <iterate
447                   ifEmpty="false"
448                   operator="or">
449                <equals
450                      value="org.simantics.charts.editor.context">
451                </equals>
452             </iterate>
453          </with>
454       </definition>
455    </extension>
456    <extension
457          point="org.simantics.export.core.export">
458       <content_type
459             label="Chart"
460             plural="Charts"
461             model="false"
462             icon="platform:/plugin/com.famfamfam.silk/icons/chart_line.png"
463             id="chart">
464       </content_type>
465       <discoverer
466             discoverAction="org.simantics.charts.export.ChartsDiscoverer"
467             content_type_id="chart">
468       </discoverer>
469       <exporter
470             exportPriority="10"
471             content_type_id="chart"
472             formatId="pdf"
473             exportAction="org.simantics.charts.export.ExportChartPDF">
474       </exporter>
475       <exporter
476             exportPriority="10"
477             content_type_id="chart"
478             formatId="csv"
479             exportAction="org.simantics.charts.export.ExportChartCSV">
480       </exporter>
481    </extension>
482    <extension
483          point="org.eclipse.ui.exportWizards">
484       <category
485             name="Generic Modeling"
486             id="org.simantics.export.export">
487       </category>
488       <wizard
489             name="Subscription Data as CSV Text"
490             icon="platform:/plugin/com.famfamfam.silk/icons/table.png"
491             category="org.simantics.export.export"
492             class="org.simantics.charts.ui.CSVExportWizard"
493             id="org.simantics.charts.ui.csv.wizard">
494          <description>
495          </description>
496       </wizard>
497    </extension>
498    <extension
499          id="org.simantics.charts.fragment"
500          point="org.eclipse.e4.workbench.model">
501       <fragment
502             uri="fragment.e4xmi">
503       </fragment>
504    </extension>
505
506 </plugin>