Project

General

Profile

« Previous | Next » 

Revision bc330e88

Added by Patrick Plitzner over 6 years ago

ref #6925 Refactor NavigationUtil.isDirty()

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/MoveTaxonHandlerE4.java
23 23
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
24 24
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
25 25
import org.eclipse.e4.ui.services.IServiceConstants;
26
import org.eclipse.e4.ui.workbench.modeling.EPartService;
26 27
import org.eclipse.jface.dialogs.MessageDialog;
27 28
import org.eclipse.jface.viewers.TreeSelection;
28 29
import org.eclipse.swt.widgets.Shell;
......
55 56
    @Execute
56 57
    public void execute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection,
57 58
            @Named(IServiceConstants.ACTIVE_SHELL)Shell shell,
58
            @Named(IServiceConstants.ACTIVE_PART)MPart activePart) {
59
            @Named(IServiceConstants.ACTIVE_PART)MPart activePart, EPartService partService) {
59 60

  
60 61
        TaxonNavigatorE4 taxonNavigator = (TaxonNavigatorE4) activePart.getObject();
61 62

  
......
89 90
				parentTaxonNode = TaxonNodeSelectionDialog.select(shell, taxonNavigator.getConversationHolder(), Messages.MoveTaxonHandler_CHOOSE_PARENT, excludeTaxa, null, classification);
90 91
			}
91 92
			if(parentTaxonNode != null){
92
				if(NavigationUtil.isDirty(parentTaxonNode)){
93
				if(NavigationUtil.isDirty(parentTaxonNode, partService)){
93 94
					MessageDialog.openWarning(shell, Messages.MoveTaxonHandler_UNSAVED_PARENT, Messages.MoveTaxonHandler_UNSAVED_PARENT_MESSAGE);
94 95
					return;
95 96
				}

Also available in: Unified diff