Project

General

Profile

« Previous | Next » 

Revision 862eb9dc

Added by Patrick Plitzner over 6 years ago

ref #6909 Directly update tree when linking with taxon

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/TaxonNavigatorE4.java
240 240
	//Link with taxon selection
241 241
	@Inject
242 242
	@Optional
243
	private void updateCurrentTaxon(@UIEventTopic(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR)ITaxonEditor editor){
243
	public void updateCurrentTaxon(@UIEventTopic(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR)ITaxonEditor editor){
244 244
	    if(linkWithTaxon && editor!=null){
245 245
	        viewer.refresh();
246 246
	        TaxonNode taxonNode = null;
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/LinkWithTaxonHandlerE4.java
16 16
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
17 17
import org.eclipse.e4.ui.services.IServiceConstants;
18 18

  
19
import eu.etaxonomy.taxeditor.event.EventUtility;
19 20
import eu.etaxonomy.taxeditor.navigation.navigator.e4.TaxonNavigatorE4;
20 21

  
21 22
/**
......
30 31
    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart) {
31 32
        TaxonNavigatorE4 taxonNavigator = (TaxonNavigatorE4) activePart.getObject();
32 33
        taxonNavigator.setLinkWithTaxon(!taxonNavigator.isLinkWithTaxon());
34
        if(taxonNavigator.isLinkWithTaxon()){
35
            taxonNavigator.updateCurrentTaxon(EventUtility.getTaxonEditor());
36
        }
33 37
	}
34 38

  
35 39
    @CanExecute

Also available in: Unified diff