Project

General

Profile

« Previous | Next » 

Revision e6f456aa

Added by Patrick Plitzner almost 6 years ago

Fix state handling of save button/dirty flag for indirect edits(details)

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/event/EventUtility.java
8 8
*/
9 9
package eu.etaxonomy.taxeditor.event;
10 10

  
11
import java.util.Collection;
12

  
13 11
import javax.annotation.PostConstruct;
14 12
import javax.inject.Inject;
15 13
import javax.inject.Named;
......
20 18
import org.eclipse.e4.ui.di.UIEventTopic;
21 19
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
22 20
import org.eclipse.e4.ui.services.IServiceConstants;
23
import org.eclipse.e4.ui.workbench.modeling.EPartService;
24 21
import org.eclipse.swt.widgets.Shell;
25 22

  
26 23
import eu.etaxonomy.cdm.model.taxon.Taxon;
27 24
import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
28
import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
29 25

  
30 26
/**
31 27
 * @author pplitzner
......
98 94
        return shell;
99 95
    }
100 96

  
101
    public static MPart getActiveEditorPart(EPartService partService){
102
        Collection<MPart> parts = partService.getParts();
103
        for (MPart part : parts) {
104
            if(part.getObject()!=null && part.getObject() instanceof IE4SavablePart
105
                    && part.isVisible()){
106
                return part;
107
            }
108
        }
109
        return null;
110
    }
111

  
112 97
//    private EventHandler testHandler;
113 98
//
114 99
//    @Inject

Also available in: Unified diff