|
SWT LPEX v3.0.5 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
com.ibm.lpex.alef.LpexAbstractTextEditor
com.ibm.lpex.alef.LpexStatusTextEditor
com.ibm.lpex.alef.LpexAbstractDecoratedTextEditor
com.ibm.lpex.alef.LpexTextEditor
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
.
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(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(IStatus status)
Returns a banner for the given status. |
protected String |
getStatusHeader(IStatus status)
Returns a header for the given status. |
protected String |
getStatusMessage(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(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(IProgressMonitor progressMonitor,
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(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 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 |
public static final String EDITOR_CONTEXT_MENU_ID
"#TextEditorContext"
).
public static final String RULER_CONTEXT_MENU_ID
"#LpexTextRulerContext"
).
Constructor Detail |
public LpexTextEditor()
Method Detail |
protected void initializeEditor()
initializeEditor
in class LpexAbstractDecoratedTextEditor
public void dispose()
dispose
in interface IWorkbenchPart
dispose
in class LpexAbstractDecoratedTextEditor
IWorkbenchPart.dispose()
protected void installEncodingSupport()
public boolean isSaveAsAllowed()
EditorPart
method returns true
.
isSaveAsAllowed
in interface ISaveablePart
isSaveAsAllowed
in class LpexAbstractTextEditor
false
EditorPart.isSaveAsAllowed()
protected void performSaveAs(IProgressMonitor progressMonitor)
AbstractTextEditor
method prompts the user for the workspace path of a file resource, and saves
the document there.
performSaveAs
in class LpexAbstractTextEditor
progressMonitor
- the progress monitor to be usedperformSaveAs(IProgressMonitor,String)
,
performSaveAs(IProgressMonitor,IFile)
protected void performSaveAs(IProgressMonitor progressMonitor, String fileName)
performSaveAs
in class LpexAbstractTextEditor
progressMonitor
- the progress monitor to be usedfileName
- initial file name in the dialogperformSaveAs(IProgressMonitor)
,
performSaveAs(IProgressMonitor,IFile)
protected void performSaveAs(IProgressMonitor progressMonitor, IFile original)
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.
progressMonitor
- the progress monitor to be usedoriginal
- initial file in the dialogperformSaveAs(IProgressMonitor)
,
performSaveAs(IProgressMonitor,String)
protected void createActions()
LpexAbstractTextEditor
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.
createActions
in class LpexAbstractDecoratedTextEditor
protected String getStatusHeader(IStatus status)
LpexStatusTextEditor
getStatusHeader
in class LpexStatusTextEditor
status
- the status whose message is returned
protected String getStatusBanner(IStatus status)
LpexStatusTextEditor
getStatusBanner
in class LpexStatusTextEditor
status
- the status whose message is returned
protected String getStatusMessage(IStatus status)
LpexStatusTextEditor
getStatusMessage
in class LpexStatusTextEditor
status
- the status whose message is returned
protected void doSetInput(IEditorInput input) throws CoreException
LpexAbstractTextEditor
This method does the actual setting of the editor input. It closes the editor
if input
is null
. It disconnects from any previous
editor input and its document provider, and connects to the new one.
Subclasses may extend.
doSetInput
in class LpexStatusTextEditor
CoreException
public Object getAdapter(Class adapter)
LpexAbstractTextEditor
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.
getAdapter
in interface IAdaptable
getAdapter
in class LpexAbstractDecoratedTextEditor
protected void updatePropertyDependentActions()
LpexAbstractTextEditor
updatePropertyDependentActions
in class LpexAbstractTextEditor
|
SWT LPEX v3.0.5 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |