Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.language.model
Class DdsDocumentListener

java.lang.Object
  extended by com.ibm.etools.iseries.edit.language.model.DdsDocumentListener

public class DdsDocumentListener
extends Object

DdsDocumentListener listens to any changes made to the document currently associated with the editor. It keeps track of the lines which are changed/inserted/deleted, debounces these changes, and creates a Timer task to update the model.


Constructor Summary
DdsDocumentListener(LpexTextEditor editor, DdsModelLpexAdapter modelAdapter)
          Constructor - change list is created and processing thread is started
 
Method Summary
 void documentAboutToBeChanged(DocumentEvent event)
          Add to _pendingChanges any deletes that have occurred We need to do this in the context of the document before it is changed, so that we can resolve line boundaries etc.
 void documentChanged(DocumentEvent event)
           
 boolean isModelInSyncWithEditor()
          Have all pending changes been processed.
 void partActivated(IWorkbenchPartReference partRef)
           
 void partBroughtToTop(IWorkbenchPartReference partRef)
           
 void partClosed(IWorkbenchPartReference partRef)
           
 void partDeactivated(IWorkbenchPartReference partRef)
           
 void partHidden(IWorkbenchPartReference partRef)
           
 void partInputChanged(IWorkbenchPartReference partRef)
           
 void partOpened(IWorkbenchPartReference partRef)
           
 void partVisible(IWorkbenchPartReference partRef)
           
 void startListening()
          Start listening to document changes
 void stopListening()
          Stop listening to document changes
 void waitForModelToGetInSyncWithEditor()
          When this method returns, there will be no pending changes to be processed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DdsDocumentListener

public DdsDocumentListener(LpexTextEditor editor,
                           DdsModelLpexAdapter modelAdapter)
Constructor - change list is created and processing thread is started

Method Detail

documentAboutToBeChanged

public void documentAboutToBeChanged(DocumentEvent event)
Add to _pendingChanges any deletes that have occurred We need to do this in the context of the document before it is changed, so that we can resolve line boundaries etc.

See Also:
IDocumentListener

documentChanged

public void documentChanged(DocumentEvent event)

waitForModelToGetInSyncWithEditor

public void waitForModelToGetInSyncWithEditor()
When this method returns, there will be no pending changes to be processed


isModelInSyncWithEditor

public boolean isModelInSyncWithEditor()
Have all pending changes been processed.


stopListening

public void stopListening()
Stop listening to document changes


startListening

public void startListening()
Start listening to document changes


partActivated

public void partActivated(IWorkbenchPartReference partRef)

partBroughtToTop

public void partBroughtToTop(IWorkbenchPartReference partRef)

partDeactivated

public void partDeactivated(IWorkbenchPartReference partRef)

partHidden

public void partHidden(IWorkbenchPartReference partRef)

partOpened

public void partOpened(IWorkbenchPartReference partRef)

partVisible

public void partVisible(IWorkbenchPartReference partRef)

partClosed

public void partClosed(IWorkbenchPartReference partRef)

partInputChanged

public void partInputChanged(IWorkbenchPartReference partRef)

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.