- removed accidentally commited LibrAlign code
[taxeditor.git] / eu.etaxonomy.taxeditor.store / plugin.xml
index 5e8dbe3a6469f1443d41c36e9da49f8432fcec9f..8277d0a748a1687f61e98b262339412ef4c278f8 100644 (file)
             id="eu.etaxonomy.taxeditor.preferences.typeDesignation"
             name="Type Designations">
       </page>
+      <page
+            category="eu.etaxonomy.taxeditor.preferences.general"
+            class="eu.etaxonomy.taxeditor.preference.SpecimenOrObservationPreferences"
+            id="eu.etaxonomy.taxeditor.preference.SpecimenOrObservationPreferences"
+            name="Specimens and FieldUnits">
+      </page>
    </extension>
    <extension
          point="org.eclipse.ui.views">
         id="eu.etaxonomy.taxeditor.view.userecords"
         name="Use Records"
         restorable="true">
+  </view>
+  <view
+        class="eu.etaxonomy.taxeditor.view.derivateSearch.DerivateSearchView"
+        icon="icons/derivate_search_view-16x16-32.png"
+        id="eu.etaxonomy.taxeditor.view.derivateSearch.DerivateSearchView"
+        name="Derivate Search"
+        restorable="true">
   </view>
    </extension>
    <extension
          <menu
                id="eu.etaxonomy.taxeditor.menu.showView"
                label="Show View">
+            <command
+                  commandId="org.eclipse.ui.views.showView"
+                  label="Derivate Search View"
+                  style="push">
+               <parameter
+                     name="org.eclipse.ui.views.showView.viewId"
+                     value="eu.etaxonomy.taxeditor.view.derivateSearch.DerivateSearchView">
+               </parameter>
+            </command>
             <separator
                   name="eu.etaxonomy.taxeditor.store.showViewMenu.details"
                   visible="true">
                </visibleWhen>
             </command>
          </menu>
-         <menu
-               id="eu.etaxonomy.taxeditor.store.definedTermEditorMenu"
-               label="Term Editor">
-            <command
-                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
-                  label="Named Area"
-                  style="push">
-               <parameter
-                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
-                     value="eu.etaxonomy.cdm.model.location.NamedArea">
-               </parameter>
-            </command>
-            <command
-                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
-                  label="Named Area Level"
-                  style="push">
-               <parameter
-                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
-                     value="eu.etaxonomy.cdm.model.location.NamedAreaLevel">
-               </parameter>
-            </command>
-            <separator
-                  name="eu.etaxonomy.taxeditor.store.definedTermEditorMenu.separator2"
-                  visible="true">
-            </separator>
-            <command
-                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
-                  label="Extension Type"
-                  style="push">
-               <parameter
-                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
-                     value="eu.etaxonomy.cdm.model.common.ExtensionType">
-               </parameter>
-            </command>
-            <command
-                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
-                  label="Marker Type"
-                  style="push">
-               <parameter
-                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
-                     value="eu.etaxonomy.cdm.model.description.Feature">
-               </parameter>
-            </command>
-            <separator
-                  name="eu.etaxonomy.taxeditor.store.definedTermEditorMenu.separator3"
-                  visible="true">
-            </separator>
-            <command
-                  commandId="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
-                  label="Feature"
-                  style="push">
-               <parameter
-                     name="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
-                     value="eu.etaxonomy.cdm.model.description.Feature">
-               </parameter>
-            </command>
-         </menu>
+      </menuContribution>
+      <menuContribution
+            class="eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermMenuFactory"
+            locationURI="menu:org.eclipse.ui.main.menu.window?before=eu.etaxonomy.taxeditor.application.windowMenu.last">
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.main.menu.file?after=eu.etaxonomy.taxeditor.application.filemenu.io">
          <command
                commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
-               label="Login"
+               label="Switch User"
+               style="push">
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.store.openPasswordWizzard"
+               label="Change Password"
                style="push">
          </command>
          <separator
                commandId="eu.etaxonomy.taxeditor.store.datasource.change"
                label="Connect"
                style="push">
+               <visibleWhen>
+              <with
+                        variable="selection">
+                        <not>
+                               <test
+                                       property="eu.etaxonomy.taxeditor.datasource.propertyTester.test">
+                               </test>
+                       </not>
+                       </with>
+            </visibleWhen>
          </command>
          <command
                commandId="eu.etaxonomy.taxeditor.store.datasource.create"
                commandId="eu.etaxonomy.taxeditor.store.datasource.edit"
                label="Edit"
                style="push">
+                <visibleWhen>
+              <with
+                        variable="selection">
+                        <not>
+                               <test
+                                       property="eu.etaxonomy.taxeditor.datasource.propertyTester.test">
+                               </test>
+                       </not>
+                       </with>
+            </visibleWhen>
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.store.datasource.clone"
+               label="Clone"
+               style="push">
+                <visibleWhen>
+              <with
+                        variable="selection">
+                        <not>
+                               <test
+                                       property="eu.etaxonomy.taxeditor.datasource.propertyTester.test">
+                               </test>
+                       </not>
+                       </with>
+            </visibleWhen>
          </command>
          <separator
                name="eu.etaxonomy.taxeditor.store.datasource.separator"
                commandId="org.eclipse.ui.edit.delete"
                label="Delete"
                style="push">
+               <visibleWhen>
+              <with
+                        variable="selection">
+                        <not>
+                               <test
+                                       property="eu.etaxonomy.taxeditor.datasource.propertyTester.test">
+                               </test>
+                       </not>
+                       </with>
+            </visibleWhen>
          </command>
          <separator
                name="eu.etaxonomy.taxeditor.store.datasource.separator2"
                commandId="eu.etaxonomy.taxeditor.store.datasource.close"
                label="Close Active Connection"
                style="push">
+               <visibleWhen>
+              <with
+                        variable="selection">
+                        <not>
+                               <test
+                                       property="eu.etaxonomy.taxeditor.datasource.propertyTester.test">
+                               </test>
+                       </not>
+                       </with>
+            </visibleWhen>
          </command>
          <command
                commandId="eu.etaxonomy.taxeditor.store.datasource.update"
-               label="Update"
+               label="Update Datamodel"
                style="push">
             <visibleWhen
                   checkEnabled="true">
                   </reference>
                </not>
             </visibleWhen>
+            
          </command>
       </menuContribution>
       <menuContribution
          </command>
       </menuContribution>
    </extension>
-   <extension
-         name="Window Menu Commands"
-         point="org.eclipse.ui.commands">
-      <command
-            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.OpenDefinedTermEditorHandler"
-            id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
-            name="Open Defined Term Editor">
-         <commandParameter
-               id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
-               name="inputType"
-               optional="true">
-         </commandParameter>
-      </command>
-   </extension>
-   <extension
-         name="File Menu Commands"
-         point="org.eclipse.ui.commands">
-      <command
-            defaultHandler="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
-            id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
-            name="Show Login Window">
-      </command>
-   </extension>
    <extension
          point="org.eclipse.ui.handlers">
       <handler
             </with>
          </activeWhen>
       </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.featuretree.OpenFeatureTreeEditorWizardHandler"
+            commandId="eu.etaxonomy.taxeditor.store.open.FeatureTreeEditorWizard">
+         <activeWhen>
+            <reference
+                  definitionId="hasROLE_PROJECT_MANAGER">
+            </reference>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
+            commandId="eu.etaxonomy.taxeditor.store.operations.showLoginWindow">
+         <enabledWhen>
+            <reference
+                  definitionId="isUserLoggedIn">
+            </reference></enabledWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.handler.OpenPasswordWizzardHandler"
+            commandId="eu.etaxonomy.taxeditor.store.openPasswordWizzard">
+         <enabledWhen>
+            <reference
+                  definitionId="isUserLoggedIn">
+            </reference></enabledWhen>
+      </handler>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.ChangeConnectionHandler"
+            id="eu.etaxonomy.taxeditor.datasource.connect"
+            name="Connect">
+      </command>
    </extension>
    <extension
          name="Popup Menu Commands"
             id="eu.etaxonomy.taxeditor.store.datasource.edit"
             name="Edit Datasource">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.CloneDataSourceHandler"
+            id="eu.etaxonomy.taxeditor.store.datasource.clone"
+            name="Clone Datasource">
+      </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.view.datasource.handler.CreateDataSourceHandler"
             id="eu.etaxonomy.taxeditor.store.datasource.create"
             id="eu.etaxonomy.taxeditor.store.datasource.update"
             name="Update Datasource">
       </command>
-   </extension>
-   <extension
-         point="org.eclipse.ui.commands">
+      <command
+            id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
+            name="Show Login Window">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.OpenDefinedTermEditorHandler"
+            id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
+            name="Open Defined Term Editor">
+         <commandParameter
+               id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.termTypeUuid"
+               name="inputType"
+               optional="true">
+         </commandParameter>
+      </command>
       <command
             defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.CreateDefinedTermHandler"
             id="eu.etaxonomy.taxeditor.editor.definedTerms.newDefinedTerm"
             id="eu.etaxonomy.taxeditor.editor.definedTerms.newTermVocabulary"
             name="New Term Vocabulary">
       </command>
+      <command
+         id="eu.etaxonomy.taxeditor.store.open.FeatureTreeEditorWizard"
+         name="Open Feature Tree Editor Wizard">
+         </command>
+      <command
+            id="eu.etaxonomy.taxeditor.store.openPasswordWizzard"
+            name="Open Password Wizzard">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.importWizards">
             id="eu.etaxonomy.taxeditor.io.import.tcs"
             name="TCS">
       </wizard>
-      <wizard
+   <!--   <wizard
             category="eu.etaxonomy.taxeditor.import.category.cdm"
             class="eu.etaxonomy.taxeditor.io.wizard.JaxbImportWizard"
             id="eu.etaxonomy.taxeditor.io.import.jaxb"
             name="JAXB">
-      </wizard>
-      <wizard
+      </wizard> -->
+   <!--   <wizard
             category="eu.etaxonomy.taxeditor.import.category.cdm"
             class="eu.etaxonomy.taxeditor.io.wizard.BerlinModelImportWizard"
             id="eu.etaxonomy.taxeditor.io.import.berlinModel"
             class="eu.etaxonomy.taxeditor.io.wizard.EndnoteImportWizard"
             id="eu.etaxonomy.taxeditor.io.import.endnote"
             name="Endnote">
-      </wizard>
+      </wizard>-->
       <wizard
             category="eu.etaxonomy.taxeditor.import.category.cdm"
             class="eu.etaxonomy.taxeditor.io.wizard.ExcelNormalExplicitTaxaImportWizard"
             id="eu.etaxonomy.taxeditor.io.export.jaxb"
             name="JAXB">
       </wizard>
-      <wizard
+      <!--<wizard
             category="eu.etaxonomy.taxeditor.export.category.cdm"
             class="eu.etaxonomy.taxeditor.io.wizard.BerlinModelExportWizard"
             id="eu.etaxonomy.taxeditor.io.export.berlinModel"
             name="Berlin Model">
-      </wizard>
+      </wizard>-->
       <category
             id="eu.etaxonomy.taxeditor.export.category.excel"
             name="Excel">
             label="Disabled Name Editor Field"
             value="105,114,124">
       </colorDefinition>
+      <colorDefinition
+            categoryId="eu.etaxonomy.taxeditor.preferences.themeElementCategory"
+            id="eu.etaxonomy.taxeditor.preferences.colorDefinition.editorError"
+            label="Editor On Error"
+            value="255,0,0">
+      </colorDefinition>
       </extension>
 <extension
       point="org.eclipse.core.expressions.propertyTesters">
          namespace="eu.etaxonomy.taxeditor.datasource.propertyTester"
          properties="isCompatible"
          type="org.eclipse.jface.viewers.IStructuredSelection">
+   </propertyTester>
+    <propertyTester
+         class="eu.etaxonomy.taxeditor.view.datasource.handler.DataSourceMenuPropertyTester"
+         id="eu.etaxonomy.taxeditor.datasource.propertyTester"
+         namespace="eu.etaxonomy.taxeditor.datasource.propertyTester"
+         properties="test"
+         type="org.eclipse.jface.viewers.IStructuredSelection">
    </propertyTester>
    <propertyTester
          class="eu.etaxonomy.taxeditor.preference.PreferencePropertyTester"
          properties="isModifiable"
          type="org.eclipse.jface.viewers.IStructuredSelection">
    </propertyTester>
+   <propertyTester
+        class="eu.etaxonomy.taxeditor.security.PermissionPropertyTester"
+        id="eu.etaxonomy.taxeditor.security.permissionTester"
+        namespace="eu.etaxonomy.taxeditor.security.permissionTester"
+        properties="hasPermissions, hasRoles"
+        type="org.eclipse.jface.viewers.IStructuredSelection">
+   </propertyTester>
 </extension>
 <extension
       point="org.eclipse.core.expressions.definitions">
    <definition
          id="isCompatible">
       <with
-            variable="activeMenuSelection">
+            variable="selection">
          <test
                property="eu.etaxonomy.taxeditor.datasource.propertyTester.isCompatible">
          </test>
    <definition
          id="isShowExperimentalFeatures">
       <with
-            variable="activeMenuSelection">
+            variable="selection">
          <test
                property="eu.etaxonomy.taxeditor.preferences.propertyTester.isShowExperimentalFeatures">
          </test>
    <definition
          id="isModifiable">
       <with
-            variable="activeMenuSelection">
+            variable="selection">
          <test
                property="eu.etaxonomy.taxeditor.store.termEditor.propertyTester.isModifiable">
          </test>
       </with>
    </definition>
+   <definition
+            id="canUPDATE">
+               <with
+                       variable="selection">
+                <test
+                      args="UPDATE"
+                      property="eu.etaxonomy.taxeditor.security.permissionTester.hasPermissions">
+                </test>
+         </with>
+      </definition>
+      <definition
+            id="canDELETE">
+         <with
+               variable="selection">
+            <test
+                  args="DELETE"
+                  property="eu.etaxonomy.taxeditor.security.permissionTester.hasPermissions">
+            </test>
+         </with>
+    </definition>
+      <definition
+            id="canCREATE">
+         <with
+               variable="selection">
+            <test
+                  args="CREATE"
+                  property="eu.etaxonomy.taxeditor.security.permissionTester.hasPermissions">
+            </test>
+         </with>
+      </definition>
+      <definition
+            id="isUserLoggedIn">
+            <with
+               variable="eu.etaxonomy.taxeditor.security.user">
+               <instanceof
+                     value="eu.etaxonomy.cdm.model.common.User">
+               </instanceof>
+         </with>
+      </definition>
+      <definition
+            id="hasROLE_USER_MANAGER">
+            <with
+               variable="eu.etaxonomy.taxeditor.security.userRoles">
+            <iterate
+                  ifEmpty="false"
+                  operator="or">
+               <or>
+                  <equals
+                        value="ROLE_ADMIN">
+                  </equals>
+                  <equals
+                        value="ROLE_USER_MANAGER">
+                  </equals>
+               </or>
+            </iterate>
+         </with>
+      </definition>
+      <definition
+            id="hasROLE_PROJECT_MANAGER">
+         <with
+               variable="eu.etaxonomy.taxeditor.security.userRoles">
+            <iterate
+                  ifEmpty="false"
+                  operator="or">
+               <or>
+                  <equals
+                        value="ROLE_ADMIN">
+                  </equals>
+                  <equals
+                        value="ROLE_PROJECT_MANAGER">
+                  </equals>
+               </or>
+            </iterate>
+         </with>
+      </definition>
+</extension>
+<extension
+      point="org.eclipse.ui.activities">
+   <activity
+         description="DELETE permission dependent ui contributions"
+         id="eu.etaxonomy.taxeditor.store.activityDelete"
+         name="Delete">
+      <enabledWhen>
+         <reference
+               definitionId="canDELETE">
+         </reference>
+      </enabledWhen>
+   </activity>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityDelete"
+         pattern="eu\.etaxonomy\.taxeditor\..*/.*.delete">
+   </activityPatternBinding>
+   <activity
+         description="UPDATE permission dependent ui contributions"
+         id="eu.etaxonomy.taxeditor.store.activityUpdate"
+         name="Update">
+      <enabledWhen>
+         <reference
+               definitionId="canUPDATE">
+         </reference>
+      </enabledWhen>
+   </activity>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityUpdate"
+         pattern="eu\.etaxonomy\.taxeditor\..*/.*.command\.update\..*">
+   </activityPatternBinding>
+   <activity
+         description="CREATE permission dependent ui contributions"
+         id="eu.etaxonomy.taxeditor.store.activityCreate"
+         name="Delete">
+      <enabledWhen>
+         <reference
+               definitionId="canDELETE">
+         </reference>
+      </enabledWhen>
+   </activity>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityCreate"
+         pattern="eu\.etaxonomy\.taxeditor\..*/.*.command\.create\..*">
+   </activityPatternBinding>
+   <activity
+         description="ROLE_USER_MANAGER dependent ui contributions"
+         id="eu.etaxonomy.taxeditor.store.activityUserManagement"
+         name="UserManagement">
+      <enabledWhen>
+         <reference
+               definitionId="hasROLE_USER_MANAGER">
+         </reference>
+      </enabledWhen>
+   </activity>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityUserManagement"
+         pattern="eu\.etaxonomy\.taxeditor\..*/.*.UserManagement">
+   </activityPatternBinding>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityUserManagement"
+         pattern="eu\.etaxonomy\.taxeditor\..*/bulkeditor\.input\.group">
+   </activityPatternBinding>
+   <activity
+         description="ROLE_PROJECT_MANAGER dependent ui contributions"
+         id="eu.etaxonomy.taxeditor.store.activityProjectManagement"
+         name="ProjectManagement">
+      <enabledWhen>
+         <reference
+               definitionId="hasROLE_PROJECT_MANAGER">
+         </reference>
+      </enabledWhen>
+   </activity>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityProjectManagement"
+         pattern="eu\.etaxonomy\.taxeditor\..*/eu\.etaxonomy\.taxeditor\..*\.definedTerm.*">
+   </activityPatternBinding>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityProjectManagement"
+         pattern="eu.etaxonomy.taxeditor.bulkeditor/bulkeditor.menus.openmenu"
+         isEqualityPattern="true">
+   </activityPatternBinding>
+   <activityPatternBinding
+         activityId="eu.etaxonomy.taxeditor.store.activityProjectManagement"
+         pattern="eu.etaxonomy.taxeditor.bulkeditor/eu.etaxonomy.taxeditor.editor.definedTerm"
+         isEqualityPattern="true">
+   </activityPatternBinding>
+</extension>
+<extension
+      point="org.eclipse.ui.services">
+   <sourceProvider
+         provider="eu.etaxonomy.taxeditor.security.AuthenticationSourceProvider">
+      <variable
+            name="eu.etaxonomy.taxeditor.security.userRoles"
+            priorityLevel="workbench">
+      </variable>
+   </sourceProvider>
 </extension>
-       
 </plugin>