Revision 9af003a7
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/fragment.e4xmi | ||
---|---|---|
282 | 282 |
<elements xsi:type="commands:Command" xmi:id="_ZolPMKTaEeejf7ggYkp-TA" elementId="eu.etaxonomy.taxeditor.editor.command.polytomouskeylist.openGraph" commandName="Open Graph Editor"/> |
283 | 283 |
<elements xsi:type="commands:Command" xmi:id="_cxTosKzzEeeBIsZyvYlAaA" elementId="eu.etaxonomy.taxeditor.group.cdmauthorities.edit" commandName="%command.name.34"/> |
284 | 284 |
<elements xsi:type="commands:Command" xmi:id="_PDjFMLsKEeeQJq8FDGEi1g" elementId="eu.etaxonomy.taxeditor.editor.command.openSpecimenEditorFromMenu" commandName="Open Specimen Editor"/> |
285 |
<elements xsi:type="commands:Command" xmi:id="_61IwAK20EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.datasource" commandName="%command.name.39"/> |
|
286 |
<elements xsi:type="commands:Command" xmi:id="_x3ecAK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.reference" commandName="%command.name.23"/> |
|
287 |
<elements xsi:type="commands:Command" xmi:id="_1CaG8K21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.name" commandName="%command.name.24"/> |
|
288 |
<elements xsi:type="commands:Command" xmi:id="_2vSfgK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.team" commandName="%command.name.25"/> |
|
289 |
<elements xsi:type="commands:Command" xmi:id="_4nv18K21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.person" commandName="%command.name.26"/> |
|
285 | 290 |
</fragments> |
286 | 291 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_pZmusEalEeeXMc6kSYO7Xg" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView" positionInList="after:eu.etaxonomy.taxeditor.workbench.menuseparator.navigation"> |
287 | 292 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_5s52EIZ3EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.showViewMenu.concept" label="%command.label.6" command="_WPjpoDSnEeek0dKsFNy--Q"> |
... | ... | |
313 | 318 |
<elements xsi:type="commands:Handler" xmi:id="_9MRA4KNrEeee0INlRJv_6Q" elementId="eu.etaxonomy.taxeditor.editor.view.checklist.e4.handler.OpenChecklistEditorHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.checklist.e4.handler.OpenChecklistEditorHandlerE4" command="_Qi76oKNsEeee0INlRJv_6Q"/> |
314 | 319 |
<elements xsi:type="commands:Handler" xmi:id="_MAx1UKz0EeeBIsZyvYlAaA" elementId="eu.etaxonomy.taxeditor.editor.group.authority.e4.handler.EditCdmAuthoritiesHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.group.authority.e4.handler.EditCdmAuthoritiesHandlerE4" command="_cxTosKzzEeeBIsZyvYlAaA"/> |
315 | 320 |
<elements xsi:type="commands:Handler" xmi:id="_SJx2ULsKEeeQJq8FDGEi1g" elementId="eu.etaxonomy.taxeditor.editor.view.derivate.handler.OpenSpecimenEditorFromMenu" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.derivate.handler.OpenSpecimenEditorFromMenu" command="_PDjFMLsKEeeQJq8FDGEi1g"/> |
321 |
<elements xsi:type="commands:Handler" xmi:id="_MtFB8K21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.view.datasource.e4.handler.CreateDataSourceHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.datasource.e4.handler.CreateDataSourceHandlerE4" command="_61IwAK20EeeykrJkROy5EA"/> |
|
322 |
<elements xsi:type="commands:Handler" xmi:id="_TlvGYK22EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handler.create.NewReferenceHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.handler.create.NewReferenceHandler" command="_x3ecAK21EeeykrJkROy5EA"/> |
|
323 |
<elements xsi:type="commands:Handler" xmi:id="_Xi9w8K22EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handler.create.NewNameHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.handler.create.NewNameHandler" command="_1CaG8K21EeeykrJkROy5EA"/> |
|
324 |
<elements xsi:type="commands:Handler" xmi:id="_ahCroK22EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handler.create.NewTeamHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.handler.create.NewTeamHandler" command="_2vSfgK21EeeykrJkROy5EA"/> |
|
325 |
<elements xsi:type="commands:Handler" xmi:id="_c0Ba4K22EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handler.create.NewPersonHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.handler.create.NewPersonHandler" command="_4nv18K21EeeykrJkROy5EA"/> |
|
316 | 326 |
</fragments> |
317 | 327 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_OyvD8KNOEee5fYT78qEx0A" featurename="children" parentElementId="bulkeditor.menus.openmenu" positionInList="last"> |
318 | 328 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_SZZBkKNOEee5fYT78qEx0A" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.specimen_editor" label="%command.label.DERIVATIVE_EDITOR" command="_PDjFMLsKEeeQJq8FDGEi1g"/> |
... | ... | |
320 | 330 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_Fw06MKz0EeeBIsZyvYlAaA" featurename="children" parentElementId="eu.etaxonomy.taxeditor.bulkeditor.popupmenu.bulkeditor" positionInList="after:eu.etaxonomy.taxeditor.bulkeditor.menuseparator.afterNew"> |
321 | 331 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_JzLVUKz0EeeBIsZyvYlAaA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandname34" label="%command.name.34" command="_cxTosKzzEeeBIsZyvYlAaA"/> |
322 | 332 |
</fragments> |
333 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_UH7p8K21EeeykrJkROy5EA" featurename="children" parentElementId="eu.etaxonomy.navigation.menu.new"> |
|
334 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_dy1B8K21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel46" label="%command.label.46" command="_1CaG8K21EeeykrJkROy5EA"> |
|
335 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_oAwOgK21EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/> |
|
336 |
</elements> |
|
337 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_fC3GcK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel47" label="%command.label.47" command="_x3ecAK21EeeykrJkROy5EA"> |
|
338 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_o70voK21EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/> |
|
339 |
</elements> |
|
340 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_iqFEwK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel1" label="%command.label.1" command="_2vSfgK21EeeykrJkROy5EA"> |
|
341 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_qRTU0K21EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/> |
|
342 |
</elements> |
|
343 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_jlY2cK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel2" label="%command.label.2" command="_4nv18K21EeeykrJkROy5EA"> |
|
344 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_rxgjUK21EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/> |
|
345 |
</elements> |
|
346 |
<elements xsi:type="menu:MenuSeparator" xmi:id="_lyGloK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.menuseparator.21"/> |
|
347 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_ZkTzEK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel48" label="%command.label.48" command="_61IwAK20EeeykrJkROy5EA"/> |
|
348 |
</fragments> |
|
323 | 349 |
</fragment:ModelFragments> |
eu.etaxonomy.taxeditor.editor/plugin.xml | ||
---|---|---|
114 | 114 |
</extension> |
115 | 115 |
<extension |
116 | 116 |
point="org.eclipse.ui.menus"> |
117 |
<menuContribution |
|
118 |
locationURI="menu:eu.etaxonomy.navigation.menu.new?after=eu.etaxonomy.navigation.menu.new.separator1"> |
|
119 |
<command |
|
120 |
commandId="eu.etaxonomy.taxeditor.editor.command.new.name" |
|
121 |
label="%command.label.46" |
|
122 |
style="push"> |
|
123 |
<visibleWhen |
|
124 |
checkEnabled="true"> |
|
125 |
<reference |
|
126 |
definitionId="isCdmStoreConnected"> |
|
127 |
</reference> |
|
128 |
</visibleWhen> |
|
129 |
</command> |
|
130 |
<command |
|
131 |
commandId="eu.etaxonomy.taxeditor.editor.command.new.reference" |
|
132 |
label="%command.label.47" |
|
133 |
style="push"> |
|
134 |
<visibleWhen |
|
135 |
checkEnabled="true"> |
|
136 |
<reference |
|
137 |
definitionId="isCdmStoreConnected"> |
|
138 |
</reference> |
|
139 |
</visibleWhen> |
|
140 |
</command> |
|
141 |
<command |
|
142 |
commandId="eu.etaxonomy.taxeditor.editor.command.new.team" |
|
143 |
label="%command.label.1" |
|
144 |
style="push"> |
|
145 |
<visibleWhen |
|
146 |
checkEnabled="true"> |
|
147 |
<reference |
|
148 |
definitionId="isCdmStoreConnected"> |
|
149 |
</reference> |
|
150 |
</visibleWhen> |
|
151 |
</command> |
|
152 |
<command |
|
153 |
commandId="eu.etaxonomy.taxeditor.editor.command.new.person" |
|
154 |
label="%command.label.2" |
|
155 |
style="push"> |
|
156 |
<visibleWhen |
|
157 |
checkEnabled="true"> |
|
158 |
<reference |
|
159 |
definitionId="isCdmStoreConnected"> |
|
160 |
</reference> |
|
161 |
</visibleWhen> |
|
162 |
</command> |
|
163 |
<separator |
|
164 |
name="eu.etaxonomy.navigation.menu.new.separator2" |
|
165 |
visible="true"> |
|
166 |
</separator> |
|
167 |
<separator |
|
168 |
name="eu.etaxonomy.navigation.menu.new.separator3" |
|
169 |
visible="true"> |
|
170 |
</separator> |
|
171 |
<command |
|
172 |
commandId="eu.etaxonomy.taxeditor.editor.command.new.datasource" |
|
173 |
label="%command.label.48" |
|
174 |
style="push"> |
|
175 |
</command> |
|
176 |
</menuContribution> |
|
177 | 117 |
<menuContribution |
178 | 118 |
locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?before=eu.etaxonomy.taxeditor.store.showViewMenu.internal"> |
179 | 119 |
<separator |
... | ... | |
196 | 136 |
</visibleWhen> |
197 | 137 |
</command> |
198 | 138 |
</menuContribution> |
199 |
<menuContribution |
|
200 |
locationURI="menu:org.eclipse.ui.main.menu.navigate"> |
|
201 |
<command |
|
202 |
commandId="eu.etaxonomy.taxeditor.editor.command.openParent" |
|
203 |
label="%command.label.8" |
|
204 |
style="push"> |
|
205 |
</command> |
|
206 |
</menuContribution> |
|
207 | 139 |
|
208 | 140 |
|
209 | 141 |
|
... | ... | |
259 | 191 |
id="eu.etaxonomy.taxeditor.editor.taxon.name.command.category" |
260 | 192 |
name="%category.name.0"> |
261 | 193 |
</category> |
262 |
<command |
|
263 |
categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category" |
|
264 |
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.OpenParentHandler" |
|
265 |
id="eu.etaxonomy.taxeditor.editor.command.openParent" |
|
266 |
name="%command.name"> |
|
267 |
</command> |
|
268 | 194 |
<!-- <command |
269 | 195 |
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.MoveTaxonHandler" |
270 | 196 |
id="eu.etaxonomy.taxeditor.editor.name.moveTaxon" |
... | ... | |
293 | 219 |
id="eu.etaxonomy.taxeditor.editor.new.category" |
294 | 220 |
name="%category.name.4"> |
295 | 221 |
</category> |
296 |
<command |
|
297 |
categoryId="eu.etaxonomy.taxeditor.editor.new.category" |
|
298 |
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewReferenceHandler" |
|
299 |
id="eu.etaxonomy.taxeditor.editor.command.new.reference" |
|
300 |
name="%command.name.23"> |
|
301 |
</command> |
|
302 |
<command |
|
303 |
categoryId="eu.etaxonomy.taxeditor.editor.new.category" |
|
304 |
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewNameHandler" |
|
305 |
id="eu.etaxonomy.taxeditor.editor.command.new.name" |
|
306 |
name="%command.name.24"> |
|
307 |
</command> |
|
308 |
<command |
|
309 |
categoryId="eu.etaxonomy.taxeditor.editor.new.category" |
|
310 |
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewTeamHandler" |
|
311 |
id="eu.etaxonomy.taxeditor.editor.command.new.team" |
|
312 |
name="%command.name.25"> |
|
313 |
</command> |
|
314 |
<command |
|
315 |
categoryId="eu.etaxonomy.taxeditor.editor.new.category" |
|
316 |
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewPersonHandler" |
|
317 |
id="eu.etaxonomy.taxeditor.editor.command.new.person" |
|
318 |
name="%command.name.26"> |
|
319 |
</command> |
|
320 | 222 |
<category |
321 | 223 |
id="eu.etaxonomy.taxeditor.editor.view.concept.category" |
322 | 224 |
name="%category.name.6"> |
... | ... | |
325 | 227 |
id="eu.etaxonomy.taxeditor.bulkeditor.group.category" |
326 | 228 |
name="%category.name.7"> |
327 | 229 |
</category> |
328 |
<command |
|
329 |
id="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler" |
|
330 |
name="%command.name.38"> |
|
331 |
<commandParameter |
|
332 |
id="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler.uuid" |
|
333 |
name="taxonNodeUuid" |
|
334 |
optional="true" |
|
335 |
typeId="eu.etaxonomy.taxeditor.uuidParameterType"> |
|
336 |
</commandParameter> |
|
337 |
</command> |
|
338 |
<command |
|
339 |
categoryId="eu.etaxonomy.taxeditor.editor.new.category" |
|
340 |
defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler" |
|
341 |
id="eu.etaxonomy.taxeditor.editor.command.new.datasource" |
|
342 |
name="%command.name.39"> |
|
343 |
</command> |
|
344 | 230 |
<command |
345 | 231 |
id="eu.etaxonomy.taxeditor.editor.handler.showOnlyIndividualAssociations" |
346 | 232 |
name="%command.name.41"> |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenParentHandler.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.editor.handler; |
|
11 |
|
|
12 |
import org.eclipse.core.commands.AbstractHandler; |
|
13 |
import org.eclipse.core.commands.ExecutionEvent; |
|
14 |
import org.eclipse.core.commands.ExecutionException; |
|
15 |
import org.eclipse.core.commands.IHandler; |
|
16 |
|
|
17 |
/** |
|
18 |
* <p>OpenParentHandler class.</p> |
|
19 |
* |
|
20 |
* @author n.hoffmann |
|
21 |
* @created 03.06.2009 |
|
22 |
* @version 1.0 |
|
23 |
*/ |
|
24 |
public class OpenParentHandler extends AbstractHandler implements IHandler { |
|
25 |
|
|
26 |
/** {@inheritDoc} */ |
|
27 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
28 |
throw new RuntimeException("Open parent not supported anymore"); //$NON-NLS-1$ |
|
29 |
// Taxon parent = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon().getTaxonomicParent(); |
|
30 |
// |
|
31 |
// if(parent != null){ |
|
32 |
// try { |
|
33 |
// EditorUtil.openTaxonNode(parent.getUuid()); |
|
34 |
// } catch (PartInitException e) { |
|
35 |
// throw new RuntimeException("Error opening parent taxon", e); |
|
36 |
// } catch (Exception e) { |
|
37 |
// MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage()); |
|
38 |
// } |
|
39 |
// } |
|
40 |
// |
|
41 |
// return null; |
|
42 |
} |
|
43 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/create/NewNameHandler.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.editor.handler.create; |
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
13 |
import org.eclipse.core.commands.AbstractHandler; |
|
14 |
import org.eclipse.core.commands.ExecutionEvent; |
|
15 |
import org.eclipse.core.commands.ExecutionException; |
|
16 |
import org.eclipse.core.commands.IHandler; |
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
17 | 16 |
import org.eclipse.jface.wizard.WizardDialog; |
18 |
import org.eclipse.ui.handlers.HandlerUtil;
|
|
17 |
import org.eclipse.swt.widgets.Shell;
|
|
19 | 18 |
|
20 | 19 |
import eu.etaxonomy.taxeditor.newWizard.NewNonViralNameWizard; |
21 | 20 |
|
22 | 21 |
/** |
23 |
* <p>NewNameHandler class.</p> |
|
24 | 22 |
* |
25 |
* @author n.hoffmann
|
|
26 |
* @created Jun 1, 2010
|
|
27 |
* @version 1.0
|
|
23 |
* @author pplitzner
|
|
24 |
* @date 10.10.2017
|
|
25 |
* |
|
28 | 26 |
*/ |
29 |
public class NewNameHandler extends AbstractHandler implements IHandler { |
|
30 |
private static final Logger logger = Logger.getLogger(NewNameHandler.class); |
|
27 |
public class NewNameHandler { |
|
31 | 28 |
|
32 |
/* (non-Javadoc) |
|
33 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
34 |
*/ |
|
35 |
/** {@inheritDoc} */ |
|
36 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
29 |
@Execute |
|
30 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
37 | 31 |
NewNonViralNameWizard wizard = new NewNonViralNameWizard(); |
38 | 32 |
wizard.init(null, null); |
39 |
WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
|
|
33 |
WizardDialog dialog = new WizardDialog(shell, wizard);
|
|
40 | 34 |
dialog.open(); |
41 |
|
|
42 |
return null; |
|
35 |
|
|
43 | 36 |
} |
44 | 37 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/create/NewPersonHandler.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.editor.handler.create; |
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
13 |
import org.eclipse.core.commands.AbstractHandler; |
|
14 |
import org.eclipse.core.commands.ExecutionEvent; |
|
15 |
import org.eclipse.core.commands.ExecutionException; |
|
16 |
import org.eclipse.core.commands.IHandler; |
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
17 | 16 |
import org.eclipse.jface.wizard.WizardDialog; |
18 |
import org.eclipse.ui.handlers.HandlerUtil;
|
|
17 |
import org.eclipse.swt.widgets.Shell;
|
|
19 | 18 |
|
20 | 19 |
import eu.etaxonomy.taxeditor.newWizard.NewPersonWizard; |
21 | 20 |
|
22 | 21 |
/** |
23 |
* <p>NewPersonHandler class.</p> |
|
24 | 22 |
* |
25 |
* @author n.hoffmann
|
|
26 |
* @created Jun 1, 2010
|
|
27 |
* @version 1.0
|
|
23 |
* @author pplitzner
|
|
24 |
* @date 10.10.2017
|
|
25 |
* |
|
28 | 26 |
*/ |
29 |
public class NewPersonHandler extends AbstractHandler implements IHandler { |
|
30 |
private static final Logger logger = Logger |
|
31 |
.getLogger(NewPersonHandler.class); |
|
27 |
public class NewPersonHandler { |
|
32 | 28 |
|
33 |
/* (non-Javadoc) |
|
34 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
35 |
*/ |
|
36 |
/** {@inheritDoc} */ |
|
37 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
29 |
@Execute |
|
30 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
38 | 31 |
NewPersonWizard wizard = new NewPersonWizard(); |
39 | 32 |
wizard.init(null, null); |
40 |
WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
|
|
33 |
WizardDialog dialog = new WizardDialog(shell, wizard);
|
|
41 | 34 |
dialog.open(); |
42 |
|
|
43 |
return null; |
|
44 | 35 |
} |
45 | 36 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/create/NewReferenceHandler.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.editor.handler.create; |
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
13 |
import org.eclipse.core.commands.AbstractHandler; |
|
14 |
import org.eclipse.core.commands.ExecutionEvent; |
|
15 |
import org.eclipse.core.commands.ExecutionException; |
|
16 |
import org.eclipse.core.commands.IHandler; |
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
17 | 16 |
import org.eclipse.jface.wizard.WizardDialog; |
18 |
import org.eclipse.ui.handlers.HandlerUtil;
|
|
17 |
import org.eclipse.swt.widgets.Shell;
|
|
19 | 18 |
|
20 | 19 |
import eu.etaxonomy.taxeditor.newWizard.NewReferenceWizard; |
21 | 20 |
|
22 | 21 |
/** |
23 |
* <p>NewReferenceHandler class.</p> |
|
24 | 22 |
* |
25 |
* @author n.hoffmann
|
|
26 |
* @created Jun 1, 2010
|
|
27 |
* @version 1.0
|
|
23 |
* @author pplitzner
|
|
24 |
* @date 10.10.2017
|
|
25 |
* |
|
28 | 26 |
*/ |
29 |
public class NewReferenceHandler extends AbstractHandler implements IHandler { |
|
30 |
private static final Logger logger = Logger |
|
31 |
.getLogger(NewReferenceHandler.class); |
|
27 |
public class NewReferenceHandler { |
|
32 | 28 |
|
33 |
/** {@inheritDoc} */
|
|
34 |
public Object execute(ExecutionEvent event) throws ExecutionException {
|
|
29 |
@Execute
|
|
30 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
|
|
35 | 31 |
NewReferenceWizard wizard = new NewReferenceWizard(); |
36 | 32 |
wizard.init(null, null); |
37 |
WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
|
|
33 |
WizardDialog dialog = new WizardDialog(shell, wizard);
|
|
38 | 34 |
dialog.open(); |
39 |
|
|
40 |
return null; |
|
41 | 35 |
} |
42 |
|
|
43 | 36 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/create/NewTeamHandler.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.editor.handler.create; |
11 | 11 |
|
12 |
import org.apache.log4j.Logger; |
|
13 |
import org.eclipse.core.commands.AbstractHandler; |
|
14 |
import org.eclipse.core.commands.ExecutionEvent; |
|
15 |
import org.eclipse.core.commands.ExecutionException; |
|
16 |
import org.eclipse.core.commands.IHandler; |
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
17 | 16 |
import org.eclipse.jface.wizard.WizardDialog; |
18 |
import org.eclipse.ui.handlers.HandlerUtil;
|
|
17 |
import org.eclipse.swt.widgets.Shell;
|
|
19 | 18 |
|
20 | 19 |
import eu.etaxonomy.taxeditor.newWizard.NewTeamWizard; |
21 | 20 |
|
22 | 21 |
/** |
23 |
* <p>NewTeamHandler class.</p> |
|
24 | 22 |
* |
25 |
* @author n.hoffmann
|
|
26 |
* @created Jun 1, 2010
|
|
27 |
* @version 1.0
|
|
23 |
* @author pplitzner
|
|
24 |
* @date 10.10.2017
|
|
25 |
* |
|
28 | 26 |
*/ |
29 |
public class NewTeamHandler extends AbstractHandler implements IHandler { |
|
30 |
private static final Logger logger = Logger.getLogger(NewTeamHandler.class); |
|
27 |
public class NewTeamHandler { |
|
31 | 28 |
|
32 |
/* (non-Javadoc) |
|
33 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
34 |
*/ |
|
35 |
/** {@inheritDoc} */ |
|
36 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
29 |
@Execute |
|
30 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
37 | 31 |
NewTeamWizard wizard = new NewTeamWizard(); |
38 | 32 |
wizard.init(null, null); |
39 |
WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
|
|
33 |
WizardDialog dialog = new WizardDialog(shell, wizard);
|
|
40 | 34 |
dialog.open(); |
41 |
|
|
42 |
return null; |
|
43 | 35 |
} |
44 | 36 |
} |
eu.etaxonomy.taxeditor.navigation/fragment.e4xmi | ||
---|---|---|
142 | 142 |
<elements xsi:type="commands:Command" xmi:id="_8C8AEKQVEeeTrq_CRrR-jg" elementId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete" commandName="%command.name.11"/> |
143 | 143 |
<elements xsi:type="commands:Command" xmi:id="_6iiY8LVbEeeZf_R8QJbACw" elementId="eu.etaxonomy.taxeditor.navigation.command.linkWithTaxon" commandName="Link with taxon"/> |
144 | 144 |
</fragments> |
145 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_3CbhIK25EeeykrJkROy5EA" featurename="children" parentElementId="eu.etaxonomy.navigation.menu.new"> |
|
146 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_M9FakK26EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.commandlabel13" label="%command.label.13" command="_Nx06MJIvEeeJAdt8ZUxyaw"> |
|
147 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_Pucu8K26EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/> |
|
148 |
</elements> |
|
149 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_SCz-QK26EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.commandlabel14" label="%command.label.14" command="_Vco-4JIxEeeJAdt8ZUxyaw"> |
|
150 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_SecxYK26EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/> |
|
151 |
</elements> |
|
152 |
</fragments> |
|
145 | 153 |
</fragment:ModelFragments> |
eu.etaxonomy.taxeditor.navigation/plugin.xml | ||
---|---|---|
29 | 29 |
</visibleWhen> |
30 | 30 |
</dynamic> |
31 | 31 |
</menuContribution> |
32 |
<menuContribution |
|
33 |
locationURI="menu:eu.etaxonomy.navigation.menu.new"> |
|
34 |
<command |
|
35 |
commandId="eu.etaxonomy.taxeditor.navigation.command.create.taxonNode" |
|
36 |
label="%command.label.13" |
|
37 |
style="push"> |
|
38 |
<visibleWhen |
|
39 |
checkEnabled="true"> |
|
40 |
<reference |
|
41 |
definitionId="isCdmStoreConnected"> |
|
42 |
</reference> |
|
43 |
</visibleWhen> |
|
44 |
</command> |
|
45 |
<separator |
|
46 |
name="eu.etaxonomy.navigation.menu.new.separator1" |
|
47 |
visible="true"> |
|
48 |
</separator> |
|
49 |
<command |
|
50 |
commandId="eu.etaxonomy.taxeditor.navigation.create.classification" |
|
51 |
id="eu.etaxonomy.taxeditor.navigation.create.classificationHandler" |
|
52 |
label="%command.label.14" |
|
53 |
style="push"> |
|
54 |
<visibleWhen |
|
55 |
checkEnabled="true"> |
|
56 |
<reference |
|
57 |
definitionId="isCdmStoreConnected"> |
|
58 |
</reference> |
|
59 |
</visibleWhen> |
|
60 |
</command> |
|
61 |
</menuContribution> |
|
62 | 32 |
</extension> |
63 | 33 |
<extension |
64 | 34 |
point="org.eclipse.ui.navigator.navigatorContent"> |
eu.etaxonomy.taxeditor.store/fragment.e4xmi | ||
---|---|---|
110 | 110 |
<elements xsi:type="commands:Command" xmi:id="_zDy74KqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.command.exportCsvName" commandName="%wizard.name.19"/> |
111 | 111 |
<elements xsi:type="commands:Command" xmi:id="_zIKegKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.command.exportCsvPrint" commandName="%wizard.name.20"/> |
112 | 112 |
<elements xsi:type="commands:Command" xmi:id="_zLKvMKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.command.exportCdmLight" commandName="%wizard.name.22"/> |
113 |
<elements xsi:type="commands:Command" xmi:id="_R00rwK2dEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow" commandName="%command.name.CONNECT"/> |
|
114 |
<elements xsi:type="commands:Command" xmi:id="_S868QK2dEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow" commandName="%command.name.4"/> |
|
115 |
<elements xsi:type="commands:Command" xmi:id="_bfjZwK2fEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler" commandName="%command.name.11"/> |
|
116 |
<elements xsi:type="commands:Command" xmi:id="_KQP_sK2gEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.operations.reconnect" commandName="%command.name.RE_CONNECT"/> |
|
117 |
<elements xsi:type="commands:Command" xmi:id="_SXZF8K2gEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.openPasswordWizzard" commandName="%command.name.10"/> |
|
113 | 118 |
</fragments> |
114 | 119 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_swGH0GhvEee3K4uKJljEYg" featurename="handlers" parentElementId="org.eclipse.e4.legacy.ide.application"> |
115 | 120 |
<elements xsi:type="commands:Handler" xmi:id="_rVEdIGcjEee0qLTtA2ZpVQ" elementId="eu.etaxonomy.taxeditor.featuretree.e4.handler.RemoveFeatureHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.featuretree.e4.handler.RemoveFeatureHandler" command="_fNBtQGcjEee0qLTtA2ZpVQ"/> |
... | ... | |
132 | 137 |
<elements xsi:type="commands:Handler" xmi:id="_W3SNYKqaEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.io.e4.out.csv.name.OpenCsvNameExportWizard" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.io.e4.out.csv.name.OpenCsvNameExportWizard" command="_zDy74KqZEeeXcJGhyhlrKA"/> |
133 | 138 |
<elements xsi:type="commands:Handler" xmi:id="_YKaCIKqaEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.io.e4.out.csv.print.OpenCsvPrintExportWizard" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.io.e4.out.csv.print.OpenCsvPrintExportWizard" command="_zIKegKqZEeeXcJGhyhlrKA"/> |
134 | 139 |
<elements xsi:type="commands:Handler" xmi:id="_Y2UF4KqaEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.io.e4.out.cdmlight.OpenCdmLightExportWizard" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.io.e4.out.cdmlight.OpenCdmLightExportWizard" command="_zLKvMKqZEeeXcJGhyhlrKA"/> |
140 |
<elements xsi:type="commands:Handler" xmi:id="_faMDUK2fEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.handler.e4.OpenDistributionEditorWizardHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.e4.OpenDistributionEditorWizardHandlerE4" command="_bfjZwK2fEeeykrJkROy5EA"/> |
|
141 |
<elements xsi:type="commands:Handler" xmi:id="_4wcDcK2rEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.handler.e4.ShowLoginWindowHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.e4.ShowLoginWindowHandlerE4" command="_S868QK2dEeeykrJkROy5EA"/> |
|
142 |
<elements xsi:type="commands:Handler" xmi:id="_8X6gcK2rEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.handler.e4.ReconnectHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.e4.ReconnectHandlerE4" command="_KQP_sK2gEeeykrJkROy5EA"/> |
|
143 |
<elements xsi:type="commands:Handler" xmi:id="_8g19gK2sEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.handler.e4.ShowRemotingLoginWindowHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.e4.ShowRemotingLoginWindowHandlerE4" command="_R00rwK2dEeeykrJkROy5EA"/> |
|
144 |
<elements xsi:type="commands:Handler" xmi:id="_D6BxkK2tEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.handler.e4.OpenPasswordWizzardHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.e4.OpenPasswordWizzardHandlerE4" command="_SXZF8K2gEeeykrJkROy5EA"/> |
|
145 |
<elements xsi:type="commands:Handler" xmi:id="_H98S8K2tEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.handler.e4.SwitchUserHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.e4.SwitchUserHandlerE4" command="_S868QK2dEeeykrJkROy5EA"/> |
|
135 | 146 |
</fragments> |
136 | 147 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_qT4hgIfTEeecZ4F2Y9Z0Og" featurename="children" parentElementId="eu.etaxonomy.taxeditor.workbench.menu.window" positionInList="before:eu.etaxonomy.taxeditor.application.windowMenu.last"> |
137 | 148 |
<elements xsi:type="menu:Menu" xmi:id="_LT3P8IfcEeecZ4F2Y9Z0Og" elementId="eu.etaxonomy.taxeditor.store.menu.termeditor" label="Term Editor"> |
... | ... | |
170 | 181 |
<children xsi:type="menu:HandledMenuItem" xmi:id="_tBUcEKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportCsvPrint" label="%wizard.name.20" command="_zIKegKqZEeeXcJGhyhlrKA"/> |
171 | 182 |
<children xsi:type="menu:HandledMenuItem" xmi:id="_uruvcKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportCdmLight" label="%wizard.name.22" command="_zLKvMKqZEeeXcJGhyhlrKA"/> |
172 | 183 |
</elements> |
184 |
<elements xsi:type="menu:MenuSeparator" xmi:id="_URhG8K25EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.menuseparator.4"/> |
|
185 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_oL9dIK2uEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.commandlabelconnect" label="%command.label.CONNECT" command="_R00rwK2dEeeykrJkROy5EA"/> |
|
186 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_qRrzgK2uEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.commandlabel5" label="%command.label.5" command="_S868QK2dEeeykrJkROy5EA"> |
|
187 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_zRHMoK2uEeeykrJkROy5EA" coreExpressionId="isUserLoggedIn"/> |
|
188 |
</elements> |
|
189 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_rZtLgK2uEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.commandlabelre_connect" label="%command.label.RE_CONNECT" command="_KQP_sK2gEeeykrJkROy5EA"> |
|
190 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_0b9PIK2uEeeykrJkROy5EA" coreExpressionId="isUserLoggedIn"/> |
|
191 |
</elements> |
|
192 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_tKrZ4K2uEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.commandlabelchange_password" label="%command.label.CHANGE_PASSWORD" command="_SXZF8K2gEeeykrJkROy5EA"> |
|
193 |
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_1cb0sK2uEeeykrJkROy5EA" coreExpressionId="isUserLoggedIn"/> |
|
194 |
</elements> |
|
173 | 195 |
</fragments> |
174 | 196 |
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_mNW70LMnEeeMU61m8yqdaA" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView" positionInList="after:eu.etaxonomy.taxeditor.workbench.menuseparator.referencing"> |
175 | 197 |
<elements xsi:type="menu:HandledMenuItem" xmi:id="_mNW727MnEeeMU61m8yqdaA" elementId="eu.etaxonomy.taxeditor.store.showViewMenu.sessions" label="%view.name.SESSIONS" command="_bnVKsCZxEeeQLpuomSmVoQ"> |
eu.etaxonomy.taxeditor.store/plugin.xml | ||
---|---|---|
4 | 4 |
<extension-point id="eu.etaxonomy.taxeditor.store.cdmViewer" name="Cdm Viewer" schema="schema/eu.etaxonomy.taxeditor.store.cdmViewer.exsd"/> |
5 | 5 |
<extension |
6 | 6 |
point="org.eclipse.ui.menus"> |
7 |
<menuContribution |
|
8 |
locationURI="menu:eu.etaxonomy.taxeditor.workbench.menu.file?after=eu.etaxonomy.taxeditor.application.filemenu.io"> |
|
9 |
<command |
|
10 |
commandId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow" |
|
11 |
label="%command.label.CONNECT" |
|
12 |
style="push"> |
|
13 |
</command> |
|
14 |
<command |
|
15 |
commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow" |
|
16 |
label="%command.label.5" |
|
17 |
style="push"> |
|
18 |
<visibleWhen |
|
19 |
checkEnabled="true"> |
|
20 |
<reference |
|
21 |
definitionId="isUserLoggedIn"> |
|
22 |
</reference> |
|
23 |
</visibleWhen> |
|
24 |
</command> |
|
25 |
<command |
|
26 |
commandId="eu.etaxonomy.taxeditor.store.operations.reconnect" |
|
27 |
label="%command.label.RE_CONNECT" |
|
28 |
style="push"> |
|
29 |
<visibleWhen |
|
30 |
checkEnabled="true"> |
|
31 |
<reference |
|
32 |
definitionId="isUserLoggedIn"> |
|
33 |
</reference> |
|
34 |
</visibleWhen> |
|
35 |
</command> |
|
36 |
<command |
|
37 |
commandId="eu.etaxonomy.taxeditor.store.openPasswordWizzard" |
|
38 |
label="%command.label.CHANGE_PASSWORD" |
|
39 |
style="push"> |
|
40 |
<visibleWhen |
|
41 |
checkEnabled="true"> |
|
42 |
<reference |
|
43 |
definitionId="isUserLoggedIn"> |
|
44 |
</reference> |
|
45 |
</visibleWhen> |
|
46 |
</command> |
|
47 |
<separator |
|
48 |
name="eu.etaxonomy.taxeditor.application.filemenu.login" |
|
49 |
visible="true"> |
|
50 |
</separator> |
|
51 |
</menuContribution> |
|
52 | 7 |
<menuContribution |
53 | 8 |
locationURI="toolbar:org.eclipse.ui.trim.status"> |
54 | 9 |
<toolbar |
... | ... | |
59 | 14 |
</toolbar> |
60 | 15 |
</menuContribution> |
61 | 16 |
</extension> |
62 |
<extension |
|
63 |
point="org.eclipse.ui.handlers"> |
|
64 |
<handler |
|
65 |
class="eu.etaxonomy.taxeditor.view.datasource.handler.DeleteDataSourceHandler" |
|
66 |
commandId="eu.etaxonomy.taxeditor.view.datasource.delete"> |
|
67 |
<activeWhen> |
|
68 |
<with |
|
69 |
variable="activePartId"> |
|
70 |
<equals |
|
71 |
value="eu.etaxonomy.taxeditor.view.datasource"> |
|
72 |
</equals> |
|
73 |
</with> |
|
74 |
</activeWhen> |
|
75 |
</handler> |
|
76 |
<handler |
|
77 |
class="eu.etaxonomy.taxeditor.handler.ShowRemotingLoginWindowHandler" |
|
78 |
commandId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow"> |
|
79 |
</handler> |
|
80 |
<handler |
|
81 |
class="eu.etaxonomy.taxeditor.handler.OpenPasswordWizzardHandler" |
|
82 |
commandId="eu.etaxonomy.taxeditor.store.openPasswordWizzard"> |
|
83 |
<enabledWhen> |
|
84 |
<reference |
|
85 |
definitionId="isUserLoggedIn"> |
|
86 |
</reference></enabledWhen> |
|
87 |
</handler> |
|
88 |
<handler |
|
89 |
class="eu.etaxonomy.taxeditor.handler.OpenDistributionEditorWizardHandler" |
|
90 |
commandId="eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler"> |
|
91 |
<activeWhen> |
|
92 |
<reference |
|
93 |
definitionId="hasROLE_PROJECT_MANAGER"> |
|
94 |
</reference> |
|
95 |
</activeWhen> |
|
96 |
</handler> |
|
97 |
<handler |
|
98 |
class="eu.etaxonomy.taxeditor.handler.OpenImportPreferenceHandler" |
|
99 |
commandId="eu.etaxonomy.taxeditor.store.open.OpenImportPreferenceHandler"> |
|
100 |
<activeWhen> |
|
101 |
<reference |
|
102 |
definitionId="hasROLE_PROJECT_MANAGER"> |
|
103 |
</reference> |
|
104 |
</activeWhen> |
|
105 |
</handler> |
|
106 |
<handler |
|
107 |
class="eu.etaxonomy.taxeditor.handler.SwitchUserHandler" |
|
108 |
commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"> |
|
109 |
<activeWhen> |
|
110 |
<reference |
|
111 |
definitionId="isRemoting"> |
|
112 |
</reference> |
|
113 |
</activeWhen> |
|
114 |
</handler> |
|
115 |
</extension> |
|
116 |
<extension |
|
117 |
name="%extension.name.0" |
|
118 |
point="org.eclipse.ui.commands"> |
|
119 |
<command |
|
120 |
defaultHandler="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler" |
|
121 |
id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow" |
|
122 |
name="%command.name.4"> |
|
123 |
</command> |
|
124 |
<command |
|
125 |
id="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow" |
|
126 |
name="%command.name.CONNECT"> |
|
127 |
</command> |
|
128 |
<command |
|
129 |
defaultHandler="eu.etaxonomy.taxeditor.handler.ReconnectHandler" |
|
130 |
id="eu.etaxonomy.taxeditor.store.operations.reconnect" |
|
131 |
name="%command.name.RE_CONNECT"> |
|
132 |
</command> |
|
133 |
<command |
|
134 |
id="eu.etaxonomy.taxeditor.store.openPasswordWizzard" |
|
135 |
name="%command.name.10"> |
|
136 |
</command> |
|
137 |
<command |
|
138 |
id="eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler" |
|
139 |
name="%command.name.11"> |
|
140 |
</command> |
|
141 |
<command |
|
142 |
defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.ChangeConnectionHandler" |
|
143 |
id="eu.etaxonomy.taxeditor.datasource.connect" |
|
144 |
name="%command.name.12"> |
|
145 |
</command> |
|
146 |
<command |
|
147 |
defaultHandler="eu.etaxonomy.taxeditor.handler.OpenInspectSessionsHandler" |
|
148 |
id="eu.etaxonomy.taxeditor.store.open.InspectSessionsDialog" |
|
149 |
name="%command.name.INSPECT_ACTIVE_SESSIONS"> |
|
150 |
</command> |
|
151 |
<command |
|
152 |
defaultHandler="eu.etaxonomy.taxeditor.handler.OpenHandler" |
|
153 |
id="eu.etaxonomy.taxeditor.store.open" |
|
154 |
name="%command.name.15"> |
|
155 |
</command> |
|
156 |
</extension> |
|
157 |
<extension |
|
158 |
point="org.eclipse.ui.commands"> |
|
159 |
<commandParameterType |
|
160 |
converter="eu.etaxonomy.taxeditor.handler.UuidsParameterTypeConverter" |
|
161 |
id="eu.etaxonomy.taxeditor.uuidParameterType" |
|
162 |
type="java.util.UUID"> |
|
163 |
</commandParameterType> |
|
164 |
<commandParameterType |
|
165 |
converter="eu.etaxonomy.taxeditor.handler.UuidsParameterTypeConverter" |
|
166 |
id="eu.etaxonomy.taxeditor.uuidsParameterType" |
|
167 |
type="java.util.List"> |
|
168 |
</commandParameterType> |
|
169 |
</extension> |
|
170 | 17 |
<extension |
171 | 18 |
point="org.eclipse.ui.newWizards"> |
172 | 19 |
<wizard |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenDistributionEditorWizardHandler.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2014 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
package eu.etaxonomy.taxeditor.handler; |
|
10 |
|
|
11 |
import org.eclipse.core.commands.AbstractHandler; |
|
12 |
import org.eclipse.core.commands.ExecutionEvent; |
|
13 |
import org.eclipse.core.commands.ExecutionException; |
|
14 |
import org.eclipse.jface.wizard.WizardDialog; |
|
15 |
|
|
16 |
import eu.etaxonomy.taxeditor.preference.wizard.AvailableDistributionWizard; |
|
17 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
|
18 |
|
|
19 |
/** |
|
20 |
* @author a.oppermann |
|
21 |
* @date 21.07.2014 |
|
22 |
* |
|
23 |
*/ |
|
24 |
public class OpenDistributionEditorWizardHandler extends AbstractHandler{ |
|
25 |
|
|
26 |
String commandID = "eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler"; |
|
27 |
|
|
28 |
@Override |
|
29 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
30 |
AvailableDistributionWizard availableDistributionWizard = new AvailableDistributionWizard(); |
|
31 |
WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), |
|
32 |
availableDistributionWizard); |
|
33 |
|
|
34 |
dialog.open(); |
|
35 |
return null; |
|
36 |
} |
|
37 |
|
|
38 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenPasswordWizzardHandler.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler; |
|
11 |
|
|
12 |
import org.eclipse.core.commands.AbstractHandler; |
|
13 |
import org.eclipse.core.commands.ExecutionEvent; |
|
14 |
import org.eclipse.core.commands.ExecutionException; |
|
15 |
import org.eclipse.core.commands.IHandler; |
|
16 |
import org.eclipse.jface.wizard.WizardDialog; |
|
17 |
|
|
18 |
import eu.etaxonomy.cdm.model.common.User; |
|
19 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
|
20 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
21 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
22 |
import eu.etaxonomy.taxeditor.ui.password.PasswordWizard; |
|
23 |
|
|
24 |
/** |
|
25 |
* <p>ShowLoginWindowHandler class.</p> |
|
26 |
* |
|
27 |
* @author n.hoffmann |
|
28 |
* @created Aug 7, 2009 |
|
29 |
* @version 1.0 |
|
30 |
*/ |
|
31 |
public class OpenPasswordWizzardHandler extends AbstractHandler implements IHandler{ |
|
32 |
|
|
33 |
/* (non-Javadoc) |
|
34 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
35 |
*/ |
|
36 |
/** {@inheritDoc} */ |
|
37 |
@Override |
|
38 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
39 |
|
|
40 |
Object principal = CdmStore.getCurrentAuthentiation().getPrincipal(); |
|
41 |
|
|
42 |
if(principal instanceof User){ |
|
43 |
|
|
44 |
PasswordWizard wizard = new PasswordWizard((User)principal, null); |
|
45 |
WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(), wizard); |
|
46 |
|
|
47 |
dialog.open(); |
|
48 |
|
|
49 |
} else { |
|
50 |
// should never happen, log an error |
|
51 |
MessagingUtils.error(OpenPasswordWizzardHandler.class, "The principal currently authenticated is not a eu.etaxonomy.cdm.model.common.User", null); |
|
52 |
} |
|
53 |
|
|
54 |
return null; |
|
55 |
|
|
56 |
} |
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ReconnectHandler.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler; |
|
11 |
|
|
12 |
import org.eclipse.core.commands.AbstractHandler; |
|
13 |
import org.eclipse.core.commands.ExecutionEvent; |
|
14 |
import org.eclipse.core.commands.ExecutionException; |
|
15 |
import org.eclipse.core.commands.IHandler; |
|
16 |
import org.eclipse.swt.SWT; |
|
17 |
import org.eclipse.ui.handlers.HandlerUtil; |
|
18 |
|
|
19 |
import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource; |
|
20 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
21 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
|
22 |
|
|
23 |
/** |
|
24 |
* |
|
25 |
* |
|
26 |
* @author c.mathew |
|
27 |
*/ |
|
28 |
public class ReconnectHandler extends AbstractHandler implements IHandler { |
|
29 |
|
|
30 |
/* (non-Javadoc) |
|
31 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
32 |
*/ |
|
33 |
/** {@inheritDoc} */ |
|
34 |
@Override |
|
35 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
36 |
|
|
37 |
RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event), |
|
38 |
SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); |
|
39 |
|
|
40 |
loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), true, true); |
|
41 |
|
|
42 |
return null; |
|
43 |
|
|
44 |
} |
|
45 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowLoginWindowHandler.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler; |
|
11 |
|
|
12 |
import org.eclipse.core.commands.AbstractHandler; |
|
13 |
import org.eclipse.core.commands.ExecutionEvent; |
|
14 |
import org.eclipse.core.commands.ExecutionException; |
|
15 |
import org.eclipse.core.commands.IHandler; |
|
16 |
import org.eclipse.ui.handlers.HandlerUtil; |
|
17 |
|
|
18 |
import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog; |
|
19 |
|
|
20 |
/** |
|
21 |
* <p>ShowLoginWindowHandler class.</p> |
|
22 |
* |
|
23 |
* @author n.hoffmann |
|
24 |
* @created Aug 7, 2009 |
|
25 |
* @version 1.0 |
|
26 |
*/ |
|
27 |
public class ShowLoginWindowHandler extends AbstractHandler implements IHandler{ |
|
28 |
|
|
29 |
/* (non-Javadoc) |
|
30 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
31 |
*/ |
|
32 |
/** {@inheritDoc} */ |
|
33 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
34 |
|
|
35 |
LoginDialog loginDialog = new LoginDialog(HandlerUtil.getActiveShell(event)); |
|
36 |
loginDialog.open(); |
|
37 |
|
|
38 |
return null; |
|
39 |
|
|
40 |
} |
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowRemotingLoginWindowHandler.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler; |
|
11 |
|
|
12 |
import org.eclipse.core.commands.AbstractHandler; |
|
13 |
import org.eclipse.core.commands.ExecutionEvent; |
|
14 |
import org.eclipse.core.commands.ExecutionException; |
|
15 |
import org.eclipse.core.commands.IHandler; |
|
16 |
import org.eclipse.swt.SWT; |
|
17 |
import org.eclipse.ui.handlers.HandlerUtil; |
|
18 |
|
|
19 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
|
20 |
|
|
21 |
/** |
|
22 |
* |
|
23 |
* |
|
24 |
* @author c.mathew |
|
25 |
*/ |
|
26 |
public class ShowRemotingLoginWindowHandler extends AbstractHandler implements IHandler{ |
|
27 |
|
|
28 |
/* (non-Javadoc) |
|
29 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
30 |
*/ |
|
31 |
/** {@inheritDoc} */ |
|
32 |
@Override |
|
33 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
34 |
|
|
35 |
RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event), |
|
36 |
SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); |
|
37 |
loginDialog.open(); |
|
38 |
|
|
39 |
|
|
40 |
return null; |
|
41 |
|
|
42 |
} |
|
43 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/SwitchUserHandler.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler; |
|
11 |
|
|
12 |
import org.eclipse.core.commands.AbstractHandler; |
|
13 |
import org.eclipse.core.commands.ExecutionEvent; |
|
14 |
import org.eclipse.core.commands.ExecutionException; |
|
15 |
import org.eclipse.core.commands.IHandler; |
|
16 |
import org.eclipse.swt.SWT; |
|
17 |
import org.eclipse.ui.handlers.HandlerUtil; |
|
18 |
|
|
19 |
import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource; |
|
20 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
21 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
|
22 |
|
|
23 |
/** |
|
24 |
* |
|
25 |
* |
|
26 |
* @author c.mathew |
|
27 |
*/ |
|
28 |
public class SwitchUserHandler extends AbstractHandler implements IHandler { |
|
29 |
|
|
30 |
/* (non-Javadoc) |
|
31 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
|
32 |
*/ |
|
33 |
/** {@inheritDoc} */ |
|
34 |
@Override |
|
35 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
|
36 |
|
|
37 |
RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event), |
|
38 |
SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); |
|
39 |
|
|
40 |
loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), false, false); |
|
41 |
|
|
42 |
return null; |
|
43 |
|
|
44 |
} |
|
45 |
} |
|
46 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/e4/OpenDistributionEditorWizardHandlerE4.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2014 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
package eu.etaxonomy.taxeditor.handler.e4; |
|
10 |
|
|
11 |
import javax.inject.Named; |
|
12 |
|
|
13 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
14 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
15 |
import org.eclipse.jface.wizard.WizardDialog; |
|
16 |
import org.eclipse.swt.widgets.Shell; |
|
17 |
|
|
18 |
import eu.etaxonomy.taxeditor.preference.wizard.AvailableDistributionWizard; |
|
19 |
|
|
20 |
/** |
|
21 |
* |
|
22 |
* @author pplitzner |
|
23 |
* @date 10.10.2017 |
|
24 |
* |
|
25 |
*/ |
|
26 |
public class OpenDistributionEditorWizardHandlerE4 { |
|
27 |
|
|
28 |
String commandID = "eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler"; |
|
29 |
|
|
30 |
@Execute |
|
31 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
32 |
AvailableDistributionWizard availableDistributionWizard = new AvailableDistributionWizard(); |
|
33 |
WizardDialog dialog = new WizardDialog(shell, |
|
34 |
availableDistributionWizard); |
|
35 |
|
|
36 |
dialog.open(); |
|
37 |
} |
|
38 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/e4/OpenPasswordWizzardHandlerE4.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler.e4; |
|
11 |
|
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
16 |
import org.eclipse.jface.wizard.WizardDialog; |
|
17 |
import org.eclipse.swt.widgets.Shell; |
|
18 |
|
|
19 |
import eu.etaxonomy.cdm.model.common.User; |
|
20 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
21 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
22 |
import eu.etaxonomy.taxeditor.ui.password.PasswordWizard; |
|
23 |
|
|
24 |
/** |
|
25 |
* |
|
26 |
* @author pplitzner |
|
27 |
* @date 10.10.2017 |
|
28 |
* |
|
29 |
*/ |
|
30 |
public class OpenPasswordWizzardHandlerE4 { |
|
31 |
|
|
32 |
@Execute |
|
33 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
34 |
|
|
35 |
Object principal = CdmStore.getCurrentAuthentiation().getPrincipal(); |
|
36 |
|
|
37 |
if(principal instanceof User){ |
|
38 |
|
|
39 |
PasswordWizard wizard = new PasswordWizard((User)principal, null); |
|
40 |
WizardDialog dialog = new WizardDialog(shell, wizard); |
|
41 |
|
|
42 |
dialog.open(); |
|
43 |
|
|
44 |
} else { |
|
45 |
// should never happen, log an error |
|
46 |
MessagingUtils.error(OpenPasswordWizzardHandlerE4.class, "The principal currently authenticated is not a eu.etaxonomy.cdm.model.common.User", null); |
|
47 |
} |
|
48 |
} |
|
49 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/e4/ReconnectHandlerE4.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler.e4; |
|
11 |
|
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
16 |
import org.eclipse.swt.SWT; |
|
17 |
import org.eclipse.swt.widgets.Shell; |
|
18 |
|
|
19 |
import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource; |
|
20 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
21 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
|
22 |
|
|
23 |
/** |
|
24 |
* |
|
25 |
* @author pplitzner |
|
26 |
* @date 10.10.2017 |
|
27 |
* |
|
28 |
*/ |
|
29 |
public class ReconnectHandlerE4 { |
|
30 |
|
|
31 |
@Execute |
|
32 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
33 |
|
|
34 |
RemotingLoginDialog loginDialog = new RemotingLoginDialog(shell, |
|
35 |
SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); |
|
36 |
|
|
37 |
loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), true, true); |
|
38 |
} |
|
39 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/e4/ShowLoginWindowHandlerE4.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler.e4; |
|
11 |
|
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
16 |
import org.eclipse.swt.widgets.Shell; |
|
17 |
|
|
18 |
import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog; |
|
19 |
|
|
20 |
/** |
|
21 |
* |
|
22 |
* @author pplitzner |
|
23 |
* @date 10.10.2017 |
|
24 |
* |
|
25 |
*/ |
|
26 |
public class ShowLoginWindowHandlerE4 { |
|
27 |
|
|
28 |
@Execute |
|
29 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
30 |
|
|
31 |
LoginDialog loginDialog = new LoginDialog(shell); |
|
32 |
loginDialog.open(); |
|
33 |
} |
|
34 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/e4/ShowRemotingLoginWindowHandlerE4.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler.e4; |
|
11 |
|
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
16 |
import org.eclipse.swt.SWT; |
|
17 |
import org.eclipse.swt.widgets.Shell; |
|
18 |
|
|
19 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
|
20 |
|
|
21 |
/** |
|
22 |
* |
|
23 |
* @author pplitzner |
|
24 |
* @date 10.10.2017 |
|
25 |
* |
|
26 |
*/ |
|
27 |
public class ShowRemotingLoginWindowHandlerE4 { |
|
28 |
|
|
29 |
@Execute |
|
30 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
31 |
|
|
32 |
RemotingLoginDialog loginDialog = new RemotingLoginDialog(shell, |
|
33 |
SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); |
|
34 |
loginDialog.open(); |
|
35 |
} |
|
36 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/e4/SwitchUserHandlerE4.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.handler.e4; |
|
11 |
|
|
12 |
import javax.inject.Named; |
|
13 |
|
|
14 |
import org.eclipse.e4.core.di.annotations.Execute; |
|
15 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
16 |
import org.eclipse.swt.SWT; |
|
17 |
import org.eclipse.swt.widgets.Shell; |
|
18 |
|
|
19 |
import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource; |
|
20 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
21 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
|
22 |
|
|
23 |
/** |
|
24 |
* |
|
25 |
* @author pplitzner |
|
26 |
* @date 10.10.2017 |
|
27 |
* |
|
28 |
*/ |
|
29 |
public class SwitchUserHandlerE4 { |
|
30 |
|
|
31 |
@Execute |
|
32 |
public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) { |
|
33 |
|
|
34 |
RemotingLoginDialog loginDialog = new RemotingLoginDialog(shell, |
|
35 |
SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); |
|
36 |
|
|
37 |
loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), false, false); |
|
38 |
} |
|
39 |
} |
|
40 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/e4/handler/AbstractDataSourceHandlerE4.java | ||
---|---|---|
27 | 27 |
* @date 22.08.2017 |
28 | 28 |
* |
29 | 29 |
*/ |
30 |
abstract class AbstractDataSourceHandlerE4 { |
|
30 |
public abstract class AbstractDataSourceHandlerE4 {
|
|
31 | 31 |
|
32 | 32 |
@Execute |
33 | 33 |
public void execute(EPartService partService, |
34 | 34 |
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, |
35 |
@Named(IServiceConstants.ACTIVE_SELECTION)CdmMetaDataAwareDataSourceContainer container, |
|
36 |
MPart dataSourcePart) { |
|
37 |
|
|
38 |
boolean refresh = specificExecute((CdmDataSourceViewPartE4) dataSourcePart.getObject(), container, shell); |
|
35 |
@Named(IServiceConstants.ACTIVE_SELECTION)CdmMetaDataAwareDataSourceContainer container) { |
|
39 | 36 |
|
40 | 37 |
MPart dataSourceView = partService.showPart( |
41 | 38 |
"eu.etaxonomy.taxeditor.view.datasource", |
42 | 39 |
PartState.ACTIVATE); |
43 | 40 |
|
44 | 41 |
CdmDataSourceViewPartE4 view = (CdmDataSourceViewPartE4) dataSourceView.getObject(); |
42 |
|
|
43 |
boolean refresh = specificExecute(view, container, shell); |
|
44 |
|
|
45 | 45 |
if(refresh) { |
46 | 46 |
view.refresh(); |
47 | 47 |
} |
Also available in: Unified diff
ref #6622, #6598 Migrate New and connect menus