Package org.eclipse.emf.cdo.ui
Class CDOEditorUtil
- java.lang.Object
- 
- org.eclipse.emf.cdo.ui.CDOEditorUtil
 
- 
 public final class CDOEditorUtil extends java.lang.ObjectSome utility methods to cope with CDOEditor and CDOEditorInput- Since:
- 2.0
- Author:
- Victor Roldan Betancort
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringEDITOR_IDstatic java.lang.StringTEXT_EDITOR_ID
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static CDOEditorInputcreateCDOEditorInput(CDOView view, java.lang.String resourcePath, boolean viewOwned)Returns an implementation of the CDOEditorInput interface.static CDOEditorInputcreateCDOEditorInputWithEditingDomain(CDOEditorInput input, org.eclipse.emf.edit.domain.EditingDomain editingDomain)Creates aCDOEditorInputbased on the giveninputthat adapts to theIEditingDomainProviderinterface to provide a particulareditingDomain.static CDOEditorInputcreateCDOEditorInputWithEditingDomain(CDOView view, java.lang.String resourcePath, boolean viewOwned, org.eclipse.emf.edit.domain.EditingDomain editingDomain)Creates aCDOEditorInputthat adapts to theIEditingDomainProviderinterface to provide a particulareditingDomain.static IEditorInputcreateEditorInput(java.lang.String editorID, CDOResourceLeaf resource)Returns an implementation of the IEditorInput interface.static IEditorInputcreateEditorInput(java.lang.String editorID, CDOResourceLeaf resource, boolean viewOwned)Returns an implementation of the IEditorInput interface.static IEditorInputcreateEditorInput(java.lang.String editorID, CDOResourceLeaf resource, boolean viewOwned, boolean lobCommitOnSave)static IEditorInputcreateLobEditorInput(CDOResourceLeaf resource, boolean lobCommitOnSave)static IEditorReference[]findEditor(IWorkbenchPage page, CDOView view, java.lang.String resourcePath)Returns references to open instances ofCDOEditorwith givenCDOView, resource path, and object ID.static IEditorReference[]findEditor(IWorkbenchPage page, CDOView view, java.lang.String resourcePath, CDOID objectID)Returns references to open instances ofCDOEditorwith givenCDOView, resource path, and object ID.static java.lang.String[]getAllEditorIDs(CDOResourceLeaf resource)static java.lang.StringgetEditorID()static java.lang.StringgetEffectiveEditorID(CDOResourceLeaf resource)static voidopenEditor(IWorkbenchPage page, java.lang.String editorID, CDOResourceLeaf resource)Opens the specified resource in CDOEditorstatic voidopenEditor(IWorkbenchPage page, CDOResourceLeaf resource)Opens the specified resource in CDOEditorstatic voidopenEditor(IWorkbenchPage page, CDOView view, java.lang.String resourcePath)Opens the specified resource in CDOEditorstatic voidpopulateMenu(IMenuManager manager, CDOResourceLeaf resource, IWorkbenchPage page)static voidrefreshEditors(IWorkbenchPage page, CDOView view)Refreshes all editor's viewers that are using certain CDOView.static voidsetEditorID(java.lang.String editorID)
 
- 
- 
- 
Field Detail- 
EDITOR_IDpublic static final java.lang.String EDITOR_ID - Since:
- 4.1
- See Also:
- Constant Field Values
 
 - 
TEXT_EDITOR_IDpublic static final java.lang.String TEXT_EDITOR_ID - Since:
- 4.4
- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getEditorIDpublic static java.lang.String getEditorID() - Since:
- 4.1
 
 - 
setEditorIDpublic static void setEditorID(java.lang.String editorID) - Since:
- 4.1
 
 - 
createCDOEditorInputpublic static CDOEditorInput createCDOEditorInput(CDOView view, java.lang.String resourcePath, boolean viewOwned) Returns an implementation of the CDOEditorInput interface.
 - 
createCDOEditorInputWithEditingDomainpublic static CDOEditorInput createCDOEditorInputWithEditingDomain(CDOEditorInput input, org.eclipse.emf.edit.domain.EditingDomain editingDomain) Creates aCDOEditorInputbased on the giveninputthat adapts to theIEditingDomainProviderinterface to provide a particulareditingDomain.- Parameters:
- input- an editor input to copy
- editingDomain- the editing domain to associate with the editor input
- Returns:
- the editing-domain-providing editor input
- Since:
- 4.3
 
 - 
createCDOEditorInputWithEditingDomainpublic static CDOEditorInput createCDOEditorInputWithEditingDomain(CDOView view, java.lang.String resourcePath, boolean viewOwned, org.eclipse.emf.edit.domain.EditingDomain editingDomain) Creates aCDOEditorInputthat adapts to theIEditingDomainProviderinterface to provide a particulareditingDomain.- Parameters:
- view- the CDO view of the editor input
- resourcePath- the path to the resource to edit
- viewOwned- whether the opened editor should assume ownership of the- view
- editingDomain- the editing domain to associate with the editor input
- Returns:
- the editing-domain-providing editor input
- Since:
- 4.3
 
 - 
openEditorpublic static void openEditor(IWorkbenchPage page, CDOView view, java.lang.String resourcePath) Opens the specified resource in CDOEditor- Parameters:
- page- The page in which the editor will be opened
- view- the CDOView that will be used to access the resource
- resourcePath- absolute path to the resource in the repository
 
 - 
findEditorpublic static IEditorReference[] findEditor(IWorkbenchPage page, CDOView view, java.lang.String resourcePath, CDOID objectID) Returns references to open instances ofCDOEditorwith givenCDOView, resource path, and object ID.- Parameters:
- page- The- pageon which to search for open editors.
- view- The CDOView that the editors are filtered for, or- nullif view filtering is not applicable.
- resourcePath- The resource path that the editors are filtered for, or- nullif resource path filtering is not applicable.
- objectID- The object ID that the editors are filtered for, or- nullif object ID filtering is not applicable.
- Since:
- 4.8
 
 - 
findEditorpublic static IEditorReference[] findEditor(IWorkbenchPage page, CDOView view, java.lang.String resourcePath) Returns references to open instances ofCDOEditorwith givenCDOView, resource path, and object ID.- Parameters:
- page- The- pageon which to search for open editors.
- view- The CDOView that the editors are filtered for, or- nullif view filtering is not applicable.
- resourcePath- The resource path that the editors are filtered for, or- nullif resource path filtering is not applicable.
 
 - 
populateMenupublic static void populateMenu(IMenuManager manager, CDOResourceLeaf resource, IWorkbenchPage page) - Since:
- 4.2
 
 - 
getEffectiveEditorIDpublic static java.lang.String getEffectiveEditorID(CDOResourceLeaf resource) - Since:
- 4.2
 
 - 
getAllEditorIDspublic static java.lang.String[] getAllEditorIDs(CDOResourceLeaf resource) - Since:
- 4.2
 
 - 
createEditorInputpublic static IEditorInput createEditorInput(java.lang.String editorID, CDOResourceLeaf resource, boolean viewOwned, boolean lobCommitOnSave) - Since:
- 4.4
 
 - 
createLobEditorInputpublic static IEditorInput createLobEditorInput(CDOResourceLeaf resource, boolean lobCommitOnSave) - Since:
- 4.9
 
 - 
createEditorInputpublic static IEditorInput createEditorInput(java.lang.String editorID, CDOResourceLeaf resource, boolean viewOwned) Returns an implementation of the IEditorInput interface.- Since:
- 4.2
 
 - 
createEditorInputpublic static IEditorInput createEditorInput(java.lang.String editorID, CDOResourceLeaf resource) Returns an implementation of the IEditorInput interface.- Since:
- 4.2
 
 - 
openEditorpublic static void openEditor(IWorkbenchPage page, CDOResourceLeaf resource) Opens the specified resource in CDOEditor- Parameters:
- page- The page in which the editor will be opened
- Since:
- 4.2
 
 - 
openEditorpublic static void openEditor(IWorkbenchPage page, java.lang.String editorID, CDOResourceLeaf resource) Opens the specified resource in CDOEditor- Parameters:
- page- The page in which the editor will be opened
- Since:
- 4.2
 
 - 
refreshEditorspublic static void refreshEditors(IWorkbenchPage page, CDOView view) Refreshes all editor's viewers that are using certain CDOView.- Parameters:
- page- the IWorkbenchPage where CDOEditor is opened
- view- instance of CDOView our editors are using
 
 
- 
 
-