|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object LpexTextEditor com.ibm.etools.systems.editor.SystemTextEditor
public class SystemTextEditor
Nested Class Summary | |
---|---|
protected class |
SystemTextEditor.SystemTextEditorAction
Inner class to be used as vertical ruler double click action |
Field Summary | |
---|---|
protected boolean |
_bDebugMode
|
protected boolean |
_bReadOnly
|
protected static PropertyResourceBundle |
_bundleDummy
|
protected ISystemTextEditorContextContributor |
_defaultTextEditorContextContributor
|
protected SystemTextFileDocumentProvider |
_documentProvider
|
protected ISystemTextEditorAdapterContributor |
_languageAdapterFactory
|
protected LpexView |
_lpexView
|
protected LpexParser |
_menubarParser
|
protected IMenuManager |
_menuManager
|
protected ISystemTextEditorProfile |
_profile
|
protected IToolBarManager |
_toolBarManager
|
protected LpexParser |
_toolbarParser
|
protected LpexSourceViewer |
_viewer
|
protected StructuredSelection |
compileObject
|
static String |
Copyright
|
Constructor Summary | |
---|---|
SystemTextEditor()
Constructor for SystemTextEditor |
Method Summary | |
---|---|
protected void |
addDebugEditorMenuActions(IMenuManager menu,
boolean isDebuggable,
int currentElement)
|
protected void |
addDebugEditorRulerActions(IMenuManager menu,
boolean isDebuggable,
int currentElement)
|
void |
addEditorContentsReplacedListener(ISystemTextEditorContentsReplacedListener listener)
There are a couple of ways the entire contents of the editor can be replaced. |
void |
addLpexViewInitializer(ILpexViewInitializer initializer)
Add initializer to handle new Lpex view |
protected boolean |
availableOpenNewView(LpexView lpexView)
Disable the 'View>Open new view' editor popup menu item if the user has set splitWindow off We do not want to allow external views related to performLpexCommand() |
void |
cleanupMenuBar()
Method cleanupMenuBar. |
void |
cleanupToolBar()
The tool bar context in the editor is being switched. |
void |
clearCurrentExecutionPointHighlighting()
|
protected void |
createActions()
Creates actions for the menu bars. |
protected MenuManager |
createContextMenuManager(String text,
String id)
|
protected void |
createDebugMenuActions()
|
protected void |
createDebugRulerActions()
|
void |
createPartControl(Composite parent)
|
protected ISourceViewer |
createSourceViewer(Composite parent,
IVerticalRuler ruler,
int styles)
|
void |
doSave(IProgressMonitor progressMonitor)
|
protected void |
doSetInput(IEditorInput input)
Overrides the Lpex's method so that the title may be set properly. |
protected void |
editorContextMenuAboutToShow(IMenuManager menu)
|
Object |
getAdapter(Class classRequired)
Delegates the giving of adapters to the parser and then to the language adapter factory |
static List |
getBreakpointMarkersFromResource(IResource resource,
int lineNumber)
Returns all markers on the editor's input which include the ruler's line of activity. |
protected IAction |
getBreakpointRulerAction()
|
StructuredSelection |
getCompileSelectionObject()
Optimized access to the compile object |
String |
getContent()
Get the editor content |
static IDebugTarget |
getCurrentDebugTarget()
Returns the currently selected debug target in the Debug View Returns the first IDebugTarget in the selection
If no debug target is selected, this method returns null. |
IDocument |
getDocument()
Returns the IDocument representing the edited document Implement @see ISystemSourceEditor requirements |
ISystemTextEditorProfile |
getEditorProfile()
Returns the profile associated with this editor instance. |
IFile |
getFile()
Implement @see ISystemSourceEditor requirements |
IFile |
getIFile()
Method getIFile. |
String |
getLanguage()
Returns the language string from the parser |
ISystemTextEditorAdapterContributor |
getLanguageAdapterFactory()
The language adapter factor is set by the language specific parser. |
IMenuManager |
getMenuManager()
Returns the menu manager previously set by the context contributor. |
ISystemTextEditor |
getSystemTextEditor()
|
String |
getTitle()
Get the editor title |
IToolBarManager |
getToolBarManager()
Returns the toolbar manager previously set by the context contributor. |
void |
gotoLine(int line)
|
void |
gotoLine(int line,
boolean highlight)
|
void |
gotoLine(int line,
boolean highlight,
String colourString)
|
protected void |
handleElementContentReplaced()
Notification: - IDocument content (consequently, LPEX text widget content) was (re)set. |
void |
initializeLpexView(LpexView lpexView)
Initializes the Lpex view. |
boolean |
isDirty()
|
boolean |
isEditable()
Overrides LpexAbstractTextEditor |
protected boolean |
isEditorInputIncludedInContextMenu()
|
protected boolean |
isLineDebuggable(int iLine)
Determines whether a line is debuggable by asking the parser. |
boolean |
isLocal()
Queries whether the origin of the file is local. |
protected boolean |
isPrefQuickDiffAlwaysOn()
Returns |
boolean |
isRemote()
Queries whether the origin of the file is remote. |
protected static boolean |
isTargetDebuggable(IDebugTarget dbgtarget)
|
void |
loadProfile()
Loads the editor profile for the file being edited. |
void |
notifyLpexViewInitializers(LpexView newView)
Notifies other lpex initializers of new view This is required by Edmund Reinhardt |
void |
parse()
Parse the current text showing in the editor. |
protected boolean |
performLpexCommand(LpexView lpexView)
Returns true to ensure that external Lpex Windows are not opened if window splitting
is disabled or the current window can no longer be split. |
void |
performSaveAs(IProgressMonitor progressMonitor)
Calls the profile's performSaveAs function. |
void |
performSaveAs(IProgressMonitor progressMonitor,
IFile file)
Calls the profile's performSaveAs function. |
void |
performSaveAs(IProgressMonitor progressMonitor,
String strFileName)
Calls the profile's performSaveAs function. |
void |
refresh()
|
protected void |
registerSourceViewerConfiguration(LpexView view)
|
void |
removeEditorContentsReplacedListener(ISystemTextEditorContentsReplacedListener listener)
Remove listener from being notified of the editor content's being replaced. |
void |
removeLpexViewInitializer(ILpexViewInitializer initializer)
Remove initalizer from being notified of the creation of a new Lpex view. |
protected void |
resetMarkers()
|
protected void |
rulerContextMenuAboutToShow(IMenuManager menu)
Presents breakpoint popup menu actions for debuggable lines. |
void |
selectionChanged(IWorkbenchPart part,
ISelection selection)
|
void |
selectText(int charStart,
int charEnd)
|
void |
setContent(String content)
Set the editor content |
void |
setDebugMode(boolean bDebugMode)
Sets debug mode and notifies the parsers of the mode change. |
void |
setEditorInput(IEditorInput input)
|
void |
setLanguageAdapterFactory(ISystemTextEditorAdapterContributor languageAdapterFactory)
|
void |
setReadOnly(boolean bReadOnly)
Specify whether editor should be in read only mode or not |
void |
switchMenuBarContext(IMenuManager menuManager)
The menu bar context in the editor is being switched. |
void |
switchToolBarContext(IToolBarManager toolBarManager)
The tool bar context in the editor is being switched. |
void |
updateDirtyIndicator()
|
void |
updateProfile(LpexView lpexView)
|
void |
updateTitle()
|
protected void |
widgetContentsSet(LpexView lpexView)
Notification: - LPEX text widget content was (re)set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
protected ISystemTextEditorProfile _profile
protected ISystemTextEditorContextContributor _defaultTextEditorContextContributor
protected IMenuManager _menuManager
protected IToolBarManager _toolBarManager
protected LpexParser _toolbarParser
protected LpexParser _menubarParser
protected SystemTextFileDocumentProvider _documentProvider
protected LpexSourceViewer _viewer
protected boolean _bDebugMode
protected LpexView _lpexView
protected boolean _bReadOnly
protected StructuredSelection compileObject
protected ISystemTextEditorAdapterContributor _languageAdapterFactory
protected static PropertyResourceBundle _bundleDummy
Constructor Detail |
---|
public SystemTextEditor()
Method Detail |
---|
public void cleanupMenuBar()
public void cleanupToolBar()
protected void createActions()
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles)
public void doSave(IProgressMonitor progressMonitor)
protected void doSetInput(IEditorInput input) throws CoreException
CoreException
protected void editorContextMenuAboutToShow(IMenuManager menu)
public Object getAdapter(Class classRequired)
ISystemTextEditorAdapterContributor
,
getLanguageAdapterFactory()
public ISystemTextEditorAdapterContributor getLanguageAdapterFactory()
public void setLanguageAdapterFactory(ISystemTextEditorAdapterContributor languageAdapterFactory)
langugeAdapterFactory
- The langugeAdapterFactory to set.public String getContent()
public ISystemTextEditorProfile getEditorProfile()
public static IDebugTarget getCurrentDebugTarget()
IDebugTarget
in the selection
If no debug target is selected, this method returns null.
protected boolean performLpexCommand(LpexView lpexView)
true
to ensure that external Lpex Windows are not opened if window splitting
is disabled or the current window can no longer be split.
com.ibm.lpex.alef.LpexAbstractTextEditor#performLpexCommand(com.ibm.lpex.core.LpexView)
protected boolean availableOpenNewView(LpexView lpexView)
public boolean isEditable()
public boolean isLocal()
public boolean isRemote()
public IMenuManager getMenuManager()
public String getLanguage()
public String getTitle()
public IToolBarManager getToolBarManager()
public void gotoLine(int line)
public void gotoLine(int line, boolean highlight, String colourString)
public void gotoLine(int line, boolean highlight)
public void selectText(int charStart, int charEnd)
protected boolean isLineDebuggable(int iLine)
public void loadProfile()
public void parse()
public void performSaveAs(IProgressMonitor progressMonitor, String strFileName)
public void performSaveAs(IProgressMonitor progressMonitor, IFile file)
public void updateTitle()
public void performSaveAs(IProgressMonitor progressMonitor)
protected void registerSourceViewerConfiguration(LpexView view)
protected void rulerContextMenuAboutToShow(IMenuManager menu)
public void setContent(String content)
the
- text that the editor should displaypublic void setDebugMode(boolean bDebugMode)
public void setReadOnly(boolean bReadOnly)
true
- if read-only is required, false otherwisepublic void switchMenuBarContext(IMenuManager menuManager)
public void switchToolBarContext(IToolBarManager toolBarManager)
public void updateProfile(LpexView lpexView)
com.ibm.lpex.alef.LpexAbstractTextEditor#updateProfile(com.ibm.lpex.core.LpexView)
public void selectionChanged(IWorkbenchPart part, ISelection selection)
ISelectionListener
protected void resetMarkers()
protected IAction getBreakpointRulerAction()
protected void createDebugRulerActions()
protected void createDebugMenuActions()
protected void addDebugEditorMenuActions(IMenuManager menu, boolean isDebuggable, int currentElement)
protected void addDebugEditorRulerActions(IMenuManager menu, boolean isDebuggable, int currentElement)
protected static boolean isTargetDebuggable(IDebugTarget dbgtarget)
public boolean isDirty()
public void updateDirtyIndicator()
public void refresh()
public static List getBreakpointMarkersFromResource(IResource resource, int lineNumber)
public void clearCurrentExecutionPointHighlighting()
public void addEditorContentsReplacedListener(ISystemTextEditorContentsReplacedListener listener)
ISystemTextEditorContentsReplacedListener
and calling #addEditorContentsReplacedListener(IEditorContentsReplacedListener)
public void removeEditorContentsReplacedListener(ISystemTextEditorContentsReplacedListener listener)
listener
- ISystemTextEditorContentsReplacedListener
protected void widgetContentsSet(LpexView lpexView)
com.ibm.lpex.alef.LpexAbstractTextEditor#widgetContentsSet(com.ibm.lpex.core.LpexView)
protected void handleElementContentReplaced()
com.ibm.lpex.alef.LpexAbstractTextEditor#handleElementContentReplaced()
public void createPartControl(Composite parent)
public void initializeLpexView(LpexView lpexView)
public void notifyLpexViewInitializers(LpexView newView)
newView
- new lpex viewpublic void addLpexViewInitializer(ILpexViewInitializer initializer)
initializer
- ILpexViewInitializer
public void removeLpexViewInitializer(ILpexViewInitializer initializer)
initializer
- ILpexViewInitializer
public StructuredSelection getCompileSelectionObject()
protected boolean isEditorInputIncludedInContextMenu()
public ISystemTextEditor getSystemTextEditor()
com.ibm.etools.systems.core.resources.ISystemEditor#getSystemTextEditor()
public void setEditorInput(IEditorInput input)
com.ibm.etools.systems.core.resources.ISystemEditor#setEditorInput(org.eclipse.ui.IEditorInput)
protected boolean isPrefQuickDiffAlwaysOn()
com.ibm.lpex.alef.LpexAbstractDecoratedTextEditor#isPrefQuickDiffAlwaysOn()
public IFile getIFile()
editor
- the editor in which the source is open
protected MenuManager createContextMenuManager(String text, String id)
com.ibm.lpex.alef.LpexAbstractTextEditor#createContextMenuManager(java.lang.String, java.lang.String)
public IFile getFile()
ISystemSourceEditor
requirements
public IDocument getDocument()
ISystemSourceEditor
requirements
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |