4 package eu
.etaxonomy
.taxeditor
.view
;
6 import org
.eclipse
.swt
.widgets
.Composite
;
7 import org
.eclipse
.ui
.IEditorPart
;
9 import eu
.etaxonomy
.taxeditor
.model
.IDirtyMarkableSelectionProvider
;
10 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
14 * Abstract AbstractCdmEditorViewPart class.
18 * @created Sep 21, 2010
21 public abstract class AbstractCdmEditorViewPart
extends AbstractCdmViewPart
{
27 * eu.etaxonomy.taxeditor.model.AbstractCdmViewPart#createPartControl(org
28 * .eclipse.swt.widgets.Composite)
32 public void createPartControl(Composite parent
) {
34 super.createPartControl(parent
);
36 // show viewer if there is an open editor
37 // if(getEditor() != null){
38 // showViewer(getEditor(), new StructuredSelection(getInitialInput()));
47 * @return the currently active editor
49 public IEditorPart
getEditor() {
50 return StoreUtil
.getActiveEditor();
55 public void changed(Object object
) {
56 if (part
instanceof AbstractCdmViewPart
) {
57 ((AbstractCdmViewPart
) part
).changed(object
);
59 IEditorPart editor
= getEditor();
61 && editor
instanceof IDirtyMarkableSelectionProvider
) {
63 ((IDirtyMarkableSelectionProvider
) editor
).changed(object
);