Interface IEditorExtension

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart
All Known Implementing Classes:
PlotImageEditor

public interface IEditorExtension extends org.eclipse.ui.IEditorPart
This class should be used to define additional editors which may be added to multi-editor parts for the Image and HDF5 editors. The part will be added at the start of the editor stack. To support other locations, a method getPreferredEditorIndex() could be implemented here.
  • Field Summary

    Fields inherited from interface org.eclipse.ui.IEditorPart

    PROP_DIRTY, PROP_INPUT

    Fields inherited from interface org.eclipse.ui.IWorkbenchPart

    PROP_TITLE
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isApplicable(String filePath, String extension, String perspectiveId)
    Ensure that this method returns false as quickly as possible without parsing the data.

    Methods inherited from interface org.eclipse.core.runtime.IAdaptable

    getAdapter

    Methods inherited from interface org.eclipse.ui.IEditorPart

    getEditorInput, getEditorSite, init

    Methods inherited from interface org.eclipse.ui.ISaveablePart

    doSave, doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded

    Methods inherited from interface org.eclipse.ui.IWorkbenchPart

    addPropertyListener, createPartControl, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus
  • Method Details

    • isApplicable

      boolean isApplicable(String filePath, String extension, String perspectiveId)
      Ensure that this method returns false as quickly as possible without parsing the data. If returning true (for instance checking a nexus file)
      Parameters:
      filePath -
      extension - - from the filePath, can be used to check quickly if you support the extension. For instance: if (!".nxs".equalsIgnoreCase(extension)) return false; This hard coded approach is simple and understandable from the code, therefore preferred.
      perspectiveId - - the current perspective id, or the last one that this part was used with if the editor is opening during startup. This string MAY be null. NOTE when using IEditorExtension your editor part must have a title. For instance:
      Returns:
      true if part should be shown.