Project

General

Profile

Revision 43ed2498

ID43ed2498f22240d25cbd151e3eaaac3d9d624754
Parent d3ca3e94
Child e9eec17d

Added by Katja Luther about 1 year ago

ref #8282: add setDoubtful to setFlag menu in navigator

View differences:

eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/bundle.properties
62 62
command.name.setExcluded = Set Excluded Flag
63 63
command.label.removeExcluded = Remove Excluded Flag
64 64
command.name.removeExcluded = Remove Excluded Flag
65
command.name.setDoubtful = Set Doubtful Flag
66
command.label.setDoubtful = Set Doubtful Flag
67
command.name.removeDoubtful = Remove Doubtful Flag
68
command.label.removeDoubtful = Remove Doubtful Flag
69

  
65 70
wizard.name = TCS
66 71
wizard.name.2 = Excel Normal Explicit Taxa
67 72
wizard.name.3 = ABCD
......
78 83
wizard.name.14 = Specimen
79 84
wizard.name.23 = Excel Distribution Data Update
80 85
wizard.name.24 = RIS Reference
86

  
87
handledmenuitem.label.1 = Clone Classification
88
menu.label.1 = Import
89
handledmenuitem.label.2 = Import Specimens
90
menu.label.2 = Export
91
handledtoolitem.label.1 = Collapse
92
handledtoolitem.label.2 = Sync with taxon selectio
93
command.commandname.1 = Clone Classification
94
command.commandname.2 = Refresh Navigator
95
command.commandname.3 = Link with taxon
96

  
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/bundle_de.properties
11 11
command.label.5 = Bearbeiten
12 12
command.label.6 = Akzeptiertes Taxon zum Synonym umwandeln
13 13
command.label.61 = Akzeptiertes Taxon zum Synonym umwandeln (Setze Name in Quelle automatisch)
14
command.label.62 = Akzeptiertes Taxon zum Synonym umwandeln (Der Name wird automatisch gesetzt, wenn er leer ist)
14 15
command.label.7 = Verschiebe Taxon (mit Kindern)
15 16
command.label.8 = Importieren
16 17
command.label.9 = Exportieren
......
47 48
navigatorContent.name.0 = Taxonknoten
48 49
navigatorContent.name.1 = Synonyme (experimentell)
49 50
command.label.moveFactualData = Verschiebe Faktendaten zu Taxon
50
command.label.moveFactualDataSetNameInSource = Verschiebe Faktendaten zu Taxon (Setze Name in Quelle automatisch)
51
command.label.moveFactualDataSetNameInSource = Verschiebe Faktendaten zu anderem Taxon und setze den Namen in der Quelle, wenn dieser leer ist
51 52
command.name.moveFactualData = Verschiebe Faktendaten 
52
command.name.moveFactualDataSetNameInSource = Verschiebe Faktendaten (Setze Name in Quelle automatisch)
53
command.name.moveFactualDataSetNameInSource = Verschiebe Faktendaten zu anderem Taxon und setze den Namen in der Quelle, wenn dieser leer ist
53 54
command.label.setSecForSubtree = Secundum Referenz
54 55
command.name.setSecForSubtree = Setze Secundum f?r Teilbaum
55 56
command.label.setPublishForSubtree = Publish Flag
......
62 63
command.name.setExcluded = Setze Excluded Flag
63 64
command.label.removeExcluded = Entferne Excluded Flag
64 65
command.name.removeExcluded = Entferne Excluded Flag
66
command.name.setDoubtful = Setze Doubtful Flag
67
command.label.setDoubtful = Setze Doubtful Flag
68
command.name.removeDoubtful = Entferne Doubtful Flag
69
command.label.removeDoubtful = Entferne Doubtful Flag
65 70
wizard.name = TCS
66 71
wizard.name.2 = Excel Normal Explicit Taxa
67 72
wizard.name.3 = ABCD
eu.etaxonomy.taxeditor.navigation/fragment.e4xmi
44 44
      <handlers xmi:id="_9is8MM1LEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemoveExcludedHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemoveExcludedHandler" command="_mNPRoM1LEeiHbMP3rrIRKQ"/>
45 45
      <handlers xmi:id="_fwEOsL9SEemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemotingChangeAcceptedTaxonToSynonymSetNameInSourceHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemotingChangeAcceptedTaxonToSynonymSetNameInSourceHandlerE5" command="_OrLKUL9SEemCian_vXpNsA"/>
46 46
      <handlers xmi:id="_MAkIwL9TEemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemotingMoveFactualDataSetNameInSourceHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemotingMoveFactualDataSetNameInSourceHandlerE5" command="_7qhucL9SEemCian_vXpNsA"/>
47
      <handlers xmi:id="_ifvyoMWVEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.handler.SetDoubtfulHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.SetDoubtfulHandler" command="_l5_r8MWVEemX2v5WBCy_yg"/>
48
      <handlers xmi:id="_QolHUMWWEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.handler.removeDoubtfulFlagHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemoveDoubtfulHandler" command="_pr-IwMWVEemX2v5WBCy_yg"/>
47 49
      <menus xsi:type="menu:PopupMenu" xmi:id="_XNXnkJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigator.popupmenu.taxonnavigator">
48 50
        <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_5ydggKkeEeejedk4mZQIGw" coreExpressionId="isCdmStoreConnected"/>
49 51
        <children xsi:type="menu:Menu" xmi:id="_yzFmYJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.menu.new" label="%menu.label">
......
57 59
        <children xsi:type="menu:DynamicMenuContribution" xmi:id="_3d1BwJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.dynamicmenucontribution.openInCdmViewer" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.CdmViewerContextMenuE4"/>
58 60
        <children xsi:type="menu:MenuSeparator" xmi:id="_h3uU0JJYEee-eM8NeuXskA" elementId="eu.etaxonomy.taxeditor.navigation.menuseparator.6"/>
59 61
        <children xsi:type="menu:HandledMenuItem" xmi:id="_9hdNkJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.fixclassificationhierarchy" label="%command.label.fixClassificationHierarchy" command="_jXX0YJIxEeeJAdt8ZUxyaw"/>
60
        <children xsi:type="menu:HandledMenuItem" xmi:id="_ivOrwJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.cloneclassification" label="Clone Classification" command="_nOOxMJIxEeeJAdt8ZUxyaw"/>
62
        <children xsi:type="menu:HandledMenuItem" xmi:id="_ivOrwJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.cloneclassification" label="%handledmenuitem.label.1" command="_nOOxMJIxEeeJAdt8ZUxyaw"/>
61 63
        <children xsi:type="menu:MenuSeparator" xmi:id="_ktyqMJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.menuseparator.1"/>
62 64
        <children xsi:type="menu:HandledMenuItem" xmi:id="_lALasJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.accTaxonToSynonym" label="%command.label.6" command="_p7Oi8JIxEeeJAdt8ZUxyaw">
63 65
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_v0c4YFerEeiKs7VTbRzV-A" coreExpressionId="isTaxonBase"/>
64 66
        </children>
65
        <children xsi:type="menu:HandledMenuItem" xmi:id="_3gNfkL9REemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.accTaxonToSynonymSetNameInSource" label="%command.label.61" command="_OrLKUL9SEemCian_vXpNsA">
67
        <children xsi:type="menu:HandledMenuItem" xmi:id="_3gNfkL9REemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.accTaxonToSynonymSetNameInSource" label="%command.label.61" tooltip="%command.label.62" command="_OrLKUL9SEemCian_vXpNsA">
66 68
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_OwXkYL_3Eem0lIGGphM50w" coreExpressionId="isTaxonBase"/>
67 69
        </children>
68 70
        <children xsi:type="menu:HandledMenuItem" xmi:id="_nh_3MJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.moveTaxon" label="%command.label.7" command="_w4RNkJIxEeeJAdt8ZUxyaw"/>
69 71
        <children xsi:type="menu:HandledMenuItem" xmi:id="_o1PAsJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.movefactualdata" label="%command.label.moveFactualData" command="_3PRy8JIxEeeJAdt8ZUxyaw"/>
70 72
        <children xsi:type="menu:HandledMenuItem" xmi:id="_oT7tML9SEemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.movefactualdataSetNameInSource" label="%command.label.moveFactualDataSetNameInSource" command="_7qhucL9SEemCian_vXpNsA"/>
71 73
        <children xsi:type="menu:MenuSeparator" xmi:id="_rBdnsJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.menuseparator.2"/>
72
        <children xsi:type="menu:Menu" xmi:id="_T8ey0KkeEeejedk4mZQIGw" elementId="eu.etaxonomy.taxeditor.navigation.menu.import" label="Import">
74
        <children xsi:type="menu:Menu" xmi:id="_T8ey0KkeEeejedk4mZQIGw" elementId="eu.etaxonomy.taxeditor.navigation.menu.import" label="%menu.label.1">
73 75
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_7ZtcEMuuEeiGO4eKaXkw0w" coreExpressionId="isShowIOMenuEnabled"/>
74
          <children xsi:type="menu:HandledMenuItem" xmi:id="_YMugAKkeEeejedk4mZQIGw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.importSpecimens" label="Import Specimens" command="_yBC78KnJEeeTAPHmaMLwQQ"/>
76
          <children xsi:type="menu:HandledMenuItem" xmi:id="_YMugAKkeEeejedk4mZQIGw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.importSpecimens" label="%handledmenuitem.label.2" command="_yBC78KnJEeeTAPHmaMLwQQ"/>
75 77
          <children xsi:type="menu:HandledMenuItem" xmi:id="_2NC0kKnEEeeTAPHmaMLwQQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.importAbcd" label="%wizard.name.3" command="_AOq4QKnKEeeTAPHmaMLwQQ"/>
76 78
          <children xsi:type="menu:HandledMenuItem" xmi:id="_3rMNkKnEEeeTAPHmaMLwQQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.importExceldistribution" label="%wizard.name.23" command="_Anfn8KnKEeeTAPHmaMLwQQ">
77 79
            <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_3rMNkanEEeeTAPHmaMLwQQ" coreExpressionId="isShowExperimentalFeatures"/>
......
82 84
          <children xsi:type="menu:HandledMenuItem" xmi:id="_7XgHQKnEEeeTAPHmaMLwQQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.importSdd" label="%wizard.name.4" command="_AuNT8KnKEeeTAPHmaMLwQQ"/>
83 85
          <children xsi:type="menu:HandledMenuItem" xmi:id="_7w_lUKnEEeeTAPHmaMLwQQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.importTcs" label="%wizard.name" command="_LCsbgKnKEeeTAPHmaMLwQQ"/>
84 86
        </children>
85
        <children xsi:type="menu:Menu" xmi:id="_rbInwKqhEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.navigation.menu.export" label="Export">
87
        <children xsi:type="menu:Menu" xmi:id="_rbInwKqhEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.navigation.menu.export" label="%menu.label.2">
86 88
          <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_3qJaEMuuEeiGO4eKaXkw0w" coreExpressionId="isShowIOMenuEnabled"/>
87 89
          <children xsi:type="menu:HandledMenuItem" xmi:id="_tPAZIKqhEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.exportJaxb" label="%wizard.name.6" command="_fQX7EKqhEeeXcJGhyhlrKA"/>
88 90
          <children xsi:type="menu:HandledMenuItem" xmi:id="_xwZgsKqhEeeXcJGhyhlrKA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.eu.etaxonomy.taxeditor.navigation.handledmenuitem.exportSdd" label="%wizard.name.8" command="_iaZnEKqhEeeXcJGhyhlrKA"/>
......
101 103
          <children xsi:type="menu:HandledMenuItem" xmi:id="_mLjosJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.setsecforsubtree" label="%command.label.setSecForSubtree" command="_uFj1YJIxEeeJAdt8ZUxyaw"/>
102 104
        </children>
103 105
        <children xsi:type="menu:Menu" xmi:id="_Nz3dkM1MEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.menu.set" label="%command.label.nodeUpdates">
104
          <children xsi:type="menu:HandledMenuItem" xmi:id="_Yb8F8M1AEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.removeUnplaced" label="%command.label.removeUnplaced" command="_gMQnoM1AEeiHbMP3rrIRKQ">
105
            <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_39MtQM1AEeiHbMP3rrIRKQ" coreExpressionId="isUnplaced"/>
106
          </children>
107
          <children xsi:type="menu:HandledMenuItem" xmi:id="_YeWwgM0vEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.setUnplaced" label="%command.label.setUnplaced" command="_oghMkM0vEeiHbMP3rrIRKQ">
108
            <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_fXWooM0vEeiHbMP3rrIRKQ" coreExpressionId="isNotUnplaced"/>
109
          </children>
106
          <children xsi:type="menu:HandledMenuItem" xmi:id="_Yb8F8M1AEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.removeUnplaced" label="%command.label.removeUnplaced" command="_gMQnoM1AEeiHbMP3rrIRKQ"/>
107
          <children xsi:type="menu:HandledMenuItem" xmi:id="_YeWwgM0vEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.setUnplaced" label="%command.label.setUnplaced" command="_oghMkM0vEeiHbMP3rrIRKQ"/>
110 108
          <children xsi:type="menu:HandledMenuItem" xmi:id="_poLj8M1KEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.setExcluded" label="%command.label.setExcluded" command="_3laT0M1KEeiHbMP3rrIRKQ"/>
111 109
          <children xsi:type="menu:HandledMenuItem" xmi:id="_c1QOkM1LEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.removeExcluded" label="%command.label.removeExcluded" command="_mNPRoM1LEeiHbMP3rrIRKQ"/>
110
          <children xsi:type="menu:HandledMenuItem" xmi:id="_KGONkMWWEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.setDoubtful" label="%command.label.setDoubtful" command="_l5_r8MWVEemX2v5WBCy_yg"/>
111
          <children xsi:type="menu:HandledMenuItem" xmi:id="_brursMWWEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.removeDoubtful" label="%command.label.removeDoubtful" command="_pr-IwMWVEemX2v5WBCy_yg"/>
112 112
        </children>
113 113
        <children xsi:type="menu:MenuSeparator" xmi:id="_z0Q6EJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.menuseparator.4"/>
114 114
        <children xsi:type="menu:HandledMenuItem" xmi:id="_0FX4MJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.refresh" label="%command.label.11" command="_ukhM0JIyEeeJAdt8ZUxyaw"/>
115 115
      </menus>
116 116
      <toolbar xmi:id="_fbAfML2kEeeyWfw0n8-ICQ" elementId="eu.etaxonomy.taxeditor.navigation.toolbar.1">
117
        <children xsi:type="menu:HandledToolItem" xmi:id="_KoxjML2gEeeyWfw0n8-ICQ" elementId="eu.etaxonomy.taxeditor.navigation.handledtoolitem.collapse" label="Collapse" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/collapseall.gif" command="_aN3BsL2gEeeyWfw0n8-ICQ"/>
118
        <children xsi:type="menu:HandledToolItem" xmi:id="_IO57EL2bEeeyWfw0n8-ICQ" elementId="eu.etaxonomy.taxeditor.navigation.handledtoolitem.syncwithtaxonselectio" label="Sync with taxon selectio" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.editor/icons/synced.gif" type="Check" command="_6iiY8LVbEeeZf_R8QJbACw"/>
117
        <children xsi:type="menu:HandledToolItem" xmi:id="_KoxjML2gEeeyWfw0n8-ICQ" elementId="eu.etaxonomy.taxeditor.navigation.handledtoolitem.collapse" label="%handledtoolitem.label.1" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/collapseall.gif" command="_aN3BsL2gEeeyWfw0n8-ICQ"/>
118
        <children xsi:type="menu:HandledToolItem" xmi:id="_IO57EL2bEeeyWfw0n8-ICQ" elementId="eu.etaxonomy.taxeditor.navigation.handledtoolitem.syncwithtaxonselectio" label="%handledtoolitem.label.2" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.editor/icons/synced.gif" type="Check" command="_6iiY8LVbEeeZf_R8QJbACw"/>
119 119
      </toolbar>
120 120
    </elements>
121 121
    <elements xsi:type="basic:PartDescriptor" xmi:id="_AcycAKOkEee6lJH578buGg" elementId="eu.etaxonomy.taxeditor.navigation.search.e4.SearchResultViewE4" label="%view.name" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.navigation/icons/system-search.png" allowMultiple="true" closeable="true" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.search.e4.SearchResultViewE4">
......
159 159
    <elements xsi:type="commands:Command" xmi:id="_Nx06MJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.command.create.taxonNode" commandName="%command.name"/>
160 160
    <elements xsi:type="commands:Command" xmi:id="_Vco-4JIxEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.create.classification" commandName="%command.name.0"/>
161 161
    <elements xsi:type="commands:Command" xmi:id="_jXX0YJIxEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.navigator.handler.OpenFixClassificationHierarchyHandler" commandName="%command.name.10"/>
162
    <elements xsi:type="commands:Command" xmi:id="_nOOxMJIxEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.cloneClassification" commandName="Clone Classification"/>
162
    <elements xsi:type="commands:Command" xmi:id="_nOOxMJIxEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.cloneClassification" commandName="%command.commandname.1"/>
163 163
    <elements xsi:type="commands:Command" xmi:id="_p7Oi8JIxEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonym" commandName="%command.name.5"/>
164 164
    <elements xsi:type="commands:Command" xmi:id="_uFj1YJIxEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigator.command.update.setSecundumForSubtree" commandName="%command.name.setSecForSubtree"/>
165 165
    <elements xsi:type="commands:Command" xmi:id="_Jb45kK5bEeeDTZvTg-vKRg" elementId="eu.etaxonomy.taxeditor.navigator.command.update.setPublishForSubtree" commandName="%command.name.setPublishForSubtree"/>
......
167 167
    <elements xsi:type="commands:Command" xmi:id="_3PRy8JIxEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.moveFactualData" commandName="%command.name.moveFactualData"/>
168 168
    <elements xsi:type="commands:Command" xmi:id="__n644JIxEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.command.delete" commandName="%command.name.11"/>
169 169
    <elements xsi:type="commands:Command" xmi:id="_EJ-u0JIyEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.command.copyTaxonName" commandName="%command.name.4"/>
170
    <elements xsi:type="commands:Command" xmi:id="_ukhM0JIyEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.command.refreshNavigator" commandName="Refresh Navigator"/>
170
    <elements xsi:type="commands:Command" xmi:id="_ukhM0JIyEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.command.refreshNavigator" commandName="%command.commandname.2"/>
171 171
    <elements xsi:type="commands:Command" xmi:id="_lAZG8KQUEeeTrq_CRrR-jg" elementId="eu.etaxonomy.taxeditor.navigation.key.polytomous.newKey" commandName="%command.name.6"/>
172 172
    <elements xsi:type="commands:Command" xmi:id="_BrgnkKQVEeeTrq_CRrR-jg" elementId="eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes" commandName="%command.name.7"/>
173 173
    <elements xsi:type="commands:Command" xmi:id="_4BQ6YKQVEeeTrq_CRrR-jg" elementId="eu.etaxonomy.taxeditor.navigation.key.polytomous.refreshKeyList" commandName="%command.name.8"/>
174 174
    <elements xsi:type="commands:Command" xmi:id="_6S6M4KQVEeeTrq_CRrR-jg" elementId="eu.etaxonomy.taxeditor.navigation.key.polytomous.refreshKeyNodes" commandName="%command.name.9"/>
175 175
    <elements xsi:type="commands:Command" xmi:id="_8C8AEKQVEeeTrq_CRrR-jg" elementId="eu.etaxonomy.taxeditor.navigation.key.polytomous.command.delete" commandName="%command.name.11"/>
176
    <elements xsi:type="commands:Command" xmi:id="_6iiY8LVbEeeZf_R8QJbACw" elementId="eu.etaxonomy.taxeditor.navigation.command.linkWithTaxon" commandName="Link with taxon"/>
176
    <elements xsi:type="commands:Command" xmi:id="_6iiY8LVbEeeZf_R8QJbACw" elementId="eu.etaxonomy.taxeditor.navigation.command.linkWithTaxon" commandName="%command.commandname.3"/>
177 177
    <elements xsi:type="commands:Command" xmi:id="_oghMkM0vEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigator.command.update.setUnplaced" commandName="%command.name.setUnplaced"/>
178 178
    <elements xsi:type="commands:Command" xmi:id="_gMQnoM1AEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigator.command.update.removeUnplaced" commandName="%command.name.removeUnplaced"/>
179 179
    <elements xsi:type="commands:Command" xmi:id="_3laT0M1KEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigator.command.update.setExcluded" commandName="%command.name.setExcluded"/>
180 180
    <elements xsi:type="commands:Command" xmi:id="_mNPRoM1LEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigator.command.update.removeExcluded" commandName="%command.name.removeExcluded"/>
181 181
    <elements xsi:type="commands:Command" xmi:id="_OrLKUL9SEemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonymSetNameInSource" commandName="%command.name.51"/>
182 182
    <elements xsi:type="commands:Command" xmi:id="_7qhucL9SEemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigation.moveFactualDataSetNameInSource" commandName="%command.name.moveFactualDataSetNameInSource"/>
183
    <elements xsi:type="commands:Command" xmi:id="_l5_r8MWVEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.command.setdoubtfulflag" commandName="%command.name.setDoubtful"/>
184
    <elements xsi:type="commands:Command" xmi:id="_pr-IwMWVEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.command.removedoubtfulflag" commandName="%command.name.removeDoubtful"/>
183 185
  </fragments>
184 186
  <fragments xsi:type="fragment:StringModelFragment" xmi:id="_3CbhIK25EeeykrJkROy5EA" featurename="children" parentElementId="eu.etaxonomy.navigation.menu.new" positionInList="after:eu.etaxonomy.taxeditor.editor.menuseparator.22">
185 187
    <elements xsi:type="menu:HandledMenuItem" xmi:id="_M9FakK26EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.commandlabel13" label="%command.label.13" tooltip="%command.label.13" command="_Nx06MJIvEeeJAdt8ZUxyaw">
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemoveDoubtfulHandler.java
1
/**
2
* Copyright (C) 2019 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.navigation.navigator.e4.handler;
10

  
11
import javax.inject.Named;
12

  
13
import org.eclipse.core.commands.operations.AbstractOperation;
14
import org.eclipse.e4.core.di.annotations.CanExecute;
15
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
16
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
17
import org.eclipse.e4.ui.services.IServiceConstants;
18
import org.eclipse.jface.viewers.IStructuredSelection;
19
import org.eclipse.jface.viewers.TreeSelection;
20
import org.eclipse.swt.widgets.Shell;
21

  
22
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedDoubtfulOperation;
24

  
25
/**
26
 * @author k.luther
27
 * @since 23.08.2019
28
 */
29
public class RemoveDoubtfulHandler extends UnplacedExcludedDoubtfulHandler {
30

  
31
    @Override
32
    public AbstractOperation prepareOperation(IStructuredSelection selection,
33
            Shell shell,
34
            MPart activePart,
35
            MHandledMenuItem menuItem) {
36
        SetUnplacedExcludedDoubtfulOperation operation =
37
                new SetUnplacedExcludedDoubtfulOperation(getTrigger(),
38
                        true,
39
                        taxonNodes,
40
                        null, null, false);
41

  
42
        return operation;
43
    }
44

  
45
    @CanExecute
46
    private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, MHandledMenuItem menuItem){
47
        boolean canExecute = !selection.isEmpty();
48
        Object[] array = selection.toArray();
49
        for (Object object : array) {
50
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && ((TaxonNodeDto)object).isDoubtful() && ((TaxonNodeDto)object).getTaxonUuid() != null;
51
        }
52
        menuItem.setVisible(canExecute);
53
        return canExecute;
54
    }
55
}
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemoveExcludedHandler.java
20 20
import org.eclipse.swt.widgets.Shell;
21 21

  
22 22
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedOperation;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedDoubtfulOperation;
24 24

  
25 25
/**
26 26
 * @author k.luther
27 27
 * @since 11.10.2018
28 28
 *
29 29
 */
30
public class RemoveExcludedHandler extends UnplacedExcludedHandler {
30
public class RemoveExcludedHandler extends UnplacedExcludedDoubtfulHandler {
31 31

  
32 32
    @Override
33 33
    public AbstractOperation prepareOperation(IStructuredSelection selection,
34 34
            Shell shell,
35 35
            MPart activePart,
36 36
            MHandledMenuItem menuItem) {
37
        SetUnplacedExcludedOperation operation =
38
                new SetUnplacedExcludedOperation(getTrigger(),
37
        SetUnplacedExcludedDoubtfulOperation operation =
38
                new SetUnplacedExcludedDoubtfulOperation(getTrigger(),
39 39
                        true,
40 40
                        taxonNodes,
41
                        null, false);
41
                        null, false, null);
42 42

  
43 43
        return operation;
44 44
    }
......
48 48
        boolean canExecute = !selection.isEmpty();
49 49
        Object[] array = selection.toArray();
50 50
        for (Object object : array) {
51
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && ((TaxonNodeDto)object).isExcluded();
51
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && ((TaxonNodeDto)object).isExcluded() && ((TaxonNodeDto)object).getTaxonUuid() != null;
52 52
        }
53 53
        menuItem.setVisible(canExecute);
54 54
        return canExecute;
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemoveUnplacedHandler.java
20 20
import org.eclipse.swt.widgets.Shell;
21 21

  
22 22
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedOperation;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedDoubtfulOperation;
24 24

  
25 25
/**
26 26
 * @author k.luther
27 27
 * @since 11.10.2018
28 28
 *
29 29
 */
30
public class RemoveUnplacedHandler extends UnplacedExcludedHandler {
30
public class RemoveUnplacedHandler extends UnplacedExcludedDoubtfulHandler {
31 31
    @Override
32 32
    public AbstractOperation prepareOperation(IStructuredSelection selection,
33 33
            Shell shell,
34 34
            MPart activePart,
35 35
            MHandledMenuItem menuItem) {
36
        SetUnplacedExcludedOperation operation =
37
                new SetUnplacedExcludedOperation(getTrigger(),
36
        SetUnplacedExcludedDoubtfulOperation operation =
37
                new SetUnplacedExcludedDoubtfulOperation(getTrigger(),
38 38
                        true,
39 39
                        taxonNodes,
40
                        false, null);
40
                        false, null, null);
41 41

  
42 42
        return operation;
43 43
    }
......
47 47
        boolean canExecute = !selection.isEmpty();
48 48
        Object[] array = selection.toArray();
49 49
        for (Object object : array) {
50
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && ((TaxonNodeDto)object).isUnplaced();
50
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && ((TaxonNodeDto)object).isUnplaced() && ((TaxonNodeDto)object).getTaxonUuid() != null;
51 51
        }
52 52
        menuItem.setVisible(canExecute);
53 53
        return canExecute;
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetDoubtfulHandler.java
1
/**
2
* Copyright (C) 2019 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.navigation.navigator.e4.handler;
10

  
11
import javax.inject.Named;
12

  
13
import org.eclipse.core.commands.operations.AbstractOperation;
14
import org.eclipse.e4.core.di.annotations.CanExecute;
15
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
16
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
17
import org.eclipse.e4.ui.services.IServiceConstants;
18
import org.eclipse.jface.viewers.IStructuredSelection;
19
import org.eclipse.jface.viewers.TreeSelection;
20
import org.eclipse.swt.widgets.Shell;
21

  
22
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedDoubtfulOperation;
24

  
25
/**
26
 * @author k.luther
27
 * @since 23.08.2019
28
 */
29
public class SetDoubtfulHandler extends UnplacedExcludedDoubtfulHandler {
30

  
31
    @Override
32
    public AbstractOperation prepareOperation(IStructuredSelection selection,
33
            Shell shell,
34
            MPart activePart,
35
            MHandledMenuItem menuItem) {
36
        SetUnplacedExcludedDoubtfulOperation operation =
37
                new SetUnplacedExcludedDoubtfulOperation(getTrigger(),
38
                        true,
39
                        taxonNodes,
40
                        null, null, true);
41

  
42
        return operation;
43
    }
44

  
45
    @CanExecute
46
    private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, MHandledMenuItem menuItem){
47
        boolean canExecute = !selection.isEmpty();
48
        Object[] array = selection.toArray();
49
        boolean isClassification = false;
50
        for (Object object : array) {
51
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && !((TaxonNodeDto)object).isDoubtful() && ((TaxonNodeDto)object).getTaxonUuid() != null;
52
            isClassification = isClassification || ((TaxonNodeDto)object).getTaxonUuid() == null;
53
        }
54

  
55
        menuItem.setVisible(canExecute || isClassification);
56
        return canExecute;
57
    }
58

  
59

  
60
}
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetExcludedHandler.java
20 20
import org.eclipse.swt.widgets.Shell;
21 21

  
22 22
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedOperation;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedDoubtfulOperation;
24 24

  
25 25
/**
26 26
 * @author k.luther
27 27
 * @since 11.10.2018
28 28
 *
29 29
 */
30
public class SetExcludedHandler extends UnplacedExcludedHandler {
30
public class SetExcludedHandler extends UnplacedExcludedDoubtfulHandler {
31 31

  
32 32
    @Override
33 33
    public AbstractOperation prepareOperation(IStructuredSelection selection,
34 34
            Shell shell,
35 35
            MPart activePart,
36 36
            MHandledMenuItem menuItem) {
37
        SetUnplacedExcludedOperation operation =
38
                new SetUnplacedExcludedOperation(getTrigger(),
37
        SetUnplacedExcludedDoubtfulOperation operation =
38
                new SetUnplacedExcludedDoubtfulOperation(getTrigger(),
39 39
                        true,
40 40
                        taxonNodes,
41
                        null, true);
41
                        null, true, null);
42 42

  
43 43
        return operation;
44 44
    }
......
47 47
    private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, MHandledMenuItem menuItem){
48 48
        boolean canExecute = !selection.isEmpty();
49 49
        Object[] array = selection.toArray();
50
        boolean isClassification = false;
50 51
        for (Object object : array) {
51
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && !((TaxonNodeDto)object).isExcluded();
52
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && !((TaxonNodeDto)object).isExcluded() && ((TaxonNodeDto)object).getTaxonUuid() != null;
53
            isClassification = isClassification || ((TaxonNodeDto)object).getTaxonUuid() == null;
52 54
        }
53
        menuItem.setVisible(canExecute);
55
        menuItem.setVisible(canExecute || isClassification);
54 56
        return canExecute;
55 57
    }
56 58

  
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetUnplacedHandler.java
20 20
import org.eclipse.swt.widgets.Shell;
21 21

  
22 22
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedOperation;
23
import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetUnplacedExcludedDoubtfulOperation;
24 24

  
25 25
/**
26 26
 * @author k.luther
27 27
 * @since 11.10.2018
28 28
 *
29 29
 */
30
public class SetUnplacedHandler extends UnplacedExcludedHandler {
30
public class SetUnplacedHandler extends UnplacedExcludedDoubtfulHandler {
31 31
    @Override
32 32
    public AbstractOperation prepareOperation(IStructuredSelection selection,
33 33
            Shell shell,
34 34
            MPart activePart,
35 35
            MHandledMenuItem menuItem) {
36
        SetUnplacedExcludedOperation operation =
37
                new SetUnplacedExcludedOperation(getTrigger(),
36
        SetUnplacedExcludedDoubtfulOperation operation =
37
                new SetUnplacedExcludedDoubtfulOperation(getTrigger(),
38 38
                        true,
39 39
                        taxonNodes,
40
                        true, null);
40
                        true, null, null);
41 41

  
42 42
        return operation;
43 43
    }
......
46 46
    private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, MHandledMenuItem menuItem){
47 47
        boolean canExecute = !selection.isEmpty();
48 48
        Object[] array = selection.toArray();
49
        boolean isClassification = false;
49 50
        for (Object object : array) {
50
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && !((TaxonNodeDto)object).isUnplaced();
51
            canExecute &= (object instanceof TaxonNodeDto) && (((TaxonNodeDto)object).getUuid() != null) && !((TaxonNodeDto)object).isUnplaced() && ((TaxonNodeDto)object).getTaxonUuid() != null;
52
            isClassification = isClassification || ((TaxonNodeDto)object).getTaxonUuid() == null;
51 53
        }
52
        menuItem.setVisible(canExecute);
54
        menuItem.setVisible(canExecute || isClassification);
53 55
        return canExecute;
54 56
    }
55 57

  
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/UnplacedExcludedDoubtfulHandler.java
1
/**
2
* Copyright (C) 2018 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.navigation.navigator.e4.handler;
10

  
11
import java.util.ArrayList;
12
import java.util.Iterator;
13
import java.util.List;
14
import java.util.UUID;
15

  
16
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.core.runtime.Status;
18
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
19
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
20
import org.eclipse.jface.viewers.IStructuredSelection;
21
import org.eclipse.swt.widgets.Shell;
22

  
23
import eu.etaxonomy.cdm.model.taxon.Classification;
24
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
25
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
26
import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
27

  
28
/**
29
 * @author k.luther
30
 * @since 11.10.2018
31
 *
32
 */
33
public abstract class UnplacedExcludedDoubtfulHandler extends RemotingCdmHandlerE4{
34
    protected List<UUID> taxonNodes ;
35

  
36
    public UnplacedExcludedDoubtfulHandler() {
37
        super(TaxonNavigatorLabels.SET_UNPLACED);
38
    }
39

  
40
    @Override
41
    public IStatus allowOperations(IStructuredSelection selection,
42
            Shell shell,
43
            MPart activePart,
44
            MHandledMenuItem menuItem) {
45

  
46

  
47
        // check for no taxon tree node selected
48
        if(selection.size() == 0) {
49
            return new Status(IStatus.ERROR,
50
                    "unknown", //$NON-NLS-1$
51
                    TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
52
        }
53
        taxonNodes = new ArrayList<>();
54
        // check that selected object is a taxon node
55
        Iterator<TaxonNodeDto> iterator = selection.iterator();
56
        while(iterator.hasNext()){
57
            Object obj = iterator.next();
58
            if(obj instanceof TaxonNodeDto) {
59
                if(obj instanceof Classification){
60
                    taxonNodes.add(((Classification)obj).getRootNode().getUuid());
61
                }else{
62
                    taxonNodes.add(((TaxonNodeDto)obj).getUuid());
63
                }
64
            } else{
65
                return new Status(IStatus.ERROR,
66
                        "unknown", //$NON-NLS-1$
67
                        TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
68
            }
69
        }
70

  
71
        return Status.OK_STATUS;
72
    }
73

  
74

  
75

  
76
    @Override
77
    public void onComplete() {
78
    }
79

  
80
    /**
81
     * {@inheritDoc}
82
     */
83
    @Override
84
    protected Object getTrigger() {
85
        return this;
86
    }
87
}
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/UnplacedExcludedHandler.java
1
/**
2
* Copyright (C) 2018 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.navigation.navigator.e4.handler;
10

  
11
import java.util.ArrayList;
12
import java.util.Iterator;
13
import java.util.List;
14
import java.util.UUID;
15

  
16
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.core.runtime.Status;
18
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
19
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
20
import org.eclipse.jface.viewers.IStructuredSelection;
21
import org.eclipse.swt.widgets.Shell;
22

  
23
import eu.etaxonomy.cdm.model.taxon.Classification;
24
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
25
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
26
import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
27

  
28
/**
29
 * @author k.luther
30
 * @since 11.10.2018
31
 *
32
 */
33
public abstract class UnplacedExcludedHandler extends RemotingCdmHandlerE4{
34
    protected List<UUID> taxonNodes ;
35

  
36
    public UnplacedExcludedHandler() {
37
        super(TaxonNavigatorLabels.SET_UNPLACED);
38
    }
39

  
40
    @Override
41
    public IStatus allowOperations(IStructuredSelection selection,
42
            Shell shell,
43
            MPart activePart,
44
            MHandledMenuItem menuItem) {
45

  
46

  
47
        // check for no taxon tree node selected
48
        if(selection.size() == 0) {
49
            return new Status(IStatus.ERROR,
50
                    "unknown", //$NON-NLS-1$
51
                    TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
52
        }
53
        taxonNodes = new ArrayList<>();
54
        // check that selected object is a taxon node
55
        Iterator<TaxonNodeDto> iterator = selection.iterator();
56
        while(iterator.hasNext()){
57
            Object obj = iterator.next();
58
            if(obj instanceof TaxonNodeDto) {
59
                if(obj instanceof Classification){
60
                    taxonNodes.add(((Classification)obj).getRootNode().getUuid());
61
                }else{
62
                    taxonNodes.add(((TaxonNodeDto)obj).getUuid());
63
                }
64
            } else{
65
                return new Status(IStatus.ERROR,
66
                        "unknown", //$NON-NLS-1$
67
                        TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
68
            }
69
        }
70

  
71
        return Status.OK_STATUS;
72
    }
73

  
74

  
75

  
76
    @Override
77
    public void onComplete() {
78
    }
79

  
80
    /**
81
     * {@inheritDoc}
82
     */
83
    @Override
84
    protected Object getTrigger() {
85
        return this;
86
    }
87
}
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/SetUnplacedExcludedDoubtfulOperation.java
1
/**
2
* Copyright (C) 2018 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.navigation.navigator.operation;
10

  
11
import java.util.List;
12
import java.util.UUID;
13

  
14
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IProgressMonitor;
16

  
17
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
18
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
19
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
20
import eu.etaxonomy.cdm.api.service.UpdateResult;
21
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
22
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
23
import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
24
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
25

  
26
/**
27
 * @author k.luther
28
 * @since 11.10.2018
29
 *
30
 */
31
public class SetUnplacedExcludedDoubtfulOperation extends RemotingCdmUpdateOperation {
32
    private final static String LABEL = Messages.TaxonNavigatorLabels_SET_UNPLACED;
33
    private List<UUID> sourceTaxonNodeUuids;
34
    private Boolean unplaced = null;
35
    private Boolean excluded = null;
36
    private Boolean doubtful = null;
37
    /**
38
     * @param source
39
     * @param async
40
     */
41
    public SetUnplacedExcludedDoubtfulOperation(Object source,
42
            boolean async,
43
            List<UUID> sourceTaxonNodeUuids,
44
            Boolean unplaced, Boolean excluded, Boolean doubtful) {
45
        super(LABEL, Action.Update, source, async);
46
        this.sourceTaxonNodeUuids = sourceTaxonNodeUuids;
47
        if (unplaced != null){
48
            this.unplaced = unplaced;
49
        }
50
        if (excluded != null){
51
            this.excluded = excluded;
52
        }
53
        if (doubtful != null){
54
            this.doubtful = doubtful;
55
        }
56
    }
57

  
58
    /**
59
     * {@inheritDoc}
60
     */
61
    @Override
62
    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
63

  
64
        List<TaxonNode> nodes = CdmApplicationState.getService(ITaxonNodeService.class).load(sourceTaxonNodeUuids, null);
65

  
66
        for (TaxonNode node: nodes){
67
            if (unplaced != null){
68
                node.setUnplaced(unplaced);
69
            }
70
            if (excluded != null){
71
                node.setExcluded(excluded);
72
            }
73
            if (doubtful != null){
74
                node.setDoubtful(doubtful);
75
            }
76
        }
77
        List<MergeResult<TaxonNode>> results = CdmApplicationState.getService(ITaxonNodeService.class).merge(nodes, true);
78
        UpdateResult updateResult = new UpdateResult();
79
        for (MergeResult<TaxonNode>result: results){
80
            updateResult.addUpdatedObject(result.getMergedEntity());
81
        }
82
        return updateResult;
83
    }
84

  
85
}
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/SetUnplacedExcludedOperation.java
1
/**
2
* Copyright (C) 2018 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.navigation.navigator.operation;
10

  
11
import java.util.List;
12
import java.util.UUID;
13

  
14
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IProgressMonitor;
16

  
17
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
18
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
19
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
20
import eu.etaxonomy.cdm.api.service.UpdateResult;
21
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
22
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
23
import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
24
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
25

  
26
/**
27
 * @author k.luther
28
 * @since 11.10.2018
29
 *
30
 */
31
public class SetUnplacedExcludedOperation extends RemotingCdmUpdateOperation {
32
    private final static String LABEL = Messages.TaxonNavigatorLabels_SET_UNPLACED;
33
    private List<UUID> sourceTaxonNodeUuids;
34
    private Boolean unplaced = null;
35
    private Boolean excluded = null;
36
    /**
37
     * @param source
38
     * @param async
39
     */
40
    public SetUnplacedExcludedOperation(Object source,
41
            boolean async,
42
            List<UUID> sourceTaxonNodeUuids,
43
            Boolean unplaced, Boolean excluded) {
44
        super(LABEL, Action.Update, source, async);
45
        this.sourceTaxonNodeUuids = sourceTaxonNodeUuids;
46
        if (unplaced != null){
47
            this.unplaced = unplaced;
48
        }
49
        if (excluded != null){
50
            this.excluded = excluded;
51
        }
52
    }
53

  
54
    /**
55
     * {@inheritDoc}
56
     */
57
    @Override
58
    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
59

  
60
        List<TaxonNode> nodes = CdmApplicationState.getService(ITaxonNodeService.class).load(sourceTaxonNodeUuids, null);
61

  
62
        for (TaxonNode node: nodes){
63
            if (unplaced != null){
64
                node.setUnplaced(unplaced);
65
            }
66
            if (excluded != null){
67
                node.setExcluded(excluded);
68
            }
69
        }
70
        List<MergeResult<TaxonNode>> results = CdmApplicationState.getService(ITaxonNodeService.class).merge(nodes, true);
71
        UpdateResult updateResult = new UpdateResult();
72
        for (MergeResult<TaxonNode>result: results){
73
            updateResult.addUpdatedObject(result.getMergedEntity());
74
        }
75
        return updateResult;
76
    }
77

  
78
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)