Project

General

Profile

« Previous | Next » 

Revision 6c7364f9

Added by Patrick Plitzner over 6 years ago

ref #6909 Change labe of "Link with editor" item

View differences:

eu.etaxonomy.taxeditor.navigation/fragment.e4xmi
83 83
        <children xsi:type="menu:HandledMenuItem" xmi:id="_1JIbQJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.copy" label="%command.label.12" command="_EJ-u0JIyEeeJAdt8ZUxyaw"/>
84 84
        <children xsi:type="menu:MenuSeparator" xmi:id="_z0Q6EJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.menuseparator.4"/>
85 85
        <children xsi:type="menu:HandledMenuItem" xmi:id="_0FX4MJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.refresh" label="%command.label.11" command="_ukhM0JIyEeeJAdt8ZUxyaw"/>
86
        <children xsi:type="menu:HandledMenuItem" xmi:id="_7MpwILVfEeeZf_R8QJbACw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.syncwithtaxon" label="Sync with taxon" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.editor/icons/synced.gif" command="_6iiY8LVbEeeZf_R8QJbACw"/>
86
        <children xsi:type="menu:HandledMenuItem" xmi:id="_7MpwILVfEeeZf_R8QJbACw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.syncwithtaxon" label="Toggle sync with taxon" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.editor/icons/synced.gif" command="_6iiY8LVbEeeZf_R8QJbACw"/>
87 87
      </menus>
88 88
    </elements>
89 89
    <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">
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/LinkWithTaxonHandlerE4.java
12 12

  
13 13
import org.eclipse.e4.core.di.annotations.Execute;
14 14
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
15
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
16 15
import org.eclipse.e4.ui.services.IServiceConstants;
17 16

  
18 17
import eu.etaxonomy.taxeditor.navigation.navigator.e4.TaxonNavigatorE4;
......
26 25
public class LinkWithTaxonHandlerE4 {
27 26

  
28 27
    @Execute
29
    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart, MHandledMenuItem menuItem) {
28
    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart) {
30 29
        TaxonNavigatorE4 taxonNavigator = (TaxonNavigatorE4) activePart.getObject();
31 30
        taxonNavigator.setLinkWithTaxon(!taxonNavigator.isLinkWithTaxon());
32
        if(taxonNavigator.isLinkWithTaxon()){
33
            menuItem.setLabel("Do not sync with taxon");
34
        }
35
        else {
36
            menuItem.setLabel("Sync with taxon");
37
        }
38 31
	}
39 32
}

Also available in: Unified diff