IDE.openEditor
메서드는 해당 IWorkbenchPage
메서드를 호출하여 편집기를 엽니 다.
귀하의 경우에 유용 할 수있는 방법은 당신이 결정하려고 할 때이 계정으로 편집기 ID를 소요 호출 등 MATCH_ID | MATCH_INPUT
그것을 전달해야 org.eclipse.ui.IWorkbenchPage.openEditor(IEditorInput, String, boolean, int)
/**
* Opens an editor on the given input.
* <p>
* If this page already has an editor open that matches the given input
* and/or editor id (as specified by the matchFlags argument), that editor
* is brought to the front; otherwise, a new editor is opened. Two editor
* inputs are considered the same if they equal. See
* <code>Object.equals(Object)<code>
* and <code>IEditorInput</code>. If <code>activate == true</code> the editor
* will be activated.
* </p><p>
* The editor type is determined by mapping <code>editorId</code> 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.
* </p>
*
* @param input the editor input
* @param editorId the id of the editor extension to use
* @param activate if <code>true</code> the editor will be activated
* @param matchFlags a bit mask consisting of zero or more of the MATCH_* constants OR-ed together
* @return an open editor, or <code>null</code> if an external editor was opened
* @exception PartInitException if the editor could not be created or initialized
*
* @see #MATCH_NONE
* @see #MATCH_INPUT
* @see #MATCH_ID
* @since 3.2
*/
public IEditorPart openEditor(final IEditorInput input,
final String editorId, final boolean activate, final int matchFlags)
throws PartInitException;
있는 기존 편집기할지 여부 재사용하거나 새로운 것을 만들어야합니다.