views:

69

answers:

1

Is there a way to get multiEditor rather than just getting IEditor?

IEditorPart editor= getSite().getPage().getActiveEditor()

to

MultiPageEditorPart editor=??
+1  A: 

Check if the type of the IEditorPart is what you wanted, then cast it to MultiPageEditorPart.

For example:

IEditorPart editor= getSite().getPage().getActiveEditor();

if (editor.getClass().isAssignableFrom(MultiPageEditorPart.class)) {
    MultiPageEditorPart  multiPageEditor = (MultiPageEditorPart) editor;

    ...
}
Rich Seller