<elements xsi:type="commands:Command" xmi:id="_ZolPMKTaEeejf7ggYkp-TA" elementId="eu.etaxonomy.taxeditor.editor.command.polytomouskeylist.openGraph" commandName="Open Graph Editor"/>
<elements xsi:type="commands:Command" xmi:id="_cxTosKzzEeeBIsZyvYlAaA" elementId="eu.etaxonomy.taxeditor.group.cdmauthorities.edit" commandName="%command.name.34"/>
<elements xsi:type="commands:Command" xmi:id="_PDjFMLsKEeeQJq8FDGEi1g" elementId="eu.etaxonomy.taxeditor.editor.command.openSpecimenEditorFromMenu" commandName="Open Specimen Editor"/>
+ <elements xsi:type="commands:Command" xmi:id="_61IwAK20EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.datasource" commandName="%command.name.39"/>
+ <elements xsi:type="commands:Command" xmi:id="_x3ecAK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.reference" commandName="%command.name.23"/>
+ <elements xsi:type="commands:Command" xmi:id="_1CaG8K21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.name" commandName="%command.name.24"/>
+ <elements xsi:type="commands:Command" xmi:id="_2vSfgK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.team" commandName="%command.name.25"/>
+ <elements xsi:type="commands:Command" xmi:id="_4nv18K21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.command.new.person" commandName="%command.name.26"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_pZmusEalEeeXMc6kSYO7Xg" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView" positionInList="after:eu.etaxonomy.taxeditor.workbench.menuseparator.navigation">
<elements xsi:type="menu:HandledMenuItem" xmi:id="_5s52EIZ3EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.showViewMenu.concept" label="%command.label.6" command="_WPjpoDSnEeek0dKsFNy--Q">
<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"/>
<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"/>
<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"/>
+ <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"/>
+ <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"/>
+ <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"/>
+ <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"/>
+ <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"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_OyvD8KNOEee5fYT78qEx0A" featurename="children" parentElementId="bulkeditor.menus.openmenu" positionInList="last">
<elements xsi:type="menu:HandledMenuItem" xmi:id="_SZZBkKNOEee5fYT78qEx0A" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.specimen_editor" label="%command.label.DERIVATIVE_EDITOR" command="_PDjFMLsKEeeQJq8FDGEi1g"/>
<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">
<elements xsi:type="menu:HandledMenuItem" xmi:id="_JzLVUKz0EeeBIsZyvYlAaA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandname34" label="%command.name.34" command="_cxTosKzzEeeBIsZyvYlAaA"/>
</fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_UH7p8K21EeeykrJkROy5EA" featurename="children" parentElementId="eu.etaxonomy.navigation.menu.new">
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_dy1B8K21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel46" label="%command.label.46" command="_1CaG8K21EeeykrJkROy5EA">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_oAwOgK21EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/>
+ </elements>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_fC3GcK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel47" label="%command.label.47" command="_x3ecAK21EeeykrJkROy5EA">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_o70voK21EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/>
+ </elements>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_iqFEwK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel1" label="%command.label.1" command="_2vSfgK21EeeykrJkROy5EA">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_qRTU0K21EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/>
+ </elements>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_jlY2cK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel2" label="%command.label.2" command="_4nv18K21EeeykrJkROy5EA">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_rxgjUK21EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/>
+ </elements>
+ <elements xsi:type="menu:MenuSeparator" xmi:id="_lyGloK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.menuseparator.21"/>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_ZkTzEK21EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel48" label="%command.label.48" command="_61IwAK20EeeykrJkROy5EA"/>
+ </fragments>
</fragment:ModelFragments>
</extension>
<extension
point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:eu.etaxonomy.navigation.menu.new?after=eu.etaxonomy.navigation.menu.new.separator1">
- <command
- commandId="eu.etaxonomy.taxeditor.editor.command.new.name"
- label="%command.label.46"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
- <command
- commandId="eu.etaxonomy.taxeditor.editor.command.new.reference"
- label="%command.label.47"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
- <command
- commandId="eu.etaxonomy.taxeditor.editor.command.new.team"
- label="%command.label.1"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
- <command
- commandId="eu.etaxonomy.taxeditor.editor.command.new.person"
- label="%command.label.2"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
- <separator
- name="eu.etaxonomy.navigation.menu.new.separator2"
- visible="true">
- </separator>
- <separator
- name="eu.etaxonomy.navigation.menu.new.separator3"
- visible="true">
- </separator>
- <command
- commandId="eu.etaxonomy.taxeditor.editor.command.new.datasource"
- label="%command.label.48"
- style="push">
- </command>
- </menuContribution>
<menuContribution
locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?before=eu.etaxonomy.taxeditor.store.showViewMenu.internal">
<separator
</visibleWhen>
</command>
</menuContribution>
- <menuContribution
- locationURI="menu:org.eclipse.ui.main.menu.navigate">
- <command
- commandId="eu.etaxonomy.taxeditor.editor.command.openParent"
- label="%command.label.8"
- style="push">
- </command>
- </menuContribution>
id="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
name="%category.name.0">
</category>
- <command
- categoryId="eu.etaxonomy.taxeditor.editor.taxon.name.command.category"
- defaultHandler="eu.etaxonomy.taxeditor.editor.handler.OpenParentHandler"
- id="eu.etaxonomy.taxeditor.editor.command.openParent"
- name="%command.name">
- </command>
<!-- <command
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.MoveTaxonHandler"
id="eu.etaxonomy.taxeditor.editor.name.moveTaxon"
id="eu.etaxonomy.taxeditor.editor.new.category"
name="%category.name.4">
</category>
- <command
- categoryId="eu.etaxonomy.taxeditor.editor.new.category"
- defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewReferenceHandler"
- id="eu.etaxonomy.taxeditor.editor.command.new.reference"
- name="%command.name.23">
- </command>
- <command
- categoryId="eu.etaxonomy.taxeditor.editor.new.category"
- defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewNameHandler"
- id="eu.etaxonomy.taxeditor.editor.command.new.name"
- name="%command.name.24">
- </command>
- <command
- categoryId="eu.etaxonomy.taxeditor.editor.new.category"
- defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewTeamHandler"
- id="eu.etaxonomy.taxeditor.editor.command.new.team"
- name="%command.name.25">
- </command>
- <command
- categoryId="eu.etaxonomy.taxeditor.editor.new.category"
- defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewPersonHandler"
- id="eu.etaxonomy.taxeditor.editor.command.new.person"
- name="%command.name.26">
- </command>
<category
id="eu.etaxonomy.taxeditor.editor.view.concept.category"
name="%category.name.6">
id="eu.etaxonomy.taxeditor.bulkeditor.group.category"
name="%category.name.7">
</category>
- <command
- id="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler"
- name="%command.name.38">
- <commandParameter
- id="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler.uuid"
- name="taxonNodeUuid"
- optional="true"
- typeId="eu.etaxonomy.taxeditor.uuidParameterType">
- </commandParameter>
- </command>
- <command
- categoryId="eu.etaxonomy.taxeditor.editor.new.category"
- defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler"
- id="eu.etaxonomy.taxeditor.editor.command.new.datasource"
- name="%command.name.39">
- </command>
<command
id="eu.etaxonomy.taxeditor.editor.handler.showOnlyIndividualAssociations"
name="%command.name.41">
+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.editor.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-
-/**
- * <p>OpenParentHandler class.</p>
- *
- * @author n.hoffmann
- * @created 03.06.2009
- * @version 1.0
- */
-public class OpenParentHandler extends AbstractHandler implements IHandler {
-
- /** {@inheritDoc} */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- throw new RuntimeException("Open parent not supported anymore"); //$NON-NLS-1$
-// Taxon parent = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon().getTaxonomicParent();
-//
-// if(parent != null){
-// try {
-// EditorUtil.openTaxonNode(parent.getUuid());
-// } catch (PartInitException e) {
-// throw new RuntimeException("Error opening parent taxon", e);
-// } catch (Exception e) {
-// MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
-// }
-// }
-//
-// return null;
- }
-}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.editor.handler.create;
-import org.apache.log4j.Logger;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.swt.widgets.Shell;
import eu.etaxonomy.taxeditor.newWizard.NewNonViralNameWizard;
/**
- * <p>NewNameHandler class.</p>
*
- * @author n.hoffmann
- * @created Jun 1, 2010
- * @version 1.0
+ * @author pplitzner
+ * @date 10.10.2017
+ *
*/
-public class NewNameHandler extends AbstractHandler implements IHandler {
- private static final Logger logger = Logger.getLogger(NewNameHandler.class);
+public class NewNameHandler {
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- /** {@inheritDoc} */
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
NewNonViralNameWizard wizard = new NewNonViralNameWizard();
wizard.init(null, null);
- WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.open();
-
- return null;
+
}
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.editor.handler.create;
-import org.apache.log4j.Logger;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.swt.widgets.Shell;
import eu.etaxonomy.taxeditor.newWizard.NewPersonWizard;
/**
- * <p>NewPersonHandler class.</p>
*
- * @author n.hoffmann
- * @created Jun 1, 2010
- * @version 1.0
+ * @author pplitzner
+ * @date 10.10.2017
+ *
*/
-public class NewPersonHandler extends AbstractHandler implements IHandler {
- private static final Logger logger = Logger
- .getLogger(NewPersonHandler.class);
+public class NewPersonHandler {
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- /** {@inheritDoc} */
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
NewPersonWizard wizard = new NewPersonWizard();
wizard.init(null, null);
- WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.open();
-
- return null;
}
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.editor.handler.create;
-import org.apache.log4j.Logger;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.swt.widgets.Shell;
import eu.etaxonomy.taxeditor.newWizard.NewReferenceWizard;
/**
- * <p>NewReferenceHandler class.</p>
*
- * @author n.hoffmann
- * @created Jun 1, 2010
- * @version 1.0
+ * @author pplitzner
+ * @date 10.10.2017
+ *
*/
-public class NewReferenceHandler extends AbstractHandler implements IHandler {
- private static final Logger logger = Logger
- .getLogger(NewReferenceHandler.class);
+public class NewReferenceHandler {
- /** {@inheritDoc} */
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
NewReferenceWizard wizard = new NewReferenceWizard();
wizard.init(null, null);
- WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.open();
-
- return null;
}
-
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.editor.handler.create;
-import org.apache.log4j.Logger;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.swt.widgets.Shell;
import eu.etaxonomy.taxeditor.newWizard.NewTeamWizard;
/**
- * <p>NewTeamHandler class.</p>
*
- * @author n.hoffmann
- * @created Jun 1, 2010
- * @version 1.0
+ * @author pplitzner
+ * @date 10.10.2017
+ *
*/
-public class NewTeamHandler extends AbstractHandler implements IHandler {
- private static final Logger logger = Logger.getLogger(NewTeamHandler.class);
+public class NewTeamHandler {
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- /** {@inheritDoc} */
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
NewTeamWizard wizard = new NewTeamWizard();
wizard.init(null, null);
- WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.open();
-
- return null;
}
}
<elements xsi:type="commands:Command" xmi:id="_8C8AEKQVEeeTrq_CRrR-jg" elementId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete" commandName="%command.name.11"/>
<elements xsi:type="commands:Command" xmi:id="_6iiY8LVbEeeZf_R8QJbACw" elementId="eu.etaxonomy.taxeditor.navigation.command.linkWithTaxon" commandName="Link with taxon"/>
</fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_3CbhIK25EeeykrJkROy5EA" featurename="children" parentElementId="eu.etaxonomy.navigation.menu.new">
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_M9FakK26EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.commandlabel13" label="%command.label.13" command="_Nx06MJIvEeeJAdt8ZUxyaw">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_Pucu8K26EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/>
+ </elements>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_SCz-QK26EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.commandlabel14" label="%command.label.14" command="_Vco-4JIxEeeJAdt8ZUxyaw">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_SecxYK26EeeykrJkROy5EA" coreExpressionId="isCdmStoreConnected"/>
+ </elements>
+ </fragments>
</fragment:ModelFragments>
</visibleWhen>
</dynamic>
</menuContribution>
- <menuContribution
- locationURI="menu:eu.etaxonomy.navigation.menu.new">
- <command
- commandId="eu.etaxonomy.taxeditor.navigation.command.create.taxonNode"
- label="%command.label.13"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
- <separator
- name="eu.etaxonomy.navigation.menu.new.separator1"
- visible="true">
- </separator>
- <command
- commandId="eu.etaxonomy.taxeditor.navigation.create.classification"
- id="eu.etaxonomy.taxeditor.navigation.create.classificationHandler"
- label="%command.label.14"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
</extension>
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<elements xsi:type="commands:Command" xmi:id="_zDy74KqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.command.exportCsvName" commandName="%wizard.name.19"/>
<elements xsi:type="commands:Command" xmi:id="_zIKegKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.command.exportCsvPrint" commandName="%wizard.name.20"/>
<elements xsi:type="commands:Command" xmi:id="_zLKvMKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.command.exportCdmLight" commandName="%wizard.name.22"/>
+ <elements xsi:type="commands:Command" xmi:id="_R00rwK2dEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow" commandName="%command.name.CONNECT"/>
+ <elements xsi:type="commands:Command" xmi:id="_S868QK2dEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow" commandName="%command.name.4"/>
+ <elements xsi:type="commands:Command" xmi:id="_bfjZwK2fEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler" commandName="%command.name.11"/>
+ <elements xsi:type="commands:Command" xmi:id="_KQP_sK2gEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.operations.reconnect" commandName="%command.name.RE_CONNECT"/>
+ <elements xsi:type="commands:Command" xmi:id="_SXZF8K2gEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.openPasswordWizzard" commandName="%command.name.10"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_swGH0GhvEee3K4uKJljEYg" featurename="handlers" parentElementId="org.eclipse.e4.legacy.ide.application">
<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"/>
<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"/>
<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"/>
<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"/>
+ <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"/>
+ <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"/>
+ <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"/>
+ <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"/>
+ <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"/>
+ <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"/>
</fragments>
<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">
<elements xsi:type="menu:Menu" xmi:id="_LT3P8IfcEeecZ4F2Y9Z0Og" elementId="eu.etaxonomy.taxeditor.store.menu.termeditor" label="Term Editor">
<children xsi:type="menu:HandledMenuItem" xmi:id="_tBUcEKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportCsvPrint" label="%wizard.name.20" command="_zIKegKqZEeeXcJGhyhlrKA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_uruvcKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportCdmLight" label="%wizard.name.22" command="_zLKvMKqZEeeXcJGhyhlrKA"/>
</elements>
+ <elements xsi:type="menu:MenuSeparator" xmi:id="_URhG8K25EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.menuseparator.4"/>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_oL9dIK2uEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.commandlabelconnect" label="%command.label.CONNECT" command="_R00rwK2dEeeykrJkROy5EA"/>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_qRrzgK2uEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.commandlabel5" label="%command.label.5" command="_S868QK2dEeeykrJkROy5EA">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_zRHMoK2uEeeykrJkROy5EA" coreExpressionId="isUserLoggedIn"/>
+ </elements>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_rZtLgK2uEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.commandlabelre_connect" label="%command.label.RE_CONNECT" command="_KQP_sK2gEeeykrJkROy5EA">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_0b9PIK2uEeeykrJkROy5EA" coreExpressionId="isUserLoggedIn"/>
+ </elements>
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_tKrZ4K2uEeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.commandlabelchange_password" label="%command.label.CHANGE_PASSWORD" command="_SXZF8K2gEeeykrJkROy5EA">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_1cb0sK2uEeeykrJkROy5EA" coreExpressionId="isUserLoggedIn"/>
+ </elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_mNW70LMnEeeMU61m8yqdaA" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView" positionInList="after:eu.etaxonomy.taxeditor.workbench.menuseparator.referencing">
<elements xsi:type="menu:HandledMenuItem" xmi:id="_mNW727MnEeeMU61m8yqdaA" elementId="eu.etaxonomy.taxeditor.store.showViewMenu.sessions" label="%view.name.SESSIONS" command="_bnVKsCZxEeeQLpuomSmVoQ">
<extension-point id="eu.etaxonomy.taxeditor.store.cdmViewer" name="Cdm Viewer" schema="schema/eu.etaxonomy.taxeditor.store.cdmViewer.exsd"/>
<extension
point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:eu.etaxonomy.taxeditor.workbench.menu.file?after=eu.etaxonomy.taxeditor.application.filemenu.io">
- <command
- commandId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow"
- label="%command.label.CONNECT"
- style="push">
- </command>
- <command
- commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
- label="%command.label.5"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isUserLoggedIn">
- </reference>
- </visibleWhen>
- </command>
- <command
- commandId="eu.etaxonomy.taxeditor.store.operations.reconnect"
- label="%command.label.RE_CONNECT"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isUserLoggedIn">
- </reference>
- </visibleWhen>
- </command>
- <command
- commandId="eu.etaxonomy.taxeditor.store.openPasswordWizzard"
- label="%command.label.CHANGE_PASSWORD"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isUserLoggedIn">
- </reference>
- </visibleWhen>
- </command>
- <separator
- name="eu.etaxonomy.taxeditor.application.filemenu.login"
- visible="true">
- </separator>
- </menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.ui.trim.status">
<toolbar
</toolbar>
</menuContribution>
</extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="eu.etaxonomy.taxeditor.view.datasource.handler.DeleteDataSourceHandler"
- commandId="eu.etaxonomy.taxeditor.view.datasource.delete">
- <activeWhen>
- <with
- variable="activePartId">
- <equals
- value="eu.etaxonomy.taxeditor.view.datasource">
- </equals>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="eu.etaxonomy.taxeditor.handler.ShowRemotingLoginWindowHandler"
- commandId="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow">
- </handler>
- <handler
- class="eu.etaxonomy.taxeditor.handler.OpenPasswordWizzardHandler"
- commandId="eu.etaxonomy.taxeditor.store.openPasswordWizzard">
- <enabledWhen>
- <reference
- definitionId="isUserLoggedIn">
- </reference></enabledWhen>
- </handler>
- <handler
- class="eu.etaxonomy.taxeditor.handler.OpenDistributionEditorWizardHandler"
- commandId="eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler">
- <activeWhen>
- <reference
- definitionId="hasROLE_PROJECT_MANAGER">
- </reference>
- </activeWhen>
- </handler>
- <handler
- class="eu.etaxonomy.taxeditor.handler.OpenImportPreferenceHandler"
- commandId="eu.etaxonomy.taxeditor.store.open.OpenImportPreferenceHandler">
- <activeWhen>
- <reference
- definitionId="hasROLE_PROJECT_MANAGER">
- </reference>
- </activeWhen>
- </handler>
- <handler
- class="eu.etaxonomy.taxeditor.handler.SwitchUserHandler"
- commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow">
- <activeWhen>
- <reference
- definitionId="isRemoting">
- </reference>
- </activeWhen>
- </handler>
- </extension>
- <extension
- name="%extension.name.0"
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
- id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
- name="%command.name.4">
- </command>
- <command
- id="eu.etaxonomy.taxeditor.store.operations.showRemotingLoginWindow"
- name="%command.name.CONNECT">
- </command>
- <command
- defaultHandler="eu.etaxonomy.taxeditor.handler.ReconnectHandler"
- id="eu.etaxonomy.taxeditor.store.operations.reconnect"
- name="%command.name.RE_CONNECT">
- </command>
- <command
- id="eu.etaxonomy.taxeditor.store.openPasswordWizzard"
- name="%command.name.10">
- </command>
- <command
- id="eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler"
- name="%command.name.11">
- </command>
- <command
- defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.ChangeConnectionHandler"
- id="eu.etaxonomy.taxeditor.datasource.connect"
- name="%command.name.12">
- </command>
- <command
- defaultHandler="eu.etaxonomy.taxeditor.handler.OpenInspectSessionsHandler"
- id="eu.etaxonomy.taxeditor.store.open.InspectSessionsDialog"
- name="%command.name.INSPECT_ACTIVE_SESSIONS">
- </command>
- <command
- defaultHandler="eu.etaxonomy.taxeditor.handler.OpenHandler"
- id="eu.etaxonomy.taxeditor.store.open"
- name="%command.name.15">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <commandParameterType
- converter="eu.etaxonomy.taxeditor.handler.UuidsParameterTypeConverter"
- id="eu.etaxonomy.taxeditor.uuidParameterType"
- type="java.util.UUID">
- </commandParameterType>
- <commandParameterType
- converter="eu.etaxonomy.taxeditor.handler.UuidsParameterTypeConverter"
- id="eu.etaxonomy.taxeditor.uuidsParameterType"
- type="java.util.List">
- </commandParameterType>
- </extension>
<extension
point="org.eclipse.ui.newWizards">
<wizard
+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.wizard.WizardDialog;
-
-import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.password.PasswordWizard;
-
-/**
- * <p>ShowLoginWindowHandler class.</p>
- *
- * @author n.hoffmann
- * @created Aug 7, 2009
- * @version 1.0
- */
-public class OpenPasswordWizzardHandler extends AbstractHandler implements IHandler{
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- Object principal = CdmStore.getCurrentAuthentiation().getPrincipal();
-
- if(principal instanceof User){
-
- PasswordWizard wizard = new PasswordWizard((User)principal, null);
- WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(), wizard);
-
- dialog.open();
-
- } else {
- // should never happen, log an error
- MessagingUtils.error(OpenPasswordWizzardHandler.class, "The principal currently authenticated is not a eu.etaxonomy.cdm.model.common.User", null);
- }
-
- return null;
-
- }
-
-
-
-}
+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
-
-/**
- *
- *
- * @author c.mathew
- */
-public class ReconnectHandler extends AbstractHandler implements IHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event),
- SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
-
- loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), true, true);
-
- return null;
-
- }
-}
+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
-
-/**
- * <p>ShowLoginWindowHandler class.</p>
- *
- * @author n.hoffmann
- * @created Aug 7, 2009
- * @version 1.0
- */
-public class ShowLoginWindowHandler extends AbstractHandler implements IHandler{
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- /** {@inheritDoc} */
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- LoginDialog loginDialog = new LoginDialog(HandlerUtil.getActiveShell(event));
- loginDialog.open();
-
- return null;
-
- }
-
-
-
-}
+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
-
-/**
- *
- *
- * @author c.mathew
- */
-public class ShowRemotingLoginWindowHandler extends AbstractHandler implements IHandler{
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event),
- SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- loginDialog.open();
-
-
- return null;
-
- }
-}
+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
-
-/**
- *
- *
- * @author c.mathew
- */
-public class SwitchUserHandler extends AbstractHandler implements IHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- /** {@inheritDoc} */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- RemotingLoginDialog loginDialog = new RemotingLoginDialog(HandlerUtil.getActiveShell(event),
- SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
-
- loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), false, false);
-
- return null;
-
- }
-}
-
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.handler;
+package eu.etaxonomy.taxeditor.handler.e4;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
import eu.etaxonomy.taxeditor.preference.wizard.AvailableDistributionWizard;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
/**
- * @author a.oppermann
- * @date 21.07.2014
+ *
+ * @author pplitzner
+ * @date 10.10.2017
*
*/
-public class OpenDistributionEditorWizardHandler extends AbstractHandler{
+public class OpenDistributionEditorWizardHandlerE4 {
String commandID = "eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler";
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
AvailableDistributionWizard availableDistributionWizard = new AvailableDistributionWizard();
- WizardDialog dialog = new WizardDialog(StoreUtil.getShell(),
+ WizardDialog dialog = new WizardDialog(shell,
availableDistributionWizard);
dialog.open();
- return null;
}
-
}
--- /dev/null
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.handler.e4;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.password.PasswordWizard;
+
+/**
+ *
+ * @author pplitzner
+ * @date 10.10.2017
+ *
+ */
+public class OpenPasswordWizzardHandlerE4 {
+
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
+
+ Object principal = CdmStore.getCurrentAuthentiation().getPrincipal();
+
+ if(principal instanceof User){
+
+ PasswordWizard wizard = new PasswordWizard((User)principal, null);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+
+ dialog.open();
+
+ } else {
+ // should never happen, log an error
+ MessagingUtils.error(OpenPasswordWizzardHandlerE4.class, "The principal currently authenticated is not a eu.etaxonomy.cdm.model.common.User", null);
+ }
+ }
+}
--- /dev/null
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.handler.e4;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
+
+/**
+ *
+ * @author pplitzner
+ * @date 10.10.2017
+ *
+ */
+public class ReconnectHandlerE4 {
+
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
+
+ RemotingLoginDialog loginDialog = new RemotingLoginDialog(shell,
+ SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+
+ loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), true, true);
+ }
+}
--- /dev/null
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.handler.e4;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
+
+/**
+ *
+ * @author pplitzner
+ * @date 10.10.2017
+ *
+ */
+public class ShowLoginWindowHandlerE4 {
+
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
+
+ LoginDialog loginDialog = new LoginDialog(shell);
+ loginDialog.open();
+ }
+}
--- /dev/null
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.handler.e4;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
+
+/**
+ *
+ * @author pplitzner
+ * @date 10.10.2017
+ *
+ */
+public class ShowRemotingLoginWindowHandlerE4 {
+
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
+
+ RemotingLoginDialog loginDialog = new RemotingLoginDialog(shell,
+ SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+ loginDialog.open();
+ }
+}
--- /dev/null
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.handler.e4;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
+
+/**
+ *
+ * @author pplitzner
+ * @date 10.10.2017
+ *
+ */
+public class SwitchUserHandlerE4 {
+
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
+
+ RemotingLoginDialog loginDialog = new RemotingLoginDialog(shell,
+ SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+
+ loginDialog.open((CdmRemoteSource) CdmStore.getActiveCdmSource(), false, false);
+ }
+}
+
* @date 22.08.2017
*
*/
-abstract class AbstractDataSourceHandlerE4 {
+public abstract class AbstractDataSourceHandlerE4 {
@Execute
public void execute(EPartService partService,
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell,
- @Named(IServiceConstants.ACTIVE_SELECTION)CdmMetaDataAwareDataSourceContainer container,
- MPart dataSourcePart) {
-
- boolean refresh = specificExecute((CdmDataSourceViewPartE4) dataSourcePart.getObject(), container, shell);
+ @Named(IServiceConstants.ACTIVE_SELECTION)CdmMetaDataAwareDataSourceContainer container) {
MPart dataSourceView = partService.showPart(
"eu.etaxonomy.taxeditor.view.datasource",
PartState.ACTIVATE);
CdmDataSourceViewPartE4 view = (CdmDataSourceViewPartE4) dataSourceView.getObject();
+
+ boolean refresh = specificExecute(view, container, shell);
+
if(refresh) {
view.refresh();
}