Project

General

Profile

Revision 0acc65d5

ID0acc65d53a3af6e0bff4b059cae195586f142bad
Parent a1b92e88
Child 7106e8d1

Added by Patrick Plitzner over 1 year ago

ref #7439 Update marker change in supplemental view

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/handler/SetMarkerFlagHandlerE4.java
22 22
import org.eclipse.e4.ui.services.IServiceConstants;
23 23
import org.eclipse.jface.viewers.IStructuredSelection;
24 24

  
25
import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
25
import eu.etaxonomy.cdm.model.common.CdmBase;
26 26
import eu.etaxonomy.cdm.model.common.MarkerType;
27 27
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
28 28
import eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditorE4;
29 29
import eu.etaxonomy.taxeditor.bulkeditor.e4.command.DynamicMarkerTypeEditingMenuE4;
30 30
import eu.etaxonomy.taxeditor.bulkeditor.operation.SetMarkerFlagOperation;
31
import eu.etaxonomy.taxeditor.event.EventUtility;
32
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
31 33
import eu.etaxonomy.taxeditor.model.AbstractUtility;
32 34
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
33 35

  
......
50 52
        IStructuredSelection selection = editor.getSelection();
51 53
        AbstractPostOperation operation = new SetMarkerFlagOperation("Set Marker", BulkEditorUtil.getUndoContext(), new HashSet<>(selection.toList()), markerType, markerState, editor);
52 54
        AbstractUtility.executeOperation(operation, sync);
55
        Object[] array = selection.toArray();
56
        for (Object object : array) {
57
            editor.getEditorInput().addSaveCandidate((CdmBase) object);
58
        }
59
        editor.setDirty();
60
        editor.refresh();
61
        EventUtility.postEvent(WorkbenchEventConstants.REFRESH_SUPPLEMENTAL, true);
53 62
    }
54 63

  
55 64

  
......
62 71
        Iterator iterator = selection.iterator();
63 72
        for(selection.iterator();iterator.hasNext();){
64 73
            Object object = iterator.next();
65
            if(!(object instanceof IAnnotatableEntity)){
74
            if(!(object instanceof CdmBase)){
66 75
                canExecute = false;
67 76
                break;
68 77
            }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/supplementaldata/SupplementalDataPartE4.java
159 159
    @Optional
160 160
    private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_SUPPLEMENTAL)boolean refresh){
161 161
        if(refresh){
162

  
163 162
            viewer.refresh();
164 163
        }
165 164
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)