org.eclipse.emf.codegen.jet.editor.presentation
Class JETEditor

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by org.eclipse.ui.part.MultiPageEditorPart
                  extended by org.eclipse.ui.forms.editor.FormEditor
                      extended by org.eclipse.emf.codegen.jet.editor.presentation.JETEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.jface.action.IMenuListener, org.eclipse.jface.dialogs.IPageChangeProvider, org.eclipse.ui.ide.IGotoMarker, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation, org.eclipse.ui.texteditor.ITextEditorExtension

public class JETEditor
extends org.eclipse.ui.forms.editor.FormEditor
implements org.eclipse.ui.texteditor.ITextEditorExtension, org.eclipse.jface.action.IMenuListener, org.eclipse.ui.ide.IGotoMarker


Field Summary
protected  org.eclipse.ui.views.contentoutline.IContentOutlinePage contentOutlinePage
          This is the content outline page
protected  org.eclipse.jface.action.IStatusLineManager contentOutlineStatusLineManager
          This is a kludge
protected  org.eclipse.jface.viewers.TreeViewer contentOutlineViewer
          This is the content outline page's viewer
static java.lang.String copyright
           
protected  org.eclipse.jface.viewers.Viewer currentViewer
          This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer
protected  org.eclipse.emf.common.ui.ViewerPane currentViewerPane
          This keeps track of the active viewer pane, in the book
static java.lang.String ID
           
protected  JETTextEditor jetTextEditor
           
protected  org.eclipse.ui.views.properties.PropertySheetPage propertySheetPage
          This is the property sheet page
protected  org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener
          This listens to which ever viewer is active
 
Fields inherited from class org.eclipse.ui.forms.editor.FormEditor
pages
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
JETEditor()
          This creates a JET editor
 
Method Summary
 void addPages()
          This is the method used by the framework to install your own controls
 void addRulerContextMenuListener(org.eclipse.jface.action.IMenuListener listener)
           
 void dispose()
           
 void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
           
 void doSaveAs()
          This also changes the editor's input.
 java.lang.Object getAdapter(java.lang.Class key)
          This is how the framework determines which interfaces we implement.
 org.eclipse.ui.views.contentoutline.IContentOutlinePage getContentOutlinePage()
          This accesses a cached version of the content outliner.
 JETTextEditor getJetTextEditor()
          This returns the JET Text editor.
 org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetPage()
          This accesses a cached version of the property sheet.
 void gotoMarker(org.eclipse.core.resources.IMarker marker)
           
protected  void hideTabs()
          If there is just one page in the multi-page editor part, this hides the single tab at the bottom.
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput)
          This is called during startup.
 boolean isDirty()
           
 boolean isEditorInputReadOnly()
           
 boolean isSaveAsAllowed()
          This always returns true because it is not currently supported.
 void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
          This implements IMenuListener to help fill the context menus with contributions from the Edit menu.
 void removeRulerContextMenuListener(org.eclipse.jface.action.IMenuListener listener)
           
 void setStatusField(org.eclipse.ui.texteditor.IStatusField field, java.lang.String category)
           
 
Methods inherited from class org.eclipse.ui.forms.editor.FormEditor
addPage, addPage, addPage, addPage, addPage, addPage, addPageChangedListener, close, configurePage, createPageContainer, createPages, createToolkit, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, pageChange, removePage, removePageChangedListener, selectReveal, setActivePage, setActivePage, setActivePage, updateActionBarContributor
 
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart
createPartControl, createSite, getActivePage, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, setControl, setFocus, setPageImage, setPageText
 
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values

contentOutlinePage

protected org.eclipse.ui.views.contentoutline.IContentOutlinePage contentOutlinePage
This is the content outline page.


contentOutlineStatusLineManager

protected org.eclipse.jface.action.IStatusLineManager contentOutlineStatusLineManager
This is a kludge...


contentOutlineViewer

protected org.eclipse.jface.viewers.TreeViewer contentOutlineViewer
This is the content outline page's viewer.


propertySheetPage

protected org.eclipse.ui.views.properties.PropertySheetPage propertySheetPage
This is the property sheet page.


currentViewerPane

protected org.eclipse.emf.common.ui.ViewerPane currentViewerPane
This keeps track of the active viewer pane, in the book.


currentViewer

protected org.eclipse.jface.viewers.Viewer currentViewer
This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.


selectionChangedListener

protected org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener
This listens to which ever viewer is active.


jetTextEditor

protected JETTextEditor jetTextEditor
Constructor Detail

JETEditor

public JETEditor()
This creates a JET editor.

Method Detail

getJetTextEditor

public JETTextEditor getJetTextEditor()
This returns the JET Text editor.


addPages

public void addPages()
This is the method used by the framework to install your own controls.

Specified by:
addPages in class org.eclipse.ui.forms.editor.FormEditor

hideTabs

protected void hideTabs()
If there is just one page in the multi-page editor part, this hides the single tab at the bottom.


getAdapter

public java.lang.Object getAdapter(java.lang.Class key)
This is how the framework determines which interfaces we implement.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class org.eclipse.ui.part.MultiPageEditorPart

getContentOutlinePage

public org.eclipse.ui.views.contentoutline.IContentOutlinePage getContentOutlinePage()
This accesses a cached version of the content outliner.


getPropertySheetPage

public org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetPage()
This accesses a cached version of the property sheet.


isDirty

public boolean isDirty()

Specified by:
isDirty in interface org.eclipse.ui.ISaveablePart
Overrides:
isDirty in class org.eclipse.ui.forms.editor.FormEditor

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)

Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Specified by:
doSave in class org.eclipse.ui.part.EditorPart

isSaveAsAllowed

public boolean isSaveAsAllowed()
This always returns true because it is not currently supported.

Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Specified by:
isSaveAsAllowed in class org.eclipse.ui.part.EditorPart

doSaveAs

public void doSaveAs()
This also changes the editor's input.

Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Specified by:
doSaveAs in class org.eclipse.ui.part.EditorPart

gotoMarker

public void gotoMarker(org.eclipse.core.resources.IMarker marker)

Specified by:
gotoMarker in interface org.eclipse.ui.ide.IGotoMarker

init

public void init(org.eclipse.ui.IEditorSite site,
                 org.eclipse.ui.IEditorInput editorInput)
          throws org.eclipse.ui.PartInitException
This is called during startup.

Specified by:
init in interface org.eclipse.ui.IEditorPart
Overrides:
init in class org.eclipse.ui.forms.editor.FormEditor
Throws:
org.eclipse.ui.PartInitException

menuAboutToShow

public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
This implements IMenuListener to help fill the context menus with contributions from the Edit menu.

Specified by:
menuAboutToShow in interface org.eclipse.jface.action.IMenuListener

dispose

public void dispose()

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class org.eclipse.ui.forms.editor.FormEditor

setStatusField

public void setStatusField(org.eclipse.ui.texteditor.IStatusField field,
                           java.lang.String category)
Specified by:
setStatusField in interface org.eclipse.ui.texteditor.ITextEditorExtension

isEditorInputReadOnly

public boolean isEditorInputReadOnly()
Specified by:
isEditorInputReadOnly in interface org.eclipse.ui.texteditor.ITextEditorExtension

addRulerContextMenuListener

public void addRulerContextMenuListener(org.eclipse.jface.action.IMenuListener listener)
Specified by:
addRulerContextMenuListener in interface org.eclipse.ui.texteditor.ITextEditorExtension

removeRulerContextMenuListener

public void removeRulerContextMenuListener(org.eclipse.jface.action.IMenuListener listener)
Specified by:
removeRulerContextMenuListener in interface org.eclipse.ui.texteditor.ITextEditorExtension

Copyright 2006 IBM Corporation and others.
All Rights Reserved.