Package org.eclipse.emf.cdo.ui
Class CDOEditorUtil
java.lang.Object
org.eclipse.emf.cdo.ui.CDOEditorUtil
Some utility methods to cope with CDOEditor and CDOEditorInput
- Since:
- 2.0
- Author:
- Victor Roldan Betancort
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CDOEditorInput
createCDOEditorInput
(CDOView view, String resourcePath, boolean viewOwned) Returns an implementation of the CDOEditorInput interface.static CDOEditorInput
createCDOEditorInputWithEditingDomain
(CDOEditorInput input, EditingDomain editingDomain) Creates aCDOEditorInput
based on the giveninput
that adapts to theIEditingDomainProvider
interface to provide a particulareditingDomain
.static CDOEditorInput
createCDOEditorInputWithEditingDomain
(CDOView view, String resourcePath, boolean viewOwned, EditingDomain editingDomain) Creates aCDOEditorInput
that adapts to theIEditingDomainProvider
interface to provide a particulareditingDomain
.static IEditorInput
createEditorInput
(String editorID, CDOResourceLeaf resource) Returns an implementation of the IEditorInput interface.static IEditorInput
createEditorInput
(String editorID, CDOResourceLeaf resource, boolean viewOwned) Returns an implementation of the IEditorInput interface.static IEditorInput
createEditorInput
(String editorID, CDOResourceLeaf resource, boolean viewOwned, boolean lobCommitOnSave) static IEditorInput
createLobEditorInput
(CDOResourceLeaf resource, boolean lobCommitOnSave) static IEditorReference[]
findEditor
(IWorkbenchPage page, CDOView view, String resourcePath) Returns references to open instances ofCDOEditor
with givenCDOView
, resource path, and object ID.static IEditorReference[]
findEditor
(IWorkbenchPage page, CDOView view, String resourcePath, CDOID objectID) Returns references to open instances ofCDOEditor
with givenCDOView
, resource path, and object ID.static String[]
getAllEditorIDs
(CDOResourceLeaf resource) static String
static String
getEffectiveEditorID
(CDOResourceLeaf resource) static void
openEditor
(IWorkbenchPage page, String editorID, CDOResourceLeaf resource) Opens the specified resource in CDOEditorstatic void
openEditor
(IWorkbenchPage page, CDOResourceLeaf resource) Opens the specified resource in CDOEditorstatic void
openEditor
(IWorkbenchPage page, CDOView view, String resourcePath) Opens the specified resource in CDOEditorstatic void
populateMenu
(IMenuManager manager, CDOResourceLeaf resource, IWorkbenchPage page) static void
refreshEditors
(IWorkbenchPage page, CDOView view) Refreshes all editor's viewers that are using certain CDOView.static void
setEditorID
(String editorID)
-
Field Details
-
EDITOR_ID
- Since:
- 4.1
- See Also:
-
TEXT_EDITOR_ID
- Since:
- 4.4
- See Also:
-
-
Method Details
-
getEditorID
- Since:
- 4.1
-
setEditorID
- Since:
- 4.1
-
createCDOEditorInput
public static CDOEditorInput createCDOEditorInput(CDOView view, String resourcePath, boolean viewOwned) Returns an implementation of the CDOEditorInput interface. -
createCDOEditorInputWithEditingDomain
public static CDOEditorInput createCDOEditorInputWithEditingDomain(CDOEditorInput input, EditingDomain editingDomain) Creates aCDOEditorInput
based on the giveninput
that adapts to theIEditingDomainProvider
interface to provide a particulareditingDomain
.- Parameters:
input
- an editor input to copyeditingDomain
- the editing domain to associate with the editor input- Returns:
- the editing-domain-providing editor input
- Since:
- 4.3
-
createCDOEditorInputWithEditingDomain
public static CDOEditorInput createCDOEditorInputWithEditingDomain(CDOView view, String resourcePath, boolean viewOwned, EditingDomain editingDomain) Creates aCDOEditorInput
that adapts to theIEditingDomainProvider
interface to provide a particulareditingDomain
.- Parameters:
view
- the CDO view of the editor inputresourcePath
- the path to the resource to editviewOwned
- whether the opened editor should assume ownership of theview
editingDomain
- the editing domain to associate with the editor input- Returns:
- the editing-domain-providing editor input
- Since:
- 4.3
-
openEditor
Opens the specified resource in CDOEditor- Parameters:
page
- The page in which the editor will be openedview
- the CDOView that will be used to access the resourceresourcePath
- absolute path to the resource in the repository
-
findEditor
public static IEditorReference[] findEditor(IWorkbenchPage page, CDOView view, String resourcePath, CDOID objectID) Returns references to open instances ofCDOEditor
with givenCDOView
, resource path, and object ID.- Parameters:
page
- Thepage
on which to search for open editors.view
- The CDOView that the editors are filtered for, ornull
if view filtering is not applicable.resourcePath
- The resource path that the editors are filtered for, ornull
if resource path filtering is not applicable.objectID
- The object ID that the editors are filtered for, ornull
if object ID filtering is not applicable.- Since:
- 4.8
-
findEditor
Returns references to open instances ofCDOEditor
with givenCDOView
, resource path, and object ID.- Parameters:
page
- Thepage
on which to search for open editors.view
- The CDOView that the editors are filtered for, ornull
if view filtering is not applicable.resourcePath
- The resource path that the editors are filtered for, ornull
if resource path filtering is not applicable.
-
populateMenu
public static void populateMenu(IMenuManager manager, CDOResourceLeaf resource, IWorkbenchPage page) - Since:
- 4.2
-
getEffectiveEditorID
- Since:
- 4.2
-
getAllEditorIDs
- Since:
- 4.2
-
createEditorInput
public static IEditorInput createEditorInput(String editorID, CDOResourceLeaf resource, boolean viewOwned, boolean lobCommitOnSave) - Since:
- 4.4
-
createLobEditorInput
- Since:
- 4.9
-
createEditorInput
public static IEditorInput createEditorInput(String editorID, CDOResourceLeaf resource, boolean viewOwned) Returns an implementation of the IEditorInput interface.- Since:
- 4.2
-
createEditorInput
Returns an implementation of the IEditorInput interface.- Since:
- 4.2
-
openEditor
Opens the specified resource in CDOEditor- Parameters:
page
- The page in which the editor will be opened- Since:
- 4.2
-
openEditor
Opens the specified resource in CDOEditor- Parameters:
page
- The page in which the editor will be opened- Since:
- 4.2
-
refreshEditors
Refreshes all editor's viewers that are using certain CDOView.- Parameters:
page
- the IWorkbenchPage where CDOEditor is openedview
- instance of CDOView our editors are using
-