|
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 com.ibm.etools.iseries.edit.language.model.DdsModelLpexAdapter
public class DdsModelLpexAdapter
This class manages a DdsModel
for a particular LpexTextEditor
.
It keeps the contents of the editor and model in synch and manages the
broadcasting of selection events.
Nested Class Summary | |
---|---|
class |
DdsModelLpexAdapter.LpexFileReader
|
class |
DdsModelLpexAdapter.LpexSourceFile
This class enables the DDS parser to parse the contents of an Lpex editor |
class |
DdsModelLpexAdapter.ParseDdsModelJob
Asynchronously reparse the DDS file and refresh the outline view This job belongs to the family of jobs that parse the DDS model for this editor. |
class |
DdsModelLpexAdapter.ParseJobScheduler
This class schedules jobs to parse the model from the editor's contents in the background. |
Field Summary |
---|
Fields inherited from interface com.ibm.etools.systems.editor.ISystemTextEditorAdapterContributor |
---|
Copyright |
Fields inherited from interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter |
---|
copyright |
Constructor Summary | |
---|---|
DdsModelLpexAdapter(LpexTextEditor editor)
Constructor if you do not have the connection and CCSID already computed. |
|
DdsModelLpexAdapter(LpexTextEditor editor,
int iCCSID,
IBMiConnection connection)
Constructor used from an ISeriesEditorParser that already has computed the necessary parameters |
Method Summary | |
---|---|
void |
addDdsElementSelectionListener(com.ibm.etools.iseries.edit.propertysheet.dds.IDdsElementSelectionListener listener)
IDdsPropertySheetAdapter implementation
Whenever a different IDdsElement is selected in the editor, this listener
should be notified |
void |
addDdsSelectionListener(IDdsParserListener listener)
Add listener which will be notified whenever the cursor moves to a different DDS element in the source |
String |
convertToAS400Layout(String text)
Convert given text to the ordering scheme of the iSeries |
String |
convertToJavaLayout(String text)
Convert given text to the ordering scheme of the Java |
Object |
getAdapter(LpexTextEditor editor,
Class classRequired)
Adapter factory for creating DDS language model objects |
AS400BidiTransform |
getBidiTransform()
Get the JTOpen transform that is able transform between the BIDI representation on the iSeries and the representation in a Java String. |
IDdsParserAdapter |
getDdsCursorListener()
Return the singleton cursor listener that implements IDdsAdaptable . |
DdsModel |
getDdsModel()
Retrieve DDS model corresponding to the source in the editor. |
DdsModel |
getDdsModelSynchronously()
Retrieve DDS model corresponding to the source in the editor. |
IBMiConnection |
getISeriesConnection(boolean bPromptAllowed)
IDdsPropertySheetAdapter implementation
For the purposes of resolved database references, the DdsPropertySheetPage
needs access to the IBMiConnection |
com.ibm.etools.iseries.edit.language.model.DdsParserListener |
getLpexDdsParserListener()
Get the IDdsParserListener for this Lpex editor. |
DdsModelLpexAdapter.ParseJobScheduler |
getParseJobScheduler()
|
com.ibm.etools.iseries.edit.propertysheet.dds.IPropertySheetTester |
getPropertySheetTester()
IDdsPropertySheetAdapter implementation
Return the tester that will create all of the tabs in the
property sheet in order to test all of the MRI for TVT |
List<IDdsElement> |
getSelectedElement()
IDdsPropertySheetAdapter implementation
Initially the property sheet needs to be able query the current selected IDdsElement |
void |
handleFileRename()
From the editor find the file that is currently being edited Set the current DDS type based on its extension |
boolean |
hasSequenceNumbers()
|
boolean |
incrementallyUpdateModel(DdsChange change)
Update the model with the changed/inserted line If we could not do this return true |
protected void |
initializeDdsModel()
When this object is created - a DdsModel is not immediately created until it is requested by someone. |
boolean |
isDdsModelParsed()
Has the DDS Model been parsed yet? |
boolean |
isDdsModelParsePending()
Is there a DDS parse already in progress |
boolean |
isReadOnly()
Returns whether the input is allowed to be modified. |
DdsModel |
parseDdsModel()
Parse the model |
void |
propertyChangeFromPropertySheetEnded()
IDdsPropertySheetAdapter implementation
This pair of functions notifies the editor when a change to the
model by the property sheet begins and ends. |
void |
propertyChangeFromPropertySheetStarting()
|
void |
refreshModel()
Refresh the model based on the changed source in Lpex. |
void |
removeDdsElementSelectionListener(com.ibm.etools.iseries.edit.propertysheet.dds.IDdsElementSelectionListener listener)
Remove the listener from listening to IDdsElement selections |
void |
setEditor(LpexTextEditor editor)
Set the view for the first time May need to set up listeners Computes the DDS type |
void |
setIFile(IFile file)
|
void |
setISeriesConnection(IBMiConnection connection)
IDdsPropertySheetAdapter implementation
If #getISeriesConnnection(boolean) returns null, then the
local connection will be resolved by the property sheet
and set back to the editor, since it will be required for resolving
database references. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DdsModelLpexAdapter(LpexTextEditor editor, int iCCSID, IBMiConnection connection)
public DdsModelLpexAdapter(LpexTextEditor editor)
Method Detail |
---|
public Object getAdapter(LpexTextEditor editor, Class classRequired)
getAdapter
in interface ISystemTextEditorAdapterContributor
com.ibm.etools.systems.editor.ISystemTextEditorAdapterContributor#getAdapter(com.ibm.lpex.alef.LpexTextEditor, java.lang.Class)
public IDdsParserAdapter getDdsCursorListener()
IDdsAdaptable
.
Lazily create the singleton.
public void addDdsSelectionListener(IDdsParserListener listener)
addDdsSelectionListener
in interface IDdsLanguageModel
listener
- IDdsParserListener
protected void initializeDdsModel()
public void setEditor(LpexTextEditor editor)
initialView
- The Lpex view to set.public void setIFile(IFile file)
file
- The iFile to set.public void handleFileRename()
public DdsModel getDdsModel()
getDdsModel
in interface IDdsLanguageModel
public DdsModel getDdsModelSynchronously()
getDdsModelSynchronously
in interface IDdsLanguageModel
public boolean isDdsModelParsed()
isDdsModelParsed
in interface IDdsLanguageModel
public boolean isDdsModelParsePending()
isDdsModelParsePending
in interface IDdsLanguageModel
public DdsModel parseDdsModel()
public AS400BidiTransform getBidiTransform()
public boolean hasSequenceNumbers()
public String convertToAS400Layout(String text)
text
- public String convertToJavaLayout(String text)
text
- public boolean incrementallyUpdateModel(DdsChange change)
incrementallyUpdateModel
in interface IDdsLanguageModel
change
- - what change occurred it encapsulates
lineNumber - the line number of the line to be changed/inserted
typeOfChange - the type of change of the line - an update or an insert
public void refreshModel()
refreshModel
in interface IDdsLanguageModel
public DdsModelLpexAdapter.ParseJobScheduler getParseJobScheduler()
public void addDdsElementSelectionListener(com.ibm.etools.iseries.edit.propertysheet.dds.IDdsElementSelectionListener listener)
IDdsPropertySheetAdapter
implementation
Whenever a different IDdsElement
is selected in the editor, this listener
should be notified
addDdsElementSelectionListener
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
public void removeDdsElementSelectionListener(com.ibm.etools.iseries.edit.propertysheet.dds.IDdsElementSelectionListener listener)
com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
removeDdsElementSelectionListener
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
public com.ibm.etools.iseries.edit.language.model.DdsParserListener getLpexDdsParserListener()
IDdsParserListener
for this Lpex editor.
Use lazy initialization to create the listener and have it listen to
the DdsCursorListener
.
public List<IDdsElement> getSelectedElement()
IDdsPropertySheetAdapter
implementation
Initially the property sheet needs to be able query the current selected IDdsElement
getSelectedElement
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
public IBMiConnection getISeriesConnection(boolean bPromptAllowed)
IDdsPropertySheetAdapter
implementation
For the purposes of resolved database references, the DdsPropertySheetPage
needs access to the IBMiConnection
getISeriesConnection
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
bPromptAllowed
- - whether or not a GUI prompt is allowed - this parameter
is always false when called from the DdsPropertySheetPage
IBMiConnection
public void setISeriesConnection(IBMiConnection connection)
IDdsPropertySheetAdapter
implementation
If #getISeriesConnnection(boolean)
returns null, then the
local connection will be resolved by the property sheet
and set back to the editor, since it will be required for resolving
database references.
setISeriesConnection
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
connection
- public void propertyChangeFromPropertySheetEnded()
IDdsPropertySheetAdapter
implementation
This pair of functions notifies the editor when a change to the
model by the property sheet begins and ends.
propertyChangeFromPropertySheetEnded
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
public void propertyChangeFromPropertySheetStarting()
propertyChangeFromPropertySheetStarting
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
public com.ibm.etools.iseries.edit.propertysheet.dds.IPropertySheetTester getPropertySheetTester()
IDdsPropertySheetAdapter
implementation
Return the tester that will create all of the tabs in the
property sheet in order to test all of the MRI for TVT
getPropertySheetTester
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
IPropertySheetTester
public boolean isReadOnly()
com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
isReadOnly
in interface com.ibm.etools.iseries.edit.propertysheet.dds.IDdsPropertySheetAdapter
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |