org.eclipse.gmt.umlx.editor
Class EditorEnvironment

java.lang.Object
  extended by org.eclipse.gmt.umlx.Environment
      extended by org.eclipse.gmt.umlx.editor.EditorEnvironment
All Implemented Interfaces:
IEditorEnvironment, IEnvironment

public class EditorEnvironment
extends Environment
implements IEditorEnvironment

EditorEnvironment provides the environment when editing (rather than testing).


Constructor Summary
EditorEnvironment()
           
 
Method Summary
 org.eclipse.emf.ecore.resource.Resource createGcoreResource(IActiveEditDomain domain, org.eclipse.emf.common.util.URI uri)
          Create the GCore resource from uri in the editDomain.
 ActiveEditDomain getActiveEditDomain()
          Return the ActiveEditDomain for the current editor.
 org.eclipse.ui.IEditorPart getActiveEditor()
           
 java.util.List<GImport> getActiveImports()
          Return the resources used by the current editor, which is the imports of the Gcore Resource of the Actived editor.
 org.eclipse.ui.IWorkbenchPage getActivePage()
           
 org.eclipse.ui.IWorkbenchPart getActivePart()
           
 IRegimeContext getActiveRegimeContext()
           
 org.eclipse.emf.ecore.resource.ResourceSet getActiveResourceSet()
          Return the ResourceSet in use by the ActiveEditDomain.
 org.eclipse.jface.viewers.ISelectionProvider getActiveSelectionProvider()
           
 ISheetEditor getActiveSheetEditor()
           
 SheetViewer getActiveSheetViewer()
           
 org.eclipse.jface.action.IStatusLineManager getActiveStatusLineManager()
           
 boolean requestUnlock(org.eclipse.emf.ecore.resource.Resource resource)
           
 
Methods inherited from class org.eclipse.gmt.umlx.Environment
getClipboardContents, logException, setClipboardContents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.IEnvironment
getClipboardContents, logException, setClipboardContents
 

Constructor Detail

EditorEnvironment

public EditorEnvironment()
Method Detail

createGcoreResource

public org.eclipse.emf.ecore.resource.Resource createGcoreResource(IActiveEditDomain domain,
                                                                   org.eclipse.emf.common.util.URI uri)
Description copied from interface: IEditorEnvironment
Create the GCore resource from uri in the editDomain.

Specified by:
createGcoreResource in interface IEditorEnvironment
Returns:
the resource

getActiveEditDomain

public ActiveEditDomain getActiveEditDomain()
Description copied from interface: IEditorEnvironment
Return the ActiveEditDomain for the current editor. (The ActiveEditDomain ids shared across the multiple sheets of this editor.)

Specified by:
getActiveEditDomain in interface IEditorEnvironment
Returns:
the ActiveEditDomain

getActiveEditor

public org.eclipse.ui.IEditorPart getActiveEditor()
Specified by:
getActiveEditor in interface IEditorEnvironment

getActiveImports

public java.util.List<GImport> getActiveImports()
Description copied from interface: IEditorEnvironment
Return the resources used by the current editor, which is the imports of the Gcore Resource of the Actived editor.

Specified by:
getActiveImports in interface IEditorEnvironment
Returns:
the imports

getActivePage

public org.eclipse.ui.IWorkbenchPage getActivePage()
Specified by:
getActivePage in interface IEditorEnvironment

getActivePart

public org.eclipse.ui.IWorkbenchPart getActivePart()
Specified by:
getActivePart in interface IEditorEnvironment

getActiveRegimeContext

public IRegimeContext getActiveRegimeContext()
Specified by:
getActiveRegimeContext in interface IEditorEnvironment

getActiveResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getActiveResourceSet()
Description copied from interface: IEditorEnvironment
Return the ResourceSet in use by the ActiveEditDomain.

Specified by:
getActiveResourceSet in interface IEditorEnvironment
Returns:
the ResourceSet

getActiveSelectionProvider

public org.eclipse.jface.viewers.ISelectionProvider getActiveSelectionProvider()
Specified by:
getActiveSelectionProvider in interface IEditorEnvironment

getActiveSheetEditor

public ISheetEditor getActiveSheetEditor()
Specified by:
getActiveSheetEditor in interface IEditorEnvironment

getActiveSheetViewer

public SheetViewer getActiveSheetViewer()
Specified by:
getActiveSheetViewer in interface IEditorEnvironment

getActiveStatusLineManager

public org.eclipse.jface.action.IStatusLineManager getActiveStatusLineManager()
Specified by:
getActiveStatusLineManager in interface IEditorEnvironment

requestUnlock

public boolean requestUnlock(org.eclipse.emf.ecore.resource.Resource resource)
Specified by:
requestUnlock in interface IEditorEnvironment