Project

General

Profile

« Previous | Next » 

Revision b0d3dc1a

Added by Patrick Plitzner over 5 years ago

ref #7871 Open descriptive data set editor as singleton

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
64 64
    private static final String NAME_EDITOR_ID = "eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditorE4";
65 65

  
66 66
    public static void openDescriptiveDataSetEditor(UUID descriptiveDataSetUuid, EModelService modelService, EPartService partService, MApplication application){
67
        Collection<MPart> parts = partService.getParts();
68
        for (MPart part : parts) {
69
            if(part.getObject() instanceof DescriptiveDataSetEditor
70
                && ((DescriptiveDataSetEditor) part.getObject()).getDescriptiveDataSet().getUuid().equals(descriptiveDataSetUuid)){
71
                partService.showPart(part, PartState.ACTIVATE);
72
                return;
73
            }
74
        }
67 75
        String partId = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DESCRIPTIVEDATASET_DESCRIPTIVEDATASETEDITOR;
68 76
        MPart part = showPart(partId, modelService, partService, application);
69 77
        DescriptiveDataSetEditor editor = (DescriptiveDataSetEditor) part.getObject();

Also available in: Unified diff