]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.eclipse.ui.workbench/plugin.xml
Clean up code
[lgpl/argeo-commons.git] / org.argeo.eclipse.ui.workbench / plugin.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <?eclipse version="3.4"?>
3 <plugin>
4 <!-- PERSPECTIVES -->
5 <extension
6 point="org.eclipse.ui.perspectives">
7 <perspective
8 name="Monitoring"
9 class="org.argeo.eclipse.ui.workbench.osgi.OsgiExplorerPerspective"
10 id="org.argeo.eclipse.ui.workbench.osgiPerspective"
11 icon="icons/osgi_explorer.gif">
12 </perspective>
13 <perspective
14 name="Data Explorer"
15 class="org.argeo.eclipse.ui.workbench.jcr.JcrBrowserPerspective"
16 id="org.argeo.eclipse.ui.workbench.jcrBrowserPerspective"
17 icon="icons/nodes.gif">
18 </perspective>
19 </extension>
20
21 <!-- Definition of the OSGI perspective -->
22 <extension point="org.eclipse.ui.perspectiveExtensions">
23 <perspectiveExtension targetID="org.argeo.eclipse.ui.workbench.osgiPerspective">
24 <view
25 id="org.argeo.eclipse.ui.workbench.modulesView"
26 minimized="false"
27 ratio="0.5"
28 relationship="left"
29 relative="org.eclipse.ui.editorss"/>
30 <view
31 id="org.argeo.eclipse.ui.workbench.bundlesView"
32 minimized="false"
33 relationship="stack"
34 relative="org.argeo.eclipse.ui.workbench.modulesView"/>
35 <view
36 id="org.argeo.eclipse.ui.workbench.multiplePackagesView"
37 minimized="false"
38 relationship="stack"
39 relative="org.argeo.eclipse.ui.workbench.bundlesView"/>
40 </perspectiveExtension>
41 </extension>
42
43 <!-- VIEWS -->
44 <extension
45 point="org.eclipse.ui.views">
46 <view
47 name="Modules"
48 id="org.argeo.eclipse.ui.workbench.modulesView"
49 icon="icons/service_published.gif"
50 class="org.argeo.eclipse.ui.workbench.osgi.ModulesView">
51 </view>
52 <view
53 name="Bundles"
54 id="org.argeo.eclipse.ui.workbench.bundlesView"
55 icon="icons/bundles.gif"
56 class="org.argeo.eclipse.ui.workbench.osgi.BundlesView">
57 </view>
58 <view
59 name="Multiple Packages"
60 id="org.argeo.eclipse.ui.workbench.multiplePackagesView"
61 icon="icons/node.gif"
62 class="org.argeo.eclipse.ui.workbench.osgi.MultiplePackagesView">
63 </view>
64 <view
65 name="JCR Browser"
66 id="org.argeo.eclipse.ui.workbench.jcrBrowserView"
67 icon="icons/browser.gif"
68 class="org.argeo.eclipse.spring.SpringExtensionFactory">
69 </view>
70 </extension>
71
72 <!-- EDITORS -->
73 <extension
74 point="org.eclipse.ui.editors">
75 <editor
76 name="JCR Query"
77 id="org.argeo.eclipse.ui.workbench.genericJcrQueryEditor"
78 icon="icons/query.png"
79 class="org.argeo.eclipse.spring.SpringExtensionFactory"
80 default="false">
81 </editor>
82 <editor
83 name="Node Editor"
84 id="org.argeo.eclipse.ui.workbench.defaultNodeEditor"
85 icon="icons/query.png"
86 class="org.argeo.eclipse.spring.SpringExtensionFactory"
87 default="false">
88 </editor>
89 </extension>
90
91 <!-- COMMANDS -->
92 <extension
93 point="org.eclipse.ui.commands">
94 <command
95 defaultHandler="org.argeo.eclipse.ui.workbench.commands.OpenEditor"
96 id="org.argeo.eclipse.ui.workbench.openEditor"
97 name="Open an editor given its ID">
98 <commandParameter
99 id="param.jcrNodePath"
100 name="Node path">
101 </commandParameter>
102 <!-- The path to the corresponding node if needed. -->
103 <commandParameter
104 id="param.jcrNodePath"
105 name="Node path">
106 </commandParameter>
107 </command>
108 <command
109 defaultHandler="org.argeo.eclipse.ui.workbench.commands.GetNodeSize"
110 id="org.argeo.eclipse.ui.workbench.getNodeSize"
111 name="Get node size">
112 </command>
113 <command
114 defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
115 id="org.argeo.eclipse.ui.workbench.addRemoteRepository"
116 name="Add remote JCR repository">
117 <!-- <commandParameter
118 id="param.repositoryUri"
119 name="Repository URI">
120 </commandParameter> -->
121 </command>
122 <command
123 defaultHandler="org.argeo.eclipse.ui.workbench.commands.RemoveRemoteRepository"
124 id="org.argeo.eclipse.ui.workbench.removeRemoteRepository"
125 name="Remove remote JCR repository">
126 </command>
127 <command
128 defaultHandler="org.argeo.eclipse.ui.workbench.commands.AddFolderNode"
129 id="org.argeo.eclipse.ui.workbench.addFolderNode"
130 name="Create a new folder">
131 </command>
132 <command
133 defaultHandler="org.argeo.eclipse.ui.workbench.commands.AddPrivileges"
134 id="org.argeo.eclipse.ui.workbench.addPrivileges"
135 name="Add Privileges">
136 </command>
137 <command
138 defaultHandler="org.argeo.eclipse.ui.workbench.commands.CreateWorkspace"
139 id="org.argeo.eclipse.ui.workbench.createWorkspace"
140 name="Create a new workspace">
141 </command>
142 <command
143 defaultHandler="org.argeo.eclipse.ui.workbench.commands.Refresh"
144 id="org.argeo.eclipse.ui.workbench.refresh"
145 name="Refresh">
146 </command>
147 <command
148 defaultHandler="org.argeo.eclipse.ui.workbench.commands.DeleteNodes"
149 id="org.argeo.eclipse.ui.workbench.deleteNodes"
150 name="Delete nodes">
151 </command>
152 <command
153 defaultHandler="org.argeo.eclipse.ui.workbench.commands.ImportFileSystem"
154 id="org.argeo.eclipse.ui.workbench.importFileSystem"
155 name="Import files...">
156 </command>
157 <!-- <command
158 defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
159 id="org.argeo.eclipse.ui.workbench.openFile"
160 name="Open current file">
161 </command> -->
162 <command
163 defaultHandler="org.argeo.eclipse.ui.workbench.commands.DumpNode"
164 id="org.argeo.eclipse.ui.workbench.dumpNode"
165 name="Dump Current Selected Node">
166 </command>
167 <command
168 defaultHandler="org.argeo.eclipse.ui.workbench.commands.SortChildNodes"
169 id="org.argeo.eclipse.ui.workbench.sortChildNodes"
170 name="Sort node tree">
171 <!-- FIXME: default value does not work -->
172 <state
173 id="org.argeo.eclipse.ui.workbench.sortChildNodes.toggleState"
174 class="org.eclipse.ui.handlers.RegistryToggleState:true" >
175 <!-- <class class="org.eclipse.jface.commands.ToggleState">
176 <parameter
177 name="default"
178 value="true" />
179 </class> -->
180 </state>
181 </command>
182 </extension>
183
184 <!-- Menus -->
185 <extension point="org.eclipse.ui.menus">
186 <!-- Browser view specific menu -->
187 <menuContribution
188 locationURI="menu:org.argeo.eclipse.ui.workbench.jcrBrowserView">
189 <!-- See bug 149 -->
190 <!-- <command
191 commandId="org.argeo.eclipse.ui.workbench.openGenericJcrQueryEditor"
192 icon="icons/query.png"
193 style="push">
194 </command> -->
195 <command
196 commandId="org.argeo.eclipse.ui.workbench.addRemoteRepository"
197 icon="icons/addRepo.gif"
198 style="push">
199 </command>
200 <command
201 commandId="org.argeo.eclipse.ui.workbench.sortChildNodes"
202 icon="icons/sort.gif"
203 style="toggle"
204 label="Sort child nodes"
205 tooltip="NOTE: displaying unsorted nodes will enhance overall performances">
206 </command>
207 </menuContribution>
208 <!-- Browser view popup context menu -->
209 <menuContribution
210 locationURI="popup:org.argeo.eclipse.ui.workbench.jcrBrowserView">
211 <command
212 commandId="org.argeo.eclipse.ui.workbench.refresh"
213 icon="icons/refresh.png"
214 style="push">
215 </command>
216 <command
217 commandId="org.argeo.eclipse.ui.workbench.addFolderNode"
218 icon="icons/addFolder.gif"
219 label="Add Folder"
220 style="push">
221 <visibleWhen>
222 <iterate>
223 <and>
224 <or>
225 <instanceof
226 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.SingleJcrNodeElem">
227 </instanceof>
228 <instanceof
229 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.WorkspaceElem">
230 </instanceof>
231 </or>
232 <with variable="activeMenuSelection"><count value="1"/></with>
233 </and>
234 </iterate>
235 </visibleWhen>
236 </command>
237 <command
238 commandId="org.argeo.eclipse.ui.workbench.addPrivileges"
239 icon="icons/addPrivileges.png"
240 label="Add Privileges"
241 style="push">
242 <visibleWhen>
243 <iterate>
244 <and>
245 <or>
246 <instanceof
247 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.SingleJcrNodeElem">
248 </instanceof>
249 <instanceof
250 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.WorkspaceElem">
251 </instanceof>
252 </or>
253 <with variable="activeMenuSelection"><count value="1"/></with>
254 </and>
255 </iterate>
256 </visibleWhen>
257 </command>
258 <command
259 commandId="org.argeo.eclipse.ui.workbench.createWorkspace"
260 icon="icons/addWorkspace.png"
261 label="Create Workspace"
262 style="push">
263 <visibleWhen>
264 <iterate>
265 <and>
266 <or>
267 <instanceof
268 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.RepositoryElem">
269 </instanceof>
270 </or>
271 <with variable="activeMenuSelection"><count value="1"/></with>
272 </and>
273 </iterate>
274 </visibleWhen>
275 </command>
276 <command
277 commandId="org.argeo.eclipse.ui.workbench.deleteNodes"
278 icon="icons/remove.gif"
279 label="Delete Nodes"
280 style="push">
281 <visibleWhen>
282 <iterate>
283 <or>
284 <instanceof
285 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.SingleJcrNodeElem" />
286 <instanceof
287 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.WorkspaceElem" />
288 </or>
289 </iterate>
290 </visibleWhen>
291 </command>
292 <command
293 commandId="org.argeo.eclipse.ui.workbench.importFileSystem"
294 icon="icons/import_fs.png"
295 style="push"
296 tooltip="Import files from the files sytem">
297 <visibleWhen>
298 <iterate>
299 <and>
300 <or>
301 <instanceof
302 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.SingleJcrNodeElem" />
303 <instanceof
304 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.WorkspaceElem" />
305 </or>
306 <with variable="activeMenuSelection"><count value="1"/></with>
307 </and>
308 </iterate>
309 </visibleWhen>
310 </command>
311 <command
312 commandId="org.argeo.eclipse.ui.workbench.addRemoteRepository"
313 icon="icons/addRepo.gif"
314 style="push">
315 <visibleWhen>
316 <iterate>
317 <or>
318 <instanceof
319 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.RepositoriesElem" />
320 <instanceof
321 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.RepositoryElem" />
322 </or>
323 </iterate>
324 </visibleWhen>
325 </command>
326 <command
327 commandId="org.argeo.eclipse.ui.workbench.removeRemoteRepository"
328 icon="icons/remove.gif"
329 style="push">
330 <visibleWhen>
331 <iterate>
332 <or>
333 <instanceof
334 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.RemoteRepositoryElem" />
335 </or>
336 </iterate>
337 </visibleWhen>
338 </command>
339 <command
340 commandId="org.argeo.eclipse.ui.workbench.getNodeSize"
341 icon="icons/getSize.gif"
342 style="push">
343 <visibleWhen>
344 <iterate>
345 <or>
346 <instanceof
347 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.SingleJcrNodeElem" />
348 <instanceof
349 value="org.argeo.eclipse.ui.workbench.jcr.internal.model.WorkspaceElem" />
350 </or>
351 </iterate>
352 </visibleWhen>
353 </command>
354 <command
355 commandId="org.argeo.eclipse.ui.workbench.dumpNode"
356 icon="icons/dumpNode.gif"
357 label="Dump Node"
358 style="push">
359 <visibleWhen>
360 <iterate> <and>
361 <instanceof value="org.argeo.eclipse.ui.workbench.jcr.internal.model.SingleJcrNodeElem"></instanceof>
362 <with variable="activeMenuSelection"><count value="1"/></with>
363 </and> </iterate>
364 </visibleWhen>
365 </command>
366 </menuContribution>
367 </extension>
368
369 <!-- Reduce visibility of JCR Browser perspective to users that are in ROLE_ADMIN -->
370 <extension
371 point="org.eclipse.ui.activities">
372 <activity
373 description="Only for admins"
374 id="org.argeo.eclipse.ui.workbench.adminActivity"
375 name="Jcr Technical Admin">
376 <enabledWhen>
377 <with variable="roles">
378 <iterate ifEmpty="false" operator="or">
379 <equals value="ROLE_ADMIN" />
380 </iterate>
381 </with>
382 </enabledWhen>
383 </activity>
384 <activityPatternBinding
385 pattern="org.argeo.eclipse.ui.workbench/org.argeo.eclipse.ui.workbench.osgiPerspective"
386 isEqualityPattern="true"
387 activityId="org.argeo.eclipse.ui.workbench.adminActivity">
388 <!-- activityId="org.argeo.security.ui.adminActivity" -->
389 </activityPatternBinding>
390 <activityPatternBinding
391 pattern="org.argeo.eclipse.ui.workbench/org.argeo.eclipse.ui.workbench.jcrBrowserPerspective"
392 isEqualityPattern="true"
393 activityId="org.argeo.eclipse.ui.workbench.adminActivity">
394 </activityPatternBinding>
395 </extension>
396 </plugin>