|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object EditorPart com.ibm.lpex.alef.LpexAbstractTextEditor com.ibm.lpex.alef.LpexStatusTextEditor com.ibm.lpex.alef.LpexAbstractDecoratedTextEditor com.ibm.lpex.alef.LpexTextEditor
public class 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 id is defined in EDITOR_CONTEXT_MENU_ID
;
its ruler context menu id is defined in RULER_CONTEXT_MENU_ID
.
LpexAbstractTextEditor
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ibm.lpex.alef.LpexAbstractTextEditor |
---|
LpexAbstractTextEditor.ColumnSupport, LpexAbstractTextEditor.IdMapEntry, LpexAbstractTextEditor.TextEditorSavable |
Field Summary | |
---|---|
static String |
EDITOR_CONTEXT_MENU_ID
This editor's pop-up (context) menu id ( "#LpexTextEditorContext" ). |
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, fSourceViewerDecorationSupport |
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 |
updatePropertyDependentActions()
Updates all property dependent actions. |
Methods inherited from class com.ibm.lpex.alef.LpexStatusTextEditor |
---|
createStatusControl, doRevertToSaved, handleEditorInputChanged, handleElementContentReplaced, sanityCheckState, setFocus, updatePartControl, updateStatusField |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EDITOR_CONTEXT_MENU_ID
"#LpexTextEditorContext"
).
public static final String RULER_CONTEXT_MENU_ID
"#LpexTextRulerContext"
).
Constructor Detail |
---|
public LpexTextEditor()
Method Detail |
---|
protected void initializeEditor()
This method configures the editor but does not define a
SourceViewerConfiguration
. When only interested in
providing a custom source viewer configuration, subclasses may extend
this method.
initializeEditor
in class LpexAbstractDecoratedTextEditor
public void dispose()
dispose
in class LpexAbstractDecoratedTextEditor
IWorkbenchPart
protected void installEncodingSupport()
public boolean isSaveAsAllowed()
EditorPart
method returns true
.
isSaveAsAllowed
in class LpexAbstractTextEditor
false
EditorPart
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 LpexAbstractDecoratedTextEditor
input
- the (new) input to be set; if null
, this text editor is being closed
CoreException
- if the input cannot be connected to the document provider (i.e., it is not understood by this part)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 class LpexAbstractDecoratedTextEditor
IAdaptable
protected void updatePropertyDependentActions()
LpexAbstractTextEditor
updatePropertyDependentActions
in class LpexAbstractTextEditor
|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |