Project

General

Profile

« Previous | Next » 

Revision 95116a15

Added by Patrick Plitzner over 5 years ago

ref #7775 i18n

View differences:

eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties
47 47
command.label.58 = Before the Current Node
48 48
command.label.24 = New Alternative
49 49
command.label.25 = Refresh
50
command.label.58 = Insert Node
51 50
command.label.26 = Delete
52 51
command.label.27 = New Factual Data Set
53 52
menu.label.1 = New
......
253 252
handledmenuitem.label.18 = New Factual Data Set with source
254 253
handledmenuitem.label.19 = Create default description
255 254
handledmenuitem.label.20 = Create literature description
256
command.commandname.22 = Create default taxon description
257
command.commandname.23 = Create literature taxon description
258
command.commandname.24 = New description with source
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_de.properties
34 34
command.label.12 = Akzeptiertes Taxon
35 35
command.label.13 = Synonym
36 36
command.label.14 = Fehlanwendung
37
command.label.61 = Pro Parte Synonym
38 37
command.label.15 = L\u00f6schen
39 38
command.label.16 = L\u00f6sche alle leeren Namen
40 39
command.label.17 = Tausche Synonym mit akzeptiertem Namen
41 40
command.label.18 = Zeige Details
42 41
command.label.19 = Speichern
43
menu.label.4 = Neue Bestimmungsschl\u00fcsselnummer
44 42
command.label.20 = Neue Knoten
45 43
command.label.21 = L\u00f6schen
46 44
command.label.22 = Wende Layout an
45
menu.label.4 = Neue Bestimmungsschl\u00fcsselnummer
47 46
command.label.23 = Nach dem aktuellen Knoten
48 47
command.label.58 = Vor dem aktuellen Knoten
49 48
command.label.24 = Neue Alternative
......
71 70
command.label.43 = \u00d6ffne verbundenes Konzept
72 71
command.label.44 = L\u00f6schen
73 72
command.label.45 = Bearbeite Rechte
74
command.label.57 = Setze als Basionym der homotypischen Gruppe
75 73
extension.name = Namensbefehle
76 74
category.name.0 = -- Namenseditor
77 75
command.name = \u00d6ffne Elter
......
128 126
command.label.47 = Referenz
129 127
command.label.48 = Datenquelle
130 128
command.label.49 = Fehlanwendung
131
command.label.60 = Pro Parte Synonym
132 129
command.label.50 = Benutze vorhandenes Bild
130
command.label.60 = Pro Parte Synonym
133 131
command.name.36 = Erstelle Fehlanwendung
134 132
command.name.60 = Erstelle Pro Parte Synonym
135
command.name.61 = Pro Parte Synonym
136

  
137 133
command.name.37 = Benutze vorhandenes Bild
138 134
command.name.38 = \u00d6ffne Verbreitungs-Editor
139 135
command.name.39 = Neue Datenquelle
......
251 247
handledmenuitem.label.16 = Character-Editor
252 248
handledmenuitem.tooltip.4 = Character-Editor
253 249
handledmenuitem.label.17 = Taxon entfernen
254
command.commandname.21 = Taxon entfernen
250
command.commandname.21 = Taxon entfernen
251

  
252
handledmenuitem.label.18 = Neues FaktendatenSet mit Quelle
253
handledmenuitem.label.19 = Standard-Beschreibung erstellen
254
handledmenuitem.label.20 = Literatur-Beschreibung erstellen
eu.etaxonomy.taxeditor.editor/fragment.e4xmi
377 377
    <elements xsi:type="commands:Command" xmi:id="_c3wW8FeBEeiJAP3GTkE0aQ" elementId="eu.etaxonomy.taxeditor.editor.command.descriptivedataseteditor.removeTaxon" commandName="%command.commandname.21"/>
378 378
    <elements xsi:type="commands:Command" xmi:id="_HSKdYFgXEeiQk_eTMvMviQ" elementId="eu.etaxonomy.taxeditor.editor.name.createProParteSynonym" commandName="%command.name.60"/>
379 379
    <elements xsi:type="commands:Command" xmi:id="_BgX6gFj_EeiQk_eTMvMviQ" elementId="eu.etaxonomy.taxeditor.editor.command.changeToProParteSynonym" commandName="%command.name.61"/>
380
    <elements xsi:type="commands:Command" xmi:id="_ZHC3oLKVEeikjKoOnLFm2w" elementId="eu.etaxonomy.taxeditor.editor.charactermatrix.command.createDefaultTaxonDescription" commandName="%command.commandname.22"/>
381
    <elements xsi:type="commands:Command" xmi:id="_fkPkkLKVEeikjKoOnLFm2w" elementId="eu.etaxonomy.taxeditor.editor.charactermatrix.command.createLiteratureTaxonDescription" commandName="%command.commandname.23"/>
382
    <elements xsi:type="commands:Command" xmi:id="_Z51sQLy2EeioE565ihOF2g" elementId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.adddescriptionWithSource" commandName="%command.commandname.24"/>
380
    <elements xsi:type="commands:Command" xmi:id="_ZHC3oLKVEeikjKoOnLFm2w" elementId="eu.etaxonomy.taxeditor.editor.charactermatrix.command.createDefaultTaxonDescription" commandName="handledmenuitem.label.19"/>
381
    <elements xsi:type="commands:Command" xmi:id="_fkPkkLKVEeikjKoOnLFm2w" elementId="eu.etaxonomy.taxeditor.editor.charactermatrix.command.createLiteratureTaxonDescription" commandName="handledmenuitem.label.20"/>
382
    <elements xsi:type="commands:Command" xmi:id="_Z51sQLy2EeioE565ihOF2g" elementId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.adddescriptionWithSource" commandName="handledmenuitem.label.18"/>
383 383
  </fragments>
384 384
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_pZmusEalEeeXMc6kSYO7Xg" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView" positionInList="after:eu.etaxonomy.taxeditor.workbench.menuseparator.navigation">
385 385
    <elements xsi:type="menu:HandledMenuItem" xmi:id="_FPIHQKNwEeebGZ23ERGMGw" elementId="eu.etaxonomy.taxeditor.editor.showViewMenu.conceptGraph" label="%view.name.3" iconURI="" tooltip="%view.name.3" command="_WPjpoDSnEeek0dKsFNy--Q">
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/CreateDescriptionWithSourceHandler.java
15 15
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
16 16
import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
17 17
import org.eclipse.e4.ui.services.IServiceConstants;
18
import org.eclipse.jface.viewers.TreeNode;
19 18
import org.eclipse.swt.widgets.Shell;
20 19

  
21 20
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
22 21
import eu.etaxonomy.cdm.model.common.OriginalSourceType;
23
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
24 22
import eu.etaxonomy.cdm.model.reference.Reference;
25 23
import eu.etaxonomy.cdm.model.taxon.Taxon;
26
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
27 24
import eu.etaxonomy.taxeditor.editor.EditorUtil;
28
import eu.etaxonomy.taxeditor.editor.view.descriptive.e4.FactualDataPartE4;
29
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateSpecimenDescriptionOperation;
30 25
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateTaxonDescriptionOperation;
31
import eu.etaxonomy.taxeditor.model.AbstractUtility;
32
import eu.etaxonomy.taxeditor.operation.AbstractDescriptionPostOperation;
26
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
33 27
import eu.etaxonomy.taxeditor.ui.dialog.selection.ReferenceSelectionDialog;
34 28

  
35 29
/**
......
37 31
 * @since Sep 20, 2018
38 32
 *
39 33
 */
40
public class CreateDescriptionWithSourceHandler {
34
public class CreateDescriptionWithSourceHandler extends CreateDescriptionHandlerE4 {
35

  
36
    private Shell shell;
37

  
41 38
    @Execute
42 39
    public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart, MMenuItem menuItem,
43 40
            UISynchronize sync, @Named(IServiceConstants.ACTIVE_SHELL) Shell shell) {
41
        this.shell = shell;
42
        super.execute(activePart, menuItem, sync);
43
    }
44 44

  
45
    @Override
46
    protected CreateTaxonDescriptionOperation createTaxonOperation(String eventLabel, Taxon taxon, IPostOperationEnabled postOperationEnabled) {
45 47
        Reference reference = ReferenceSelectionDialog.select(shell, null);
46

  
47
        FactualDataPartE4 factualDataPart = (FactualDataPartE4) activePart.getObject();
48

  
49
        AbstractDescriptionPostOperation operation = null;
50
        Object viewerInput = factualDataPart.getViewer().getInput();
51
        if (viewerInput instanceof TreeNode) {
52
            viewerInput = ((TreeNode) viewerInput).getValue();
53
        }
54
        if (viewerInput instanceof SpecimenOrObservationBase<?>) {
55
            operation = new CreateSpecimenDescriptionOperation(menuItem.getLocalizedLabel(),
56
                    EditorUtil.getUndoContext(), (SpecimenOrObservationBase<?>) viewerInput, factualDataPart);
57
            AbstractUtility.executeOperation(operation, sync);
58
        }
59
        if (viewerInput instanceof TaxonBase) {
60
            operation = new CreateTaxonDescriptionOperation(menuItem.getLocalizedLabel(), EditorUtil.getUndoContext(),
61
                    (Taxon) viewerInput,
62
                    IdentifiableSource.NewInstance(OriginalSourceType.Unknown, null, null, reference, null), factualDataPart);
63
            AbstractUtility.executeOperation(operation, sync);
64
        }
48
        IdentifiableSource source = IdentifiableSource.NewInstance(OriginalSourceType.Unknown, null, null, reference, null);
49
        return new CreateTaxonDescriptionOperation(eventLabel, EditorUtil.getUndoContext(), taxon, source, postOperationEnabled);
65 50
    }
66 51
}

Also available in: Unified diff