public final class CDOEditorUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EDITOR_ID |
static String |
TEXT_EDITOR_ID |
Modifier and Type | Method and Description |
---|---|
static CDOEditorInput |
createCDOEditorInput(CDOView view,
String resourcePath,
boolean viewOwned)
Returns an implementation of the CDOEditorInput interface.
|
static CDOEditorInput |
createCDOEditorInputWithEditingDomain(CDOEditorInput input,
org.eclipse.emf.edit.domain.EditingDomain editingDomain)
Creates a
CDOEditorInput based on the given input that adapts to
the IEditingDomainProvider interface to provide a particular editingDomain . |
static CDOEditorInput |
createCDOEditorInputWithEditingDomain(CDOView view,
String resourcePath,
boolean viewOwned,
org.eclipse.emf.edit.domain.EditingDomain editingDomain)
Creates a
CDOEditorInput that adapts to the IEditingDomainProvider interface
to provide a particular editingDomain . |
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 IEditorReference[] |
findEditor(IWorkbenchPage page,
CDOView view,
String resourcePath)
Returns references to possibly opened instances of CDOEditor with certain CDOView and resource
|
static String[] |
getAllEditorIDs(CDOResourceLeaf resource) |
static String |
getEditorID() |
static String |
getEffectiveEditorID(CDOResourceLeaf resource) |
static void |
openEditor(IWorkbenchPage page,
CDOResourceLeaf resource)
Opens the specified resource in CDOEditor
|
static void |
openEditor(IWorkbenchPage page,
CDOView view,
String resourcePath)
Opens the specified resource in CDOEditor
|
static void |
openEditor(IWorkbenchPage page,
String editorID,
CDOResourceLeaf resource)
Opens the specified resource in CDOEditor
|
static 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) |
public static final String EDITOR_ID
public static final String TEXT_EDITOR_ID
public static String getEditorID()
public static void setEditorID(String editorID)
public static CDOEditorInput createCDOEditorInput(CDOView view, String resourcePath, boolean viewOwned)
public static CDOEditorInput createCDOEditorInputWithEditingDomain(CDOEditorInput input, org.eclipse.emf.edit.domain.EditingDomain editingDomain)
CDOEditorInput
based on the given input
that adapts to
the IEditingDomainProvider
interface to provide a particular editingDomain
.input
- an editor input to copyeditingDomain
- the editing domain to associate with the editor inputpublic static CDOEditorInput createCDOEditorInputWithEditingDomain(CDOView view, String resourcePath, boolean viewOwned, org.eclipse.emf.edit.domain.EditingDomain editingDomain)
CDOEditorInput
that adapts to the IEditingDomainProvider
interface
to provide a particular editingDomain
.view
- the CDO view of the editor inputresourcePath
- the path to the resource to editviewOwned
- whether the opened editor should assume ownership of the view
editingDomain
- the editing domain to associate with the editor inputpublic static void openEditor(IWorkbenchPage page, CDOView view, String resourcePath)
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 repositorypublic static IEditorReference[] findEditor(IWorkbenchPage page, CDOView view, String resourcePath)
page
- The page where to search for opened editorsview
- The editors to find are using the specified CDOViewresourcePath
- The editors are editing the CDOResource specified with this pathpublic static void populateMenu(IMenuManager manager, CDOResourceLeaf resource, IWorkbenchPage page)
public static String getEffectiveEditorID(CDOResourceLeaf resource)
public static String[] getAllEditorIDs(CDOResourceLeaf resource)
public static IEditorInput createEditorInput(String editorID, CDOResourceLeaf resource, boolean viewOwned, boolean lobCommitOnSave)
public static IEditorInput createEditorInput(String editorID, CDOResourceLeaf resource, boolean viewOwned)
public static IEditorInput createEditorInput(String editorID, CDOResourceLeaf resource)
public static void openEditor(IWorkbenchPage page, CDOResourceLeaf resource)
page
- The page in which the editor will be openedpublic static void openEditor(IWorkbenchPage page, String editorID, CDOResourceLeaf resource)
page
- The page in which the editor will be openedpublic static void refreshEditors(IWorkbenchPage page, CDOView view)
page
- the IWorkbenchPage where CDOEditor is openedview
- instance of CDOView our editors are usingCopyright (c) 2011-2014 Eike Stepper (Berlin, Germany) and others.