Project

General

Profile

Revision 5d8c225b

ID5d8c225bc3f4d0deba4d669cd213393ea5a890c7
Parent bb5d8aed
Child 2bc033c4, f8019c2d

Added by Patrick Plitzner almost 2 years ago

ref #6475 Make specimen tree editor collapsable and expandable

View differences:

eu.etaxonomy.taxeditor.editor/fragment.e4xmi
55 55
        <children xsi:type="menu:HandledMenuItem" xmi:id="_XWW6QDulEeeOtqC_3qh40A" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel52" label="%command.label.52" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/delete.gif" command="_YPp1wDvREeeOtqC_3qh40A"/>
56 56
        <children xsi:type="menu:HandledMenuItem" xmi:id="_wg0-oDulEeeOtqC_3qh40A" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel54" label="%command.label.54" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.editor/icons/deep-delete-16x16-32.png" command="_fKT-wDulEeeOtqC_3qh40A"/>
57 57
      </menus>
58
      <toolbar xmi:id="_jJiDMKVCEeiOhbiMMblbew" elementId="eu.etaxonomy.taxeditor.editor.toolbar.3">
59
        <children xsi:type="menu:HandledToolItem" xmi:id="_lfX5MKVCEeiOhbiMMblbew" elementId="eu.etaxonomy.taxeditor.editor.specimen.handledtoolitem.collapse" label="%handledtoolitem.label.1" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/collapseall.gif" command="_0WYQcL2lEeeyWfw0n8-ICQ"/>
60
        <children xsi:type="menu:HandledToolItem" xmi:id="_oV6ogKVCEeiOhbiMMblbew" elementId="eu.etaxonomy.taxeditor.editor.specimen.handledtoolitem.expand" label="%handledtoolitem.label.2" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.store/icons/expandAll.jpg" command="_vDKPoL4vEeewU62zpvPllA"/>
61
      </toolbar>
58 62
    </elements>
59 63
    <elements xsi:type="basic:PartDescriptor" xmi:id="_R7vxEECaEeeL5JDzMOYK6g" elementId="eu.etaxonomy.taxeditor.editor.descriptiveDataSet.CharacterEditor" label="%partdescriptor.label.1" closeable="true" dirtyable="true" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.descriptiveDataSet.character.CharacterEditor">
60 64
      <tags>nonRestore</tags>
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
29 29
import org.eclipse.e4.ui.workbench.modeling.EPartService;
30 30
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
31 31
import org.eclipse.jface.util.LocalSelectionTransfer;
32
import org.eclipse.jface.viewers.AbstractTreeViewer;
33 32
import org.eclipse.jface.viewers.ISelectionChangedListener;
34 33
import org.eclipse.jface.viewers.IStructuredSelection;
35 34
import org.eclipse.jface.viewers.StructuredSelection;
......
73 72
import eu.etaxonomy.taxeditor.store.CdmStore;
74 73
import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateContentProvider;
75 74
import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
75
import eu.etaxonomy.taxeditor.workbench.part.ICollapsableExpandable;
76 76
import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
77 77

  
78 78
/**
......
81 81
 */
82 82
public class DerivateView implements IPartContentHasFactualData, IConversationEnabled,
83 83
        ICdmEntitySessionEnabled, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
84
        IContextListener, IE4SavablePart {
84
        IContextListener, IE4SavablePart, ICollapsableExpandable {
85 85

  
86 86
    private static final String SPECIMEN_EDITOR = Messages.DerivateView_SPECIMEN_EDITOR;
87 87

  
......
218 218
        labelProvider = new DerivateLabelProvider();
219 219
        labelProvider.setConversation(conversation);
220 220
        viewer.setLabelProvider(labelProvider);
221
        viewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
222 221
        viewer.getTree().setEnabled(CdmStore.isActive());
223 222

  
224 223
        //propagate selection
......
633 632
        return dirty.isDirty();
634 633
    }
635 634

  
635
    @Override
636
    public void collapse() {
637
        viewer.collapseAll();
638
    }
639

  
640
    @Override
641
    public void expand() {
642
        viewer.expandAll();
643
    }
644

  
636 645
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)