org.ocleditor.internal.ui.editor
Class OclEditor

java.lang.Object
  extended byorg.eclipse.ui.part.WorkbenchPart
      extended byorg.eclipse.ui.part.EditorPart
          extended byorg.eclipse.ui.texteditor.AbstractTextEditor
              extended byorg.eclipse.ui.texteditor.StatusTextEditor
                  extended byorg.eclipse.ui.texteditor.ExtendedTextEditor
                      extended byorg.eclipse.ui.editors.text.TextEditor
                          extended byorg.ocleditor.internal.ui.editor.OclEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.INavigationLocationProvider, org.eclipse.ui.IReusableEditor, org.eclipse.ui.ISaveablePart, org.eclipse.ui.texteditor.ITextEditor, org.eclipse.ui.texteditor.ITextEditorExtension, org.eclipse.ui.texteditor.ITextEditorExtension2, org.eclipse.ui.texteditor.ITextEditorExtension3, org.eclipse.ui.IWorkbenchPart

public class OclEditor
extends org.eclipse.ui.editors.text.TextEditor

The text editor for OCL file resources (IFile with extension "ocl").


Nested Class Summary
 
Nested classes inherited from class org.eclipse.ui.texteditor.ITextEditorExtension3
org.eclipse.ui.texteditor.ITextEditorExtension3.InsertMode
 
Field Summary
 
Fields inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
DEFAULT_EDITOR_CONTEXT_MENU_ID, DEFAULT_RULER_CONTEXT_MENU_ID, PREFERENCE_COLOR_BACKGROUND, PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_FIND_SCOPE, PREFERENCE_COLOR_FOREGROUND, PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, PREFERENCE_FONT, PREFERENCE_NAVIGATION_SMART_HOME_END
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Fields inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3
INSERT, OVERWRITE, SMART_INSERT
 
Constructor Summary
OclEditor()
          Default constructor.
 
Method Summary
 void dispose()
           
 void doRevertToSaved()
          The OclEditor implementation of this AbstractTextEditor method updates the outline when reverting to the saved file.
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
          The OclEditor implementation of this AbstractTextEditor method updates the outline when saving the OCL file.
 void doSaveAs()
          The OclEditor implementation of this AbstractTextEditor method updates the outline when saving the OCL file.
 void doSetInput(org.eclipse.ui.IEditorInput input)
          The OclEditor implementation of this AbstractTextEditor method sets the input of the outline page after AbstractTextEditor has set input.
 java.lang.Object getAdapter(java.lang.Class required)
          The OclEditor implementation of this AbstractTextEditor method gets: - the OCL content outline page if request is for an outline page.
 IOclModel getOclModel()
           
 void updateOutline()
          Manually updates the content outline.
 
Methods inherited from class org.eclipse.ui.editors.text.TextEditor
isSaveAsAllowed
 
Methods inherited from class org.eclipse.ui.texteditor.ExtendedTextEditor
createPartControl, getDocumentProvider, gotoMarker, isChangeInformationShowing, showChangeInformation
 
Methods inherited from class org.eclipse.ui.texteditor.StatusTextEditor
updatePartControl
 
Methods inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
addRulerContextMenuListener, close, createEmptyNavigationLocation, createNavigationLocation, getAction, getHighlightRange, getInsertMode, getSelectionProvider, init, isDirty, isEditable, isEditorInputModifiable, isEditorInputReadOnly, isSaveOnCloseNeeded, markAsContentDependentAction, markAsPropertyDependentAction, markAsSelectionDependentAction, markAsStateDependentAction, removeActionActivationCode, removeRulerContextMenuListener, resetHighlightRange, selectAndReveal, setAction, setActionActivationCode, setFocus, setHighlightRange, setInput, setInsertMode, setStatusField, showHighlightRangeOnly, showsHighlightRangeOnly, validateEditorInputState
 
Methods inherited from class org.eclipse.ui.part.EditorPart
getEditorInput, getEditorSite, getTitleToolTip
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, getJobChangeListener, getSite, getTitle, getTitleImage, removePropertyListener, setInitializationData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IEditorPart
getEditorInput, getEditorSite
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 

Constructor Detail

OclEditor

public OclEditor()
Default constructor.

Method Detail

getAdapter

public java.lang.Object getAdapter(java.lang.Class required)
The OclEditor implementation of this AbstractTextEditor method gets:

- the OCL content outline page if request is for an outline page.

- the OCL document changer if request is for a document changer.


dispose

public void dispose()

doRevertToSaved

public void doRevertToSaved()
The OclEditor implementation of this AbstractTextEditor method updates the outline when reverting to the saved file.


doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
The OclEditor implementation of this AbstractTextEditor method updates the outline when saving the OCL file.


doSaveAs

public void doSaveAs()
The OclEditor implementation of this AbstractTextEditor method updates the outline when saving the OCL file.


doSetInput

public void doSetInput(org.eclipse.ui.IEditorInput input)
                throws org.eclipse.core.runtime.CoreException
The OclEditor implementation of this AbstractTextEditor method sets the input of the outline page after AbstractTextEditor has set input.

Throws:
org.eclipse.core.runtime.CoreException

updateOutline

public void updateOutline()
Manually updates the content outline.


getOclModel

public IOclModel getOclModel()
Returns:
the OCL model of the open OCL document in the editor.