Project

General

Profile

Revision 2b310e3a

ID2b310e3a8cda068d9c89481ea9fde0cccf8cb883
Parent 27064204
Child f9b7a561

Added by Patrick Plitzner over 2 years ago

Add context menu for structure/property tree creation

View differences:

eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties
270 270

  
271 271
page.name.59 = Name Features
272 272
page.name.60 = Name Features
273
page.name.61 = Name Details View
273
page.name.61 = Name Details View
274
menu.label.5 = New
275
handledmenuitem.label.20 = Structure Tree
276
handledmenuitem.label.21 = Property Tree
277
command.commandname.20 = Structure Tree (OWL)
278
command.commandname.21 = OWL Term Export
279
command.commandname.22 = Create Structure Tree
280
command.commandname.23 = Create Property Tree
281
handledmenuitem.label.22 = OWL Term Export
282
handledmenuitem.label.23 = Owl Import
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle_de.properties
202 202
page.name.47 = Trivialnamen
203 203
page.name.48 = Auswahldialoge
204 204
command.name.111 = \u00d6ffne Admin Verbreitungsstatus-Wizard
205
command.name.112 = \u00d6ffne Admin Common Name Areal-Wizard
205
command.name.112 = \u00d6ffne Admin Common Name Area-Wizard
206
command.name.112 = \u00d6ffne Common Name Area-Wizard
206 207
handledmenuitem.label.1 = Neuer Termbaum
207 208
handledmenuitem.label.2 = Term als Kind hinzuf?gen
208 209
handledmenuitem.label.3 = Term hinzuf?gen
......
233 234
menu.label.3 = Import
234 235
handledmenuitem.label.10 = Neustarten
235 236
handledmenuitem.label.11 = Nach Updates suchen
236
command.commandname.13 = ?ffne Verbreitungsstatus Wizard
237

  
238
handledmenuitem.label.12 = Einf?gen
239
handledmenuitem.label.13 = Kopieren
240
command.commandname.11 = Merkmal kopieren
241
command.commandname.12 = Merkmal einf?gen
242
command.commandname.13 = Open Distribution Status Wizard
237 243

  
238 244
menu.label.4 = Export
239 245
handledmenuitem.label.14 = Export als Ontologie
......
251 257
handledmenuitem.label.15 = Verschiebe Term
252 258
partdescriptor.label.2 = Term Suche
253 259
partdescriptor.label.3 = Occurrence Suche
260
command.commandname.15 = ?ffne Cache Updater
261
command.commandname.16 = ?ffne Sort Index Updater
262
command.commandname.17 = Term verschieben
263
command.commandname.18 = ?ffne Verbreitungstatus pro Area Wizard
254 264
handledmenuitem.label.16 = Term Suche
255 265
handledmenuitem.label.17 = Occurrence Suche
256 266
handledmenuitem.label.18 = Update Caches
257 267
handledmenuitem.label.19 = Update Sortindices
258 268

  
269
command.commandname.19 = ?ffne Area Wizard
270

  
259 271
page.name.59 = Namensmerkmale
260 272
page.name.60 = Namensmerkmale
261
page.name.61 = Name Details View
273
page.name.61 = Name Details View
274
menu.label.5 = Neu
275
handledmenuitem.label.20 = Struktur-Baum
276
handledmenuitem.label.21 = Property-Baum
277
command.commandname.20 = Struktur-Baum (OWL)
278
command.commandname.21 = OWL-Term-Export
279
command.commandname.22 = Strukturbaum erstellen
280
command.commandname.23 = Propertybaum erstellen
281
handledmenuitem.label.22 = OWL Term Export
282
handledmenuitem.label.23 = Owl Import
eu.etaxonomy.taxeditor.store/fragment.e4xmi
14 14
      <handlers xmi:id="_VSc2UGcqEee0qLTtA2ZpVQ" elementId="eu.etaxonomy.taxeditor.featuretree.e4.handler.FeatureTreeExportWordHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.featuretree.e4.handler.FeatureTreeExportWordHandler" command="_I_yx4GcqEee0qLTtA2ZpVQ"/>
15 15
      <handlers xmi:id="_3wq0cGceEee0qLTtA2ZpVQ" elementId="eu.etaxonomy.taxeditor.featuretree.e4.handler.AddFeatureHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.featuretree.e4.handler.AddFeatureHandler" command="_oftL0GceEee0qLTtA2ZpVQ"/>
16 16
      <handlers xmi:id="_DcmpgPhnEei8uPv-H2wqnw" elementId="eu.etaxonomy.taxeditor.featuretree.e4.handler.FeatureTreeExportOntologyHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.featuretree.e4.handler.FeatureTreeExportOntologyHandler" command="_xyZ4oPhmEei8uPv-H2wqnw"/>
17
      <handlers xmi:id="_LL9nkI51Eem9zru2SAuoRA" elementId="eu.etaxonomy.taxeditor.featuretree.e4.handler.CreateStructureTreeHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.featuretree.e4.handler.CreateStructureTreeHandler" command="_BjUSUI51Eem9zru2SAuoRA"/>
18
      <handlers xmi:id="_u5RGoI53Eem9zru2SAuoRA" elementId="eu.etaxonomy.taxeditor.featuretree.e4.handler.CreatePropertyTreeHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.featuretree.e4.handler.CreatePropertyTreeHandler" command="_sKucwI53Eem9zru2SAuoRA"/>
17 19
      <menus xsi:type="menu:PopupMenu" xmi:id="__Jwh4GceEee0qLTtA2ZpVQ" elementId="eu.etaxonomy.taxeditor.store.popupmenu.featureTreeEditor">
18 20
        <children xsi:type="menu:HandledMenuItem" xmi:id="_GuuM0CHXEeiP8eNo0PEm1g" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.newfeaturetree" label="%handledmenuitem.label.1" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/new_wiz.png" command="_AJtnsCHXEeiP8eNo0PEm1g"/>
21
        <children xsi:type="menu:Menu" xmi:id="_AJdcEI54Eem9zru2SAuoRA" elementId="eu.etaxonomy.taxeditor.store.menu.new" label="%menu.label.5" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/new_wiz.png">
22
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_DuXtQI54Eem9zru2SAuoRA" coreExpressionId="isShowExperimentalFeatures"/>
23
          <children xsi:type="menu:HandledMenuItem" xmi:id="_4jFA4I50Eem9zru2SAuoRA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.newStructureTree" label="%handledmenuitem.label.20" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/new_wiz.png" command="_BjUSUI51Eem9zru2SAuoRA">
24
            <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FJyiYI54Eem9zru2SAuoRA" coreExpressionId="isShowExperimentalFeatures"/>
25
          </children>
26
          <children xsi:type="menu:HandledMenuItem" xmi:id="_7yI2gI53Eem9zru2SAuoRA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.newPropertyTree" label="%handledmenuitem.label.21" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/new_wiz.png" command="_sKucwI53Eem9zru2SAuoRA">
27
            <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_FdhWsI54Eem9zru2SAuoRA" coreExpressionId="isShowExperimentalFeatures"/>
28
          </children>
29
        </children>
19 30
        <children xsi:type="menu:MenuSeparator" xmi:id="_eIB1kCHXEeiP8eNo0PEm1g" elementId="eu.etaxonomy.taxeditor.store.menuseparator.5"/>
20 31
        <children xsi:type="menu:HandledMenuItem" xmi:id="_jr4E0Be0EeiXusClKZjycQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.addchildfeature" label="%handledmenuitem.label.2" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/add.gif" command="_aPYxsBezEeiXusClKZjycQ"/>
21 32
        <children xsi:type="menu:HandledMenuItem" xmi:id="_eWBz0GcjEee0qLTtA2ZpVQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.addFeature" label="%handledmenuitem.label.3" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/add.gif" command="_oftL0GceEee0qLTtA2ZpVQ"/>
......
23 34
        <children xsi:type="menu:HandledMenuItem" xmi:id="_G_IOENj3EeidDMMI9xTsbQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.paste" label="%handledmenuitem.label.12" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/paste_edit.png" command="_xDk5kNjyEeidDMMI9xTsbQ"/>
24 35
        <children xsi:type="menu:HandledMenuItem" xmi:id="_QXkWYNjyEeidDMMI9xTsbQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.copy" label="%handledmenuitem.label.13" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/copy_edit.png" command="_cMyQ4NjyEeidDMMI9xTsbQ"/>
25 36
        <children xsi:type="menu:MenuSeparator" xmi:id="_So5f0NjyEeidDMMI9xTsbQ" elementId="eu.etaxonomy.taxeditor.store.menuseparator.7"/>
26
        <children xsi:type="menu:Menu" xmi:id="_jPawUPhmEei8uPv-H2wqnw" elementId="eu.etaxonomy.taxeditor.store.menu.export" label="%menu.label.4">
37
        <children xsi:type="menu:Menu" xmi:id="_jPawUPhmEei8uPv-H2wqnw" elementId="eu.etaxonomy.taxeditor.store.menu.export" label="%menu.label.4" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/export.gif">
27 38
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_QGF5kCRZEemBIp_HwXtqoA" coreExpressionId="isFeatureTree"/>
28 39
          <children xsi:type="menu:HandledMenuItem" xmi:id="_7vaEcGcqEee0qLTtA2ZpVQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportFeatureTreeOwl" label="%handledmenuitem.label.14" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/export.gif" command="_xyZ4oPhmEei8uPv-H2wqnw">
29 40
            <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_-91IQGcqEee0qLTtA2ZpVQ" coreExpressionId="isShowExperimentalFeatures"/>
......
152 163
    <elements xsi:type="commands:Command" xmi:id="_xDk5kNjyEeidDMMI9xTsbQ" elementId="eu.etaxonomy.taxeditor.store.command.featureTree.pasteFeature" commandName="%command.commandname.12"/>
153 164
    <elements xsi:type="commands:Command" xmi:id="_Za5DYO5vEeizn7bmbAeBkw" elementId="eu.etaxonomy.taxeditor.store.open.OpenDistributionStatusWizardHandler" commandName="%command.commandname.13"/>
154 165
    <elements xsi:type="commands:Command" xmi:id="_xyZ4oPhmEei8uPv-H2wqnw" elementId="eu.etaxonomy.taxeditor.store.command.featureTree.exportTreeOntology" commandName="%command.commandname.14"/>
155
    <elements xsi:type="commands:Command" xmi:id="_Z7vHUGdoEemm7Ie9EDdklA" elementId="eu.etaxonomy.taxeditor.store.command.importOwl" commandName="Structure Tree (OWL)"/>
166
    <elements xsi:type="commands:Command" xmi:id="_Z7vHUGdoEemm7Ie9EDdklA" elementId="eu.etaxonomy.taxeditor.store.command.importOwl" commandName="%command.commandname.20"/>
156 167
    <elements xsi:type="commands:Command" xmi:id="_qYxw8D85EemTy7SLZkowuQ" elementId="eu.etaxonomy.taxeditor.store.command.OpenDatabaseRepairWizard" commandName="%command.commandname.15"/>
157 168
    <elements xsi:type="commands:Command" xmi:id="_VUQY0D86EemTy7SLZkowuQ" elementId="eu.etaxonomy.taxeditor.store.command.openSortIndexUpdaterWizard" commandName="%command.commandname.16"/>
158 169
    <elements xsi:type="commands:Command" xmi:id="_d6YpoEAVEembfJNLZI9wiA" elementId="eu.etaxonomy.taxeditor.editor.definedTerms.moveTerm" commandName="%command.commandname.17"/>
159 170
    <elements xsi:type="commands:Command" xmi:id="_lJi2sGZvEemew5ARzf3JfA" elementId="eu.etaxonomy.taxeditor.store.open.OpenDistributionPerAreaStatusWizardHandler" commandName="%command.commandname.18"/>
160 171
    <elements xsi:type="commands:Command" xmi:id="_QnWnMGZ-Eemew5ARzf3JfA" elementId="eu.etaxonomy.taxeditor.store.open.OpenDistributionAreaWizardHandler" commandName="%command.commandname.19"/>
161
    <elements xsi:type="commands:Command" xmi:id="_WISF0H1LEem6uMX-L-maww" elementId="eu.etaxonomy.taxeditor.store.command.export.term.owl" commandName="OWL Term Export"/>
172
    <elements xsi:type="commands:Command" xmi:id="_WISF0H1LEem6uMX-L-maww" elementId="eu.etaxonomy.taxeditor.store.command.export.term.owl" commandName="%command.commandname.21"/>
173
    <elements xsi:type="commands:Command" xmi:id="_BjUSUI51Eem9zru2SAuoRA" elementId="eu.etaxonomy.taxeditor.store.command.featureTree.createStructureTree" commandName="%command.commandname.22"/>
174
    <elements xsi:type="commands:Command" xmi:id="_sKucwI53Eem9zru2SAuoRA" elementId="eu.etaxonomy.taxeditor.store.command.featureTree.createPropertyTree" commandName="%command.commandname.23"/>
162 175
  </fragments>
163 176
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_swGH0GhvEee3K4uKJljEYg" featurename="handlers" parentElementId="xpath:/">
164 177
    <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"/>
......
238 251
      <children xsi:type="menu:HandledMenuItem" xmi:id="_qR5ocKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportCsvName" label="%wizard.name.19" command="_zDy74KqZEeeXcJGhyhlrKA"/>
239 252
      <children xsi:type="menu:HandledMenuItem" xmi:id="_tBUcEKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportCsvPrint" label="%wizard.name.20" command="_zIKegKqZEeeXcJGhyhlrKA"/>
240 253
      <children xsi:type="menu:HandledMenuItem" xmi:id="_uruvcKqZEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportCdmLight" label="%wizard.name.22" command="_zLKvMKqZEeeXcJGhyhlrKA"/>
241
      <children xsi:type="menu:HandledMenuItem" xmi:id="_OL6sMH1LEem6uMX-L-maww" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportOwlTerm" label="OWL Term Export" command="_WISF0H1LEem6uMX-L-maww">
254
      <children xsi:type="menu:HandledMenuItem" xmi:id="_OL6sMH1LEem6uMX-L-maww" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.exportOwlTerm" label="%handledmenuitem.label.22" command="_WISF0H1LEem6uMX-L-maww">
242 255
        <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_c7iiUH1LEem6uMX-L-maww" coreExpressionId="isShowExperimentalFeatures"/>
243 256
      </children>
244 257
    </elements>
......
254 267
      <children xsi:type="menu:HandledMenuItem" xmi:id="_pQNeoKmsEeeTAPHmaMLwQQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.importRisReference" label="%wizard.name.24" command="_tBCr8KmsEeeTAPHmaMLwQQ"/>
255 268
      <children xsi:type="menu:HandledMenuItem" xmi:id="_hXY2UKmuEeeTAPHmaMLwQQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.importSdd" label="%wizard.name.4" command="_bLGTMKmuEeeTAPHmaMLwQQ"/>
256 269
      <children xsi:type="menu:HandledMenuItem" xmi:id="_X2Xb8KnCEeeTAPHmaMLwQQ" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.importTcs" label="%wizard.name" command="_OQ9n8KnCEeeTAPHmaMLwQQ"/>
257
      <children xsi:type="menu:HandledMenuItem" xmi:id="_H6tK0GdoEemm7Ie9EDdklA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.importOwl" label="Owl Import" command="_Z7vHUGdoEemm7Ie9EDdklA">
270
      <children xsi:type="menu:HandledMenuItem" xmi:id="_H6tK0GdoEemm7Ie9EDdklA" elementId="eu.etaxonomy.taxeditor.store.handledmenuitem.importOwl" label="%handledmenuitem.label.23" command="_Z7vHUGdoEemm7Ie9EDdklA">
258 271
        <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_OXutkG2HEemZUZ7gSd1y0w" coreExpressionId="isCdmStoreConnectedAndShowExperimental"/>
259 272
      </children>
260 273
    </elements>
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/handler/CreateFeatureTreeHandler.java
18 18
import org.eclipse.e4.ui.services.IServiceConstants;
19 19

  
20 20
import eu.etaxonomy.cdm.model.term.FeatureTree;
21
import eu.etaxonomy.cdm.model.term.TermType;
21 22
import eu.etaxonomy.taxeditor.featuretree.e4.IFeatureTreeEditor;
22 23
import eu.etaxonomy.taxeditor.featuretree.e4.operation.CreateFeatureTreeOperation;
23 24
import eu.etaxonomy.taxeditor.model.AbstractUtility;
......
38 39
            return;
39 40
        }
40 41

  
41

  
42
        FeatureTree tree = FeatureTree.NewInstance();
42
        FeatureTree tree = FeatureTree.NewInstance(getTermType());
43 43
        tree.setTitleCache("New feature tree", true);
44 44
        CreateFeatureTreeOperation operation = new CreateFeatureTreeOperation(tree, editor, editor);
45 45
        AbstractUtility.executeOperation(operation, sync);
46 46
    }
47 47

  
48
    protected TermType getTermType(){
49
        return TermType.Feature;
50
    }
51

  
48 52
    @CanExecute
49 53
    public boolean canExecute(
50 54
            @Named(IServiceConstants.ACTIVE_PART)MPart thisPart,
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/handler/CreatePropertyTreeHandler.java
1
/**
2
* Copyright (C) 2017 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.featuretree.e4.handler;
10

  
11
import eu.etaxonomy.cdm.model.term.TermType;
12

  
13
/**
14
 *
15
 * @author pplitzner
16
 * @since Jun 14, 2019
17
 *
18
 */
19
public class CreatePropertyTreeHandler extends CreateFeatureTreeHandler {
20

  
21
    @Override
22
    protected TermType getTermType() {
23
        return TermType.Property;
24
    }
25

  
26
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/handler/CreateStructureTreeHandler.java
1
/**
2
* Copyright (C) 2017 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.featuretree.e4.handler;
10

  
11
import eu.etaxonomy.cdm.model.term.TermType;
12

  
13
/**
14
 *
15
 * @author pplitzner
16
 * @since Jun 14, 2019
17
 *
18
 */
19
public class CreateStructureTreeHandler extends CreateFeatureTreeHandler {
20

  
21
    @Override
22
    protected TermType getTermType() {
23
        return TermType.Structure;
24
    }
25

  
26
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)