org.drools.eclipse.dsl.editor
Class TransformedDocument

java.lang.Object
  extended by org.eclipse.jface.text.AbstractDocument
      extended by org.drools.eclipse.dsl.editor.TransformedDocument
All Implemented Interfaces:
org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocumentExtension, org.eclipse.jface.text.IDocumentExtension2, org.eclipse.jface.text.IDocumentExtension3, org.eclipse.jface.text.IDocumentExtension4, org.eclipse.jface.text.IRepairableDocument, org.eclipse.jface.text.IRepairableDocumentExtension
Direct Known Subclasses:
DSLtoDRLDocument

public abstract class TransformedDocument
extends org.eclipse.jface.text.AbstractDocument

A document that transforms the input of the original document to something else. Changing something in this document will NOT change the original document (as the transformation is only defined in one way). All changes will also be overridden as soon as the original document changes.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jface.text.IDocumentExtension
org.eclipse.jface.text.IDocumentExtension.IReplace
 
Field Summary
 
Fields inherited from interface org.eclipse.jface.text.IDocument
DEFAULT_CATEGORY, DEFAULT_CONTENT_TYPE
 
Fields inherited from interface org.eclipse.jface.text.IDocumentExtension3
DEFAULT_PARTITIONING
 
Fields inherited from interface org.eclipse.jface.text.IDocumentExtension4
UNKNOWN_MODIFICATION_STAMP
 
Constructor Summary
TransformedDocument(org.eclipse.jface.text.IDocument parentDocument)
           
 
Method Summary
protected  org.eclipse.jface.text.ITextStore getStore()
          Always check that the store is up-to-date.
protected abstract  String transformInput(String content)
          Transforms the original content of the document.
 
Methods inherited from class org.eclipse.jface.text.AbstractDocument
acceptPostNotificationReplaces, addDocumentListener, addDocumentPartitioningListener, addDocumentRewriteSessionListener, addPosition, addPosition, addPositionCategory, addPositionUpdater, addPrenotifiedDocumentListener, checkStateOfPartitioner, completeInitialization, computeIndexInCategory, computeIndexInPositionList, computeIndexInPositionList, computeNumberOfLines, computePartitioning, computePartitioning, containsPosition, containsPositionCategory, doFireDocumentChanged, doFireDocumentChanged, doFireDocumentChanged2, fireDocumentAboutToBeChanged, fireDocumentChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireRewriteSessionChanged, get, get, getActiveRewriteSession, getChar, getContentType, getContentType, getDefaultLineDelimiter, getDocumentListeners, getDocumentManagedPositions, getDocumentPartitioner, getDocumentPartitioner, getDocumentPartitioningListeners, getLegalContentTypes, getLegalContentTypes, getLegalLineDelimiters, getLength, getLineDelimiter, getLineInformation, getLineInformationOfOffset, getLineLength, getLineOffset, getLineOfOffset, getModificationStamp, getNumberOfLines, getNumberOfLines, getPartition, getPartition, getPartitionings, getPositionCategories, getPositions, getPositions, getPositionUpdaters, getTracker, ignorePostNotificationReplaces, insertPositionUpdater, isLineInformationRepairNeeded, registerPostNotificationReplace, removeDocumentListener, removeDocumentPartitioningListener, removeDocumentRewriteSessionListener, removePosition, removePosition, removePositionCategory, removePositionUpdater, removePrenotifiedDocumentListener, repairLineInformation, replace, replace, resumeListenerNotification, resumePostNotificationProcessing, search, set, set, setDocumentPartitioner, setDocumentPartitioner, setInitialLineDelimiter, setLineTracker, setTextStore, startRewriteSession, startRewriteSessionOnPartitioners, startSequentialRewrite, stopListenerNotification, stopPostNotificationProcessing, stopRewriteSession, stopRewriteSessionOnPartitioners, stopSequentialRewrite, updateDocumentStructures, updatePositions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformedDocument

public TransformedDocument(org.eclipse.jface.text.IDocument parentDocument)
Method Detail

getStore

protected org.eclipse.jface.text.ITextStore getStore()
Always check that the store is up-to-date. All read operations access the store so this method makes sure that the document is updated whenever necessary.

Overrides:
getStore in class org.eclipse.jface.text.AbstractDocument

transformInput

protected abstract String transformInput(String content)
Transforms the original content of the document.



Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.