Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

com.ibm.lpex.alef
Class LpexTextEditor

java.lang.Object
  extended byorg.eclipse.ui.part.WorkbenchPart
      extended byorg.eclipse.ui.part.EditorPart
          extended bycom.ibm.lpex.alef.LpexAbstractTextEditor
              extended bycom.ibm.lpex.alef.LpexStatusTextEditor
                  extended bycom.ibm.lpex.alef.LpexAbstractDecoratedTextEditor
                      extended bycom.ibm.lpex.alef.LpexTextEditor

All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IReusableEditor, org.eclipse.ui.ISaveablePart, org.eclipse.ui.texteditor.ITextEditor, org.eclipse.ui.texteditor.ITextEditorExtension, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2


public class LpexTextEditor
extends LpexAbstractDecoratedTextEditor

A line-oriented, LPEX-based version of TextEditor. This is a text editor for IFile resources and IStorage objects.

The editor's context menu has the id defined in EDITOR_CONTEXT_MENU_ID; its ruler context menu has the id defined in RULER_CONTEXT_MENU_ID.

See Also:
LpexAbstractTextEditor


Field Summary
static String EDITOR_CONTEXT_MENU_ID
          This editor's pop-up (context) menu id ("#TextEditorContext").
static String RULER_CONTEXT_MENU_ID
          This editor's ruler pop-up (context) menu id ("#LpexTextRulerContext").
 
Fields inherited from class com.ibm.lpex.alef.LpexAbstractDecoratedTextEditor
fAnnotationAccess
 
Fields inherited from class com.ibm.lpex.alef.LpexAbstractTextEditor
ACTION_MAP, DEFAULT_EDITOR_CONTEXT_MENU_ID, DEFAULT_RULER_CONTEXT_MENU_ID, fErrorLabel, VERTICAL_RULER_WIDTH
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
LpexTextEditor()
          Creates a new LPEX text editor.
 
Method Summary
protected  void createActions()
          Creates this editor's standard actions.
 void dispose()
          Disposes of this workbench part.
protected  void doSetInput(org.eclipse.ui.IEditorInput input)
          Internal processing of setting/changing the input to this editor.
 Object getAdapter(Class adapter)
          Return the object which is an instance of the given class associated with this object, or null if no such object can be found.
protected  String getStatusBanner(org.eclipse.core.runtime.IStatus status)
          Returns a banner for the given status.
protected  String getStatusHeader(org.eclipse.core.runtime.IStatus status)
          Returns a header for the given status.
protected  String getStatusMessage(org.eclipse.core.runtime.IStatus status)
          Returns a message for the given status.
protected  void initializeEditor()
          Initializes this editor.
protected  void installEncodingSupport()
          Installs the default encoding support on the given LPEX text editor.
 boolean isSaveAsAllowed()
          The LpexTextEditor implementation of this EditorPart method returns true.
protected  void performSaveAs(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          The LpexTextEditor implementation of this AbstractTextEditor method prompts the user for the workspace path of a file resource, and saves the document there.
protected  void performSaveAs(org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.core.resources.IFile original)
          The LpexTextEditor implementation of this method prompts the user for the workspace path of a file resource, and saves the document there.
protected  void performSaveAs(org.eclipse.core.runtime.IProgressMonitor progressMonitor, String fileName)
          The LpexTextEditor implementation of this method prompts the user for the workspace path of a file resource, and saves the document there.
protected  void updatePropertyDependentActions()
          Updates all property dependent actions.
 
Methods inherited from class com.ibm.lpex.alef.LpexAbstractDecoratedTextEditor
createAnnotationAccess, createVerticalRuler, disposeDocumentProvider, getAnnotationAccess, getDocumentProvider, gotoMarker, isErrorStatus, isLineNumberRulerVisible, setDocumentProvider
 
Methods inherited from class com.ibm.lpex.alef.LpexStatusTextEditor
createPartControl, createStatusControl, doRevertToSaved, sanityCheckState, updatePartControl, updateStatusField
 
Methods inherited from class com.ibm.lpex.alef.LpexAbstractTextEditor
addAction, addAction, addGroup, addLines, addRulerContextMenuListener, adjustHighlightRange, affectsTextPresentation, canHandleMove, close, createEmptyNavigationLocation, createNavigationActions, createNavigationLocation, createSourceViewer, createViewPreferenceNodes, createViewPreferencePage, doSave, doSaveAs, editorContextMenuAboutToShow, editorSaved, enableSanityChecking, enableStateValidation, firePropertyChange, getAction, getContextMenuListener, getCoverage, getCursorPosition, getEditorContextMenuId, getEOL, getFirstLpexView, getFirstLpexWindow, getHelpContextId, getHighlightRange, getInputResource, getKeyBindingScopes, getLpexView, getLpexWindow, getPreferenceStore, getProgressMonitor, getRangeIndicator, getRulerContextMenuId, getRulerMouseListener, getSelectionProvider, getSourceViewer, getSourceViewerConfiguration, getStatusField, getVerticalRuler, handleDelegate, handleEditorInputChanged, handleElementContentReplaced, handleExceptionOnSave, handlePreferenceStoreChanged, init, initializeLpexView, internalInit, isChangeInformationShowing, isDirty, isEditable, isEditorInputModifiable, isEditorInputReadOnly, isSaveOnCloseNeeded, isVisible, markAsPropertyDependentAction, markInNavigationHistory, modelOffset2WidgetOffset, performRevert, performSave, rememberSelection, removeActionActivationCode, removeRulerContextMenuListener, resetHighlightRange, restoreSelection, rulerContextMenuAboutToShow, safelySanityCheckState, selectAndReveal, setAction, setActionActivationCode, setCompatibilityMode, setDocumentProvider, setDocumentSection, setEditorContextMenuId, setFocus, setHelpContextId, setHighlightRange, setInput, setKeyBindingScopes, setKeyBindingScopes, setLanguageHelp, setPreferenceStore, setRangeIndicator, setRulerContextMenuId, setSourceViewerConfiguration, setStatusField, showChangeInformation, showHighlightRangeOnly, showsHighlightRangeOnly, updateProfile, updateProfile, updateState, updateStatusFields, validateState, widgetContentsSet, widgetOffset2ModelOffset
 
Methods inherited from class org.eclipse.ui.part.EditorPart
getEditorInput, getEditorSite, getTitleToolTip, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
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.IEditorPart
getEditorInput, getEditorSite
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 

 

Field Detail

 

 

EDITOR_CONTEXT_MENU_ID

public static final String EDITOR_CONTEXT_MENU_ID

This editor's pop-up (context) menu id ("#TextEditorContext").

See Also:
Constant Field Values


 

 

RULER_CONTEXT_MENU_ID

public static final String RULER_CONTEXT_MENU_ID

This editor's ruler pop-up (context) menu id ("#LpexTextRulerContext").

See Also:
Constant Field Values
Constructor Detail

 

 

LpexTextEditor

public LpexTextEditor()

Creates a new LPEX text editor.

Method Detail

 

 

initializeEditor

protected void initializeEditor()

Initializes this editor. This method is called during the construction of LpexAbstractDecoratedTextEditor.

Overrides:
initializeEditor in class LpexAbstractDecoratedTextEditor


 

 

dispose

public void dispose()

Disposes of this workbench part. This is the last method called on the IWorkbenchPart. At this point, the part controls (if they were ever created) have been disposed as part of an SWT composite. There is no guarantee that createPartControl() has been called, so the part controls may never have been created. Within this method, a part may release any resources, fonts, images, etc. held by it. It is also very important to deregister all listeners from the workbench. Clients should not call this method - the workbench calls this method at appropriate times.

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class LpexAbstractDecoratedTextEditor

See Also:
IWorkbenchPart.dispose()


 

 

installEncodingSupport

protected void installEncodingSupport()

Installs the default encoding support on the given LPEX text editor. Subclasses may override to install their own encoding support or to disable the default encoding support.


 

 

isSaveAsAllowed

public boolean isSaveAsAllowed()

The LpexTextEditor implementation of this EditorPart method returns true.

Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Overrides:
isSaveAsAllowed in class LpexAbstractTextEditor

Returns:
false
See Also:
EditorPart.isSaveAsAllowed()


 

 

performSaveAs

protected void performSaveAs(org.eclipse.core.runtime.IProgressMonitor progressMonitor)

The LpexTextEditor implementation of this AbstractTextEditor method prompts the user for the workspace path of a file resource, and saves the document there.

Overrides:
performSaveAs in class LpexAbstractTextEditor

Parameters:
progressMonitor - the progress monitor to be used
See Also:
performSaveAs(IProgressMonitor,String), performSaveAs(IProgressMonitor,IFile)


 

 

performSaveAs

protected void performSaveAs(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
                             String fileName)

The LpexTextEditor implementation of this method prompts the user for the workspace path of a file resource, and saves the document there.

Overrides:
performSaveAs in class LpexAbstractTextEditor

Parameters:
progressMonitor - the progress monitor to be used
fileName - initial file name in the dialog
See Also:
performSaveAs(IProgressMonitor), performSaveAs(IProgressMonitor,IFile)


 

 

performSaveAs

protected void performSaveAs(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
                             org.eclipse.core.resources.IFile original)

The LpexTextEditor implementation of this method prompts the user for the workspace path of a file resource, and saves the document there.

All the 'save as' operations (Eclipse "File" -> "Save file As...", Eclipse workbench toolbar, LPEX saveAs action, LPEX save prompt command) eventually use this method to put up the "Save File As" dialog.

Parameters:
progressMonitor - the progress monitor to be used
original - initial file in the dialog
See Also:
performSaveAs(IProgressMonitor), performSaveAs(IProgressMonitor,String)


 

 

createActions

protected void createActions()

Description copied from class: LpexAbstractTextEditor
Creates this editor's standard actions.

Actions handled in here are the standard Eclipse editor actions defined in ITextEditorActionConstants (and IWorkbenchActionConstants), and some of the context menu actions.

The standard editor actions will be connected to the workbench global actions in LpexContextContributor -> BasicTextEditorActionContributor (see #doSetActiveEditor(): setGlobalActionHandler() for ITextEditorActionConstants.UNDO, REDO, CUT, COPY, PASTE, DELETE, SELECT_ALL, FIND, PRINT, REVERT; and setAction() for retargeted ITextEditorActionConstants.FIND_NEXT, FIND_PREVIOUS, FIND_INCREMENTAL, GOTO_LINE).

For LPEX's contributions to the Eclipse context, see LpexContextContributor.

Subclasses may extend this method.

Overrides:
createActions in class LpexAbstractDecoratedTextEditor


 

 

getStatusHeader

protected String getStatusHeader(org.eclipse.core.runtime.IStatus status)

Description copied from class: LpexStatusTextEditor
Returns a header for the given status.

Overrides:
getStatusHeader in class LpexStatusTextEditor

Parameters:
status - the status whose message is returned
Returns:
a header for the given status


 

 

getStatusBanner

protected String getStatusBanner(org.eclipse.core.runtime.IStatus status)

Description copied from class: LpexStatusTextEditor
Returns a banner for the given status.

Overrides:
getStatusBanner in class LpexStatusTextEditor

Parameters:
status - the status whose message is returned
Returns:
a banner for the given status


 

 

getStatusMessage

protected String getStatusMessage(org.eclipse.core.runtime.IStatus status)

Description copied from class: LpexStatusTextEditor
Returns a message for the given status.

Overrides:
getStatusMessage in class LpexStatusTextEditor

Parameters:
status - the status whose message is returned
Returns:
a message for the given status


 

 

doSetInput

protected void doSetInput(org.eclipse.ui.IEditorInput input)
                   throws org.eclipse.core.runtime.CoreException

Description copied from class: LpexAbstractTextEditor
Internal processing of setting/changing the input to this editor. Called from init() (shortly after the part construction), from setInput(), and from handleEditorInputChanged().

Overrides:
doSetInput in class LpexStatusTextEditor

Throws:
org.eclipse.core.runtime.CoreException


 

 

getAdapter

public Object getAdapter(Class adapter)

Description copied from class: LpexAbstractTextEditor
Return the object which is an instance of the given class associated with this object, or null if no such object can be found.

IAdaptable is an interface for an adaptable object. Adaptable objects can be dynamically extended to provide different interfaces (or "adapters"). Adapters are created by adapter factories, which are in turn managed by type by adapter managers.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class LpexAbstractDecoratedTextEditor


 

 

updatePropertyDependentActions

protected void updatePropertyDependentActions()

Description copied from class: LpexAbstractTextEditor
Updates all property dependent actions.

Overrides:
updatePropertyDependentActions in class LpexAbstractTextEditor


 

Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD