Opens an editor on the given input.
If this page already has an editor open on the target input that editor is activated; otherwise, a new editor is opened. Two editor inputs, input1 and input2, are considered the same if
input1.equals(input2) == true
.
The editor type is determined by mapping editorId
to an editor extension registered with the workbench. An editor id is passed rather than an editor object to prevent the accidental creation of more than one editor for the same input. It also guarantees a consistent lifecycle for editors, regardless of whether they are created by the user or restored from saved data.
@param input the editor input
@param editorId the id of the editor extension to use
@return an open and active editor, or
null
if an externaleditor was opened
@exception PartInitException if the editor could not be created or initialized