Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui
Interface IEditorPart

All Superinterfaces:
IAdaptable, ISaveablePart, IWorkbenchPart
All Known Subinterfaces:
IFormPage, IInPlaceEditor, IReusableEditor, ITextEditor
All Known Implementing Classes:
AbstractDecoratedTextEditor, AbstractMultiEditor, AbstractTextEditor, CommonSourceNotFoundEditor, EditorPart, FormEditor, FormPage, MultiEditor, MultiPageEditor, MultiPageEditorPart, SharedHeaderFormEditor, StatusTextEditor, TextEditor

public interface IEditorPart
extends IWorkbenchPart, ISaveablePart

An editor is a visual component within a workbench page. It is typically used to edit or browse a document or input object. The input is identified using an IEditorInput. Modifications made in an editor part follow an open-save-close lifecycle model (in contrast to a view part, where modifications are saved to the workbench immediately).

An editor is document or input-centric. Each editor has an input, and only one editor can exist for each editor input within a page. This policy has been designed to simplify part management.

An editor should be used in place of a view whenever more than one instance of a document type can exist.

This interface may be implemented directly. For convenience, a base implementation is defined in EditorPart.

An editor part is added to the workbench in two stages:

  1. An editor extension is contributed to the workbench registry. This extension defines the extension id, extension class, and the file extensions which are supported by the editor.
  2. An editor part based upon the extension is created and added to the workbench when the user opens a file with one of the supported file extensions (or some other suitable form of editor input).

All editor parts implement the IAdaptable interface; extensions are managed by the platform's adapter manager.

See Also:
IWorkbenchPage.openEditor(IEditorInput, String), EditorPart

Field Summary
static int PROP_DIRTY
          The property id for isDirty.
static int PROP_INPUT
          The property id for getEditorInput.
 
Fields inherited from interface org.eclipse.ui. IWorkbenchPart
PROP_TITLE
 
Method Summary
  IEditorInput getEditorInput ()
          Returns the input for this editor.
  IEditorSite getEditorSite ()
          Returns the site for this editor.
 void init ( IEditorSite site, IEditorInput input)
          Initializes this editor with the given editor site and input.
 
Methods inherited from interface org.eclipse.ui. IWorkbenchPart
addPropertyListener, createPartControl, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus
 
Methods inherited from interface org.eclipse.core.runtime. IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.ui. ISaveablePart
doSave, doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded
 

Field Detail

PROP_DIRTY

static final int PROP_DIRTY
The property id for isDirty.

See Also:
Constant Field Values

PROP_INPUT

static final int PROP_INPUT
The property id for getEditorInput.

See Also:
Constant Field Values
Method Detail

getEditorInput

IEditorInput getEditorInput()
Returns the input for this editor. If this value changes the part must fire a property listener event with PROP_INPUT.

Returns:
the editor input

getEditorSite

IEditorSite getEditorSite()
Returns the site for this editor. This method is equivalent to (IEditorSite) getSite().

The site can be null while the editor is being initialized. After the initialization is complete, this value must be non-null for the remainder of the editor's life cycle.

Returns:
the editor site; this value may be null if the editor has not yet been initialized

init

void init(
IEditorSite site,
          
IEditorInput input)
          throws 
PartInitException
Initializes this editor with the given editor site and input.

This method is automatically called shortly after the part is instantiated. It marks the start of the part's lifecycle. The IWorkbenchPart.dispose method will be called automically at the end of the lifecycle. Clients must not call this method.

Implementors of this method must examine the editor input object type to determine if it is understood. If not, the implementor must throw a PartInitException

Parameters:
site - the editor site
input - the editor input
Throws:
PartInitException - if this editor was not initialized successfully

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire