<children xsi:type="menu:MenuSeparator" xmi:id="_zfx_cB7PEeeC-JvycL9ysA" elementId="eu.etaxonomy.taxeditor.application.windowMenu.last"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_35iN8B7PEeeC-JvycL9ysA" elementId="org.eclipse.ui.main.menu.window.preferences" label="%command.label.12" command="_l9kXoB7PEeeC-JvycL9ysA"/>
</children>
- <children xsi:type="menu:Menu" xmi:id="_KDFiMB6tEeePLJ5to5QrXQ" elementId="org.eclipse.ui.main.menu.admin" label="%menu.label.4"/>
+ <children xsi:type="menu:Menu" xmi:id="_KDFiMB6tEeePLJ5to5QrXQ" elementId="org.eclipse.ui.main.menu.admin" label="%menu.label.4">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_RsV7EB-IEeeIA_2gwq7JKg" elementId="org.eclipse.ui.main.menu.admin.dbpreferences" label="%command.label.23" command="_JXXNIB-IEeeIA_2gwq7JKg">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_ckfJUB-IEeeIA_2gwq7JKg" coreExpressionId="hasROLE_PROJECT_MANAGER_AND_isCdmStoreConnected"/>
+ </children>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_VgPDcB-IEeeIA_2gwq7JKg" elementId="org.eclipse.ui.main.menu.admin.dbrepair" label="%command.label.24" command="_LuEl0B-IEeeIA_2gwq7JKg">
+ <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_06_ZIB-TEeeIA_2gwq7JKg" coreExpressionId="hasROLE_PROJECT_MANAGER_AND_isCdmStoreConnected"/>
+ </children>
+ </children>
<children xsi:type="menu:Menu" xmi:id="_MG8QUB6tEeePLJ5to5QrXQ" elementId="org.eclipse.ui.main.menu.help" label="%menu.label.2">
<children xsi:type="menu:HandledMenuItem" xmi:id="_6vgg4B6gEeePLJ5to5QrXQ" elementId="id.commandlabel16" label="%command.label.16" command="_ye6jsB6gEeePLJ5to5QrXQ"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_i-R80B6fEeePLJ5to5QrXQ" elementId="id.commandlabel20" label="%command.label.20" command="_V9LTcB6eEeePLJ5to5QrXQ"/>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_vvQmIB4JEeehWtOSgLepjA" featurename="handlers" parentElementId="org.eclipse.e4.legacy.ide.application">
<elements xsi:type="commands:Handler" xmi:id="_haDmcB6eEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.OpenExternalAboutPlatformHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.application/eu.etaxonomy.taxeditor.OpenExternalAboutPlatformHandler" command="_V9LTcB6eEeePLJ5to5QrXQ"/>
<elements xsi:type="commands:Handler" xmi:id="_3wxe4B6gEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.OpenExternalParserHelpHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.application/eu.etaxonomy.taxeditor.OpenExternalParserHelpHandler" command="_ye6jsB6gEeePLJ5to5QrXQ"/>
+ <elements xsi:type="commands:Handler" xmi:id="_cwy_oB-LEeeIA_2gwq7JKg" elementId="eu.etaxonomy.taxeditor.handler.OpenDatabaseRepairWizardHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.OpenDatabaseRepairWizardHandler" command="_LuEl0B-IEeeIA_2gwq7JKg"/>
+ <elements xsi:type="commands:Handler" xmi:id="_pZ84gB-LEeeIA_2gwq7JKg" elementId="eu.etaxonomy.taxeditor.handler.OpenDatabasePreferencesWizardHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.handler.OpenDatabasePreferencesWizardHandler" command="_JXXNIB-IEeeIA_2gwq7JKg"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_1jM6sB4JEeehWtOSgLepjA" featurename="commands" parentElementId="org.eclipse.e4.legacy.ide.application">
<elements xsi:type="commands:Command" xmi:id="_V9LTcB6eEeePLJ5to5QrXQ" elementId="eu.etaxonomy.taxeditor.application.help.aboutPlatform" commandName="%command.name.0"/>
<elements xsi:type="commands:Command" xmi:id="_WOTDYB7EEeeRW_RHu3JLqQ" elementId="org.eclipse.ui.edit.delete" commandName="%command.label.11"/>
<elements xsi:type="commands:Command" xmi:id="_l9kXoB7PEeeC-JvycL9ysA" elementId="org.eclipse.ui.window.preferences" commandName="%command.label.12"/>
<elements xsi:type="commands:Command" xmi:id="_hooiQB7QEeeC-JvycL9ysA" elementId="org.eclipse.ui.newWizard" commandName="%command.label.21"/>
+ <elements xsi:type="commands:Command" xmi:id="_JXXNIB-IEeeIA_2gwq7JKg" elementId="eu.etaxonomy.taxeditor.application.DatabaseSettings" commandName="%command.label.23"/>
+ <elements xsi:type="commands:Command" xmi:id="_LuEl0B-IEeeIA_2gwq7JKg" elementId="eu.etaxonomy.taxeditor.application.DatabaseRepairFunctionality" commandName="%command.label.24"/>
</fragments>
</fragment:ModelFragments>
<menuContribution
allPopups="false"
locationURI="menu:org.eclipse.ui.main.menu.admin">
- <command
- commandId="eu.etaxonomy.taxeditor.application.DatabaseSettings"
- label="%command.label.23"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <and>
- <reference
- definitionId="hasROLE_PROJECT_MANAGER">
- </reference>
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="eu.etaxonomy.taxeditor.application.DatabaseRepairFunctionality"
- label="%command.label.24"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <and>
- <reference
- definitionId="hasROLE_PROJECT_MANAGER">
- </reference>
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </and>
- </visibleWhen>
- </command>
<dynamic
class="eu.etaxonomy.taxeditor.admin.UserGroupContributionItem"
id="eu.etaxonomy.taxeditor.admin.UserGroupContributionItem">
commandId="org.eclipse.ui.help.aboutAction"
label="%command.label.19">
</command>
- </menuContribution>
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="eu.etaxonomy.taxeditor.editor.main">
- <command
- commandId="org.eclipse.ui.newWizard"
- label="%command.label.21"
- style="push">
- </command>
- <command
- commandId="org.eclipse.ui.file.save"
- label="%command.label.22"
- style="push">
- </command>
- </toolbar>
</menuContribution>
</extension>
<extension
org.eclipse.core.databinding.beans,
org.eclipse.core.databinding.observable,
org.eclipse.core.databinding.property,
- org.eclipse.jface.databinding
+ org.eclipse.jface.databinding,
+ org.eclipse.e4.core.di.annotations;bundle-version="1.5.0"
Import-Package: eu.etaxonomy.taxeditor.webapp,
org.eclipse.core.commands,
org.eclipse.core.commands.operations,
typeId="eu.etaxonomy.taxeditor.uuidParameterType">
</commandParameter>
</command>
- <command
- defaultHandler="eu.etaxonomy.taxeditor.handler.OpenDatabasePreferencesWizardHandler"
- id="eu.etaxonomy.taxeditor.application.DatabaseSettings"
- name="%command.label.23">
- </command>
- <command
- defaultHandler="eu.etaxonomy.taxeditor.handler.OpenDatabaseRepairWizardHandler"
- id="eu.etaxonomy.taxeditor.application.DatabaseRepairFunctionality"
- name="%command.label.24">
- </command>
</extension>
<extension
point="org.eclipse.ui.commands">
</iterate>
</with>
</definition>
+ <definition
+ id="hasROLE_PROJECT_MANAGER_AND_isCdmStoreConnected">
+ <and>
+ <reference
+ definitionId="hasROLE_PROJECT_MANAGER">
+ </reference>
+ <reference
+ definitionId="isCdmStoreConnected">
+ </reference>
+ </and>
+ </definition>
</extension>
<extension
point="org.eclipse.ui.activities">
*/
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.e4.core.di.annotations.Execute;
import org.eclipse.jface.wizard.WizardDialog;
import eu.etaxonomy.taxeditor.databaseAdmin.wizard.DatabasePreferencesWizard;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
/**
* @author k.luther
* @date 18.11.2016
*
*/
-public class OpenDatabasePreferencesWizardHandler extends AbstractHandler{
+public class OpenDatabasePreferencesWizardHandler {
- String commandID = "eu.etaxonomy.taxeditor.store.open.OpenDatabasePreferencesWizardHandler";
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ @Execute
+ public Object execute(){
DatabasePreferencesWizard databasePreferencesWizard = new DatabasePreferencesWizard();
- WizardDialog dialog = new WizardDialog(StoreUtil.getShell(),
+ WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(),
databasePreferencesWizard);
dialog.open();
*/
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.e4.core.di.annotations.Execute;
import org.eclipse.jface.wizard.WizardDialog;
import eu.etaxonomy.taxeditor.databaseAdmin.wizard.DatabaseRepairWizard;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
* @date 06.12.2016
*
*/
-public class OpenDatabaseRepairWizardHandler extends AbstractHandler {
+public class OpenDatabaseRepairWizardHandler{
/**
* {@inheritDoc}
*/
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ @Execute
+ public Object execute(){
DatabaseRepairWizard databaseRepairWizard = new DatabaseRepairWizard();
- WizardDialog dialog = new WizardDialog(StoreUtil.getShell(),
+ WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(),
databaseRepairWizard);
dialog.open();