org.eclipse.emf.cdo.ui
Class CDOEditorUtil

java.lang.Object
  extended by org.eclipse.emf.cdo.ui.CDOEditorUtil

public final class CDOEditorUtil
extends Object

Some utility methods to cope with CDOEditor and CDOEditorInput

Since:
2.0

Field Summary
static String EDITOR_ID
           
 
Method Summary
static CDOEditorInput createCDOEditorInput(CDOView view, String resourcePath, boolean viewOwned)
          Returns an implementation of CDOEditorInput interface
static org.eclipse.ui.IEditorReference[] findEditor(org.eclipse.ui.IWorkbenchPage page, CDOView view, String resourcePath)
          Returns references to possibly opened instances of CDOEditor with certain CDOView and resource
static String getEditorID()
           
static void openEditor(org.eclipse.ui.IWorkbenchPage page, CDOView view, String resourcePath)
          Opens the specified resource in CDOEditor
static void refreshEditors(org.eclipse.ui.IWorkbenchPage page, CDOView view)
          Refreshes all editor's viewers that are using certain CDOView.
static void setEditorID(String editorID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDITOR_ID

public static final String EDITOR_ID
Since:
4.1
See Also:
Constant Field Values
Method Detail

getEditorID

public static String getEditorID()
Since:
4.1

setEditorID

public static void setEditorID(String editorID)
Since:
4.1

createCDOEditorInput

public static CDOEditorInput createCDOEditorInput(CDOView view,
                                                  String resourcePath,
                                                  boolean viewOwned)
Returns an implementation of CDOEditorInput interface


openEditor

public static void openEditor(org.eclipse.ui.IWorkbenchPage page,
                              CDOView view,
                              String resourcePath)
Opens the specified resource in CDOEditor

Parameters:
page - The page in which the editor will be open
view - the CDOView that will be used to access the resource
resourcePath - absolute path to the resource in the repository

findEditor

public static org.eclipse.ui.IEditorReference[] findEditor(org.eclipse.ui.IWorkbenchPage page,
                                                           CDOView view,
                                                           String resourcePath)
Returns references to possibly opened instances of CDOEditor with certain CDOView and resource

Parameters:
page - The page where to search for opened editors
view - The editors to find are using the specified CDOView
resourcePath - The editors are editing the CDOResource specified with this path

refreshEditors

public static void refreshEditors(org.eclipse.ui.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


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.