|
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.Objectcom.ibm.etools.iseries.edit.language.model.DdsCursorListener
public class DdsCursorListener
This class listens to element changes in the currently active Lpex view
and
notifies a set of listeners which DdsModel
statement is currently selected.
Field Summary |
---|
Fields inherited from interface com.ibm.etools.iseries.edit.views.IDdsParserAdapter |
---|
copyright |
Constructor Summary | |
---|---|
DdsCursorListener(LpexTextEditor editor,
DdsModelLpexAdapter modelAdapter)
Construct a LpexView cursor listener that will broadcast to registered listeners the newly selected DDS element |
Method Summary | |
---|---|
void |
addStatementSelectionListener(IDdsParserListener listener)
The adapter is to add a selection listener to its list of listeners. |
void |
elementChanged(LpexView lpexView)
We spin off the updating of views dependent on the cursor position to a separate thread so that the cursor movement itself is not bogged down by synchronous updates. |
IDdsElementWithSource |
getCurrentSelection()
Get the currently selected DDS element |
IDdsElementWithSource |
getDdsElementOnLine(int currentLine)
From the line index of the selection in the LpexView compute the selected DDS Model object and return it. |
DdsModel |
getDdsModel()
Returns DDS Model and returns null if it has not been parsed yet |
DdsType |
getDdsType()
Return the type of DDS in the DDS member being edited |
boolean |
getReadOnlyState()
Is the DDS source read-only/ |
void |
initializeLpexView(LpexView newView)
|
protected void |
lineDeleted(int elementBeingDeleted,
LpexView view)
Let the updating thread know that the given element has been deleted so it should update the cursored line accordingly |
protected void |
notifyParserListenerOfDisable()
Notify all DDS Parser listeners that the DDS model is out of synch The UI can then disable itself |
protected void |
notifyParserListenerOfRefresh(IDdsElementWithSource ddsElement)
Notify all DDS Parser listeners that the DDS model selection has changed. |
protected void |
notifyParserListenerOfRefresh(int lineInLpex)
Notify all DDS Parser listeners that the DDS model selection has changed. |
protected void |
notifyParserListenerOfSelect(IDdsElementWithSource ddsElement)
Notify all DDS Parser listeners that the DDS model selection has changed If nothing is selected, it will be called with null Convenience method that does not skip any listeners |
protected void |
notifyParserListenerOfSelect(IDdsElementWithSource ddsElement,
boolean[] initiatingListeners)
Notify all DDS Parser listeners that the DDS model selection has changed. |
void |
removeSelectionListener(IDdsParserListener listener)
The adapter is to remove a listener from its list of listeners. |
void |
setEditor(LpexTextEditor editor)
Set up listeners so cursor in editor will synchronize with Outline View and WebSetting View. |
void |
setUndoCheckpoint()
Set undo checkpoint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DdsCursorListener(LpexTextEditor editor, DdsModelLpexAdapter modelAdapter)
Method Detail |
---|
public void setEditor(LpexTextEditor editor)
editor
- public void addStatementSelectionListener(IDdsParserListener listener)
IDdsParserAdapter
IDdsParserListener.selected()
method is called.
If the DDS model is being rebuilt the IDdsParserListener.disable()
method will be called so the UI can disable itself until it receives another
selected() call.
If the entire adapter has to go away (unfortunately Lpex editor blows away the
parser under some circumstances) then the IDdsParserListener.disconnect()
method will be called.
When a listener is added, this will have the side effect of making sure a DDS
model is created for the associated editer
addStatementSelectionListener
in interface IDdsParserAdapter
public void removeSelectionListener(IDdsParserListener listener)
IDdsParserAdapter
removeSelectionListener
in interface IDdsParserAdapter
public IDdsElementWithSource getCurrentSelection()
IDdsParserAdapter
getCurrentSelection
in interface IDdsParserAdapter
public boolean getReadOnlyState()
IDdsParserAdapter
getReadOnlyState
in interface IDdsParserAdapter
protected void notifyParserListenerOfSelect(IDdsElementWithSource ddsElement)
ddsElement
- protected void notifyParserListenerOfSelect(IDdsElementWithSource ddsElement, boolean[] initiatingListeners)
ddsElement
- - selected DdsStatement
initiatingListeners
- - array of boolean indicating if we should skip the initating listenerprotected void notifyParserListenerOfRefresh(int lineInLpex)
lineInLpex
- - the current line in Lpexprotected void notifyParserListenerOfRefresh(IDdsElementWithSource ddsElement)
ddsElement
- - selected IDdsElementWithSource
skipListener
- - array of boolean indicating if we should skip the indexed listenerprotected void notifyParserListenerOfDisable()
public IDdsElementWithSource getDdsElementOnLine(int currentLine)
DdsStatement
containing the selected linepublic DdsModel getDdsModel()
com.ibm.etools.iseries.editor.views.IDdsParserAdapter#getDdsModel()
public DdsType getDdsType()
IDdsParserAdapter
getDdsType
in interface IDdsParserAdapter
public void setUndoCheckpoint()
setUndoCheckpoint
in interface IDdsParserAdapter
public void elementChanged(LpexView lpexView)
com.ibm.etools.iseries.editor.ISeriesEditorParser#elementChanged(com.ibm.lpex.core.LpexView)
protected void lineDeleted(int elementBeingDeleted, LpexView view)
public void initializeLpexView(LpexView newView)
initializeLpexView
in interface ILpexViewInitializer
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |