Java Doc for ProjectionDocument.java in  » IDE-Eclipse » text » org » eclipse » jface » text » projection » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » text » org.eclipse.jface.text.projection 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jface.text.AbstractDocument
      org.eclipse.jface.text.projection.ProjectionDocument

All known Subclasses:   org.eclipse.jface.text.projection.ChildDocument,
ProjectionDocument
public class ProjectionDocument extends AbstractDocument (Code)
A ProjectionDocument represents a projection of its master document. The contents of a projection document is a sequence of fragments of the master document, i.e. the projection document can be thought as being constructed from the master document by not copying the whole master document but omitting several ranges of the master document.

The projection document indirectly utilizes its master document as ITextStore by means of a ProjectionTextStore.

The content of a projection document can be changed in two ways. Either by a text replace applied to the master document or the projection document. Or by changing the projection between the master document and the projection document. For the latter the two methods addMasterDocumentRange and removeMasterDocumentRange are provided. For any manipulation, the projection document sends out a org.eclipse.jface.text.projection.ProjectionDocumentEvent describing the change.

Clients are not supposed to directly instantiate this class. In order to obtain a projection document, a org.eclipse.jface.text.projection.ProjectionDocumentManager should be used. This class is not intended to be subclassed outside of its origin package.


since:
   3.0



Constructor Summary
public  ProjectionDocument(IDocument masterDocument)
     Creates a projection document for the given master document.

Method Summary
final protected  booleanadaptProjectionToMasterChange(DocumentEvent masterEvent)
     Ensures that when the master event affects this projection document, that the whole region described by the event is part of this projection document.
public  voidaddMasterDocumentRange(int offsetInMaster, int lengthInMaster)
     Ensures that the given range of the master document is part of this projection document.
final public  IRegion[]computeProjectedMasterRegions(int offsetInMaster, int lengthInMaster)
     Returns the sequence of all master document regions with are contained in the given master document range and which are part of this projection document.
final public  IRegion[]computeUnprojectedMasterRegions(int offsetInMaster, int lengthInMaster)
     Returns the sequence of all master document regions which are contained in the given master document range and which are not yet part of this projection document.
public  voiddispose()
     Disposes this projection document.
protected  voidfireDocumentAboutToBeChanged(DocumentEvent event)
    
protected  voidfireDocumentChanged(DocumentEvent event)
     Ignores the given event and sends the semantically equal slave document event instead.
public  StringgetDefaultLineDelimiter()
    
final protected  Position[]getFragments()
     Returns the fragments of the master documents.
public  IDocumentgetMasterDocument()
     Returns the master document of this projection document.
public  IDocumentInformationMappinggetProjectionMapping()
     Returns the projection mapping used by this document.
final protected  Position[]getSegments()
     Returns the segments of this projection document.
protected  booleanisUpdating()
     Returns whether this projection is being updated.
public  voidmasterDocumentAboutToBeChanged(DocumentEvent masterEvent)
     When called, this projection document is informed about a forthcoming change of its master document.
public  voidmasterDocumentChanged(DocumentEvent masterEvent)
     When called, this projection document is informed about a change of its master document.
public  voidregisterPostNotificationReplace(IDocumentListener owner, IDocumentExtension.IReplace replace)
    
public  voidremoveMasterDocumentRange(int offsetInMaster, int lengthInMaster)
     Ensures that the given range of the master document is not part of this projection document.
public  voidreplace(int offset, int length, String text)
    
public  voidreplaceMasterDocumentRanges(int offsetInMaster, int lengthInMaster)
     Replaces all master document ranges with the given master document range.
public  voidset(String text)
    
public  voidsetAutoExpandMode(boolean autoExpandMode)
     Sets the auto expand mode for this document.
protected  voidupdateDocumentStructures(DocumentEvent event)
    


Constructor Detail
ProjectionDocument
public ProjectionDocument(IDocument masterDocument)(Code)
Creates a projection document for the given master document.
Parameters:
  masterDocument - the master document




Method Detail
adaptProjectionToMasterChange
final protected boolean adaptProjectionToMasterChange(DocumentEvent masterEvent) throws BadLocationException(Code)
Ensures that when the master event affects this projection document, that the whole region described by the event is part of this projection document.
Parameters:
  masterEvent - the master document event true if masterEvent affects this projection document
throws:
  BadLocationException - in case the master event is not valid



addMasterDocumentRange
public void addMasterDocumentRange(int offsetInMaster, int lengthInMaster) throws BadLocationException(Code)
Ensures that the given range of the master document is part of this projection document.
Parameters:
  offsetInMaster - the offset of the master document range
Parameters:
  lengthInMaster - the length of the master document range
throws:
  BadLocationException - in case the master event is not valid



computeProjectedMasterRegions
final public IRegion[] computeProjectedMasterRegions(int offsetInMaster, int lengthInMaster) throws BadLocationException(Code)
Returns the sequence of all master document regions with are contained in the given master document range and which are part of this projection document. May return null if no such regions exist.
Parameters:
  offsetInMaster - the range offset in the master document
Parameters:
  lengthInMaster - the range length in the master document the sequence of regions which are part of the projection document or null
throws:
  BadLocationException - in case the given range is invalid in the master document



computeUnprojectedMasterRegions
final public IRegion[] computeUnprojectedMasterRegions(int offsetInMaster, int lengthInMaster) throws BadLocationException(Code)
Returns the sequence of all master document regions which are contained in the given master document range and which are not yet part of this projection document.
Parameters:
  offsetInMaster - the range offset in the master document
Parameters:
  lengthInMaster - the range length in the master document the sequence of regions which are not yet part of the projectiondocument
throws:
  BadLocationException - in case the given range is invalid in themaster document



dispose
public void dispose()(Code)
Disposes this projection document.



fireDocumentAboutToBeChanged
protected void fireDocumentAboutToBeChanged(DocumentEvent event)(Code)



fireDocumentChanged
protected void fireDocumentChanged(DocumentEvent event)(Code)
Ignores the given event and sends the semantically equal slave document event instead.
Parameters:
  event - the event to be ignored



getDefaultLineDelimiter
public String getDefaultLineDelimiter()(Code)



getFragments
final protected Position[] getFragments()(Code)
Returns the fragments of the master documents. the fragment of the master document



getMasterDocument
public IDocument getMasterDocument()(Code)
Returns the master document of this projection document. the master document of this projection document



getProjectionMapping
public IDocumentInformationMapping getProjectionMapping()(Code)
Returns the projection mapping used by this document. the projection mapping used by this document



getSegments
final protected Position[] getSegments()(Code)
Returns the segments of this projection document. the segments of this projection document



isUpdating
protected boolean isUpdating()(Code)
Returns whether this projection is being updated. true if the document is updating



masterDocumentAboutToBeChanged
public void masterDocumentAboutToBeChanged(DocumentEvent masterEvent)(Code)
When called, this projection document is informed about a forthcoming change of its master document. This projection document checks whether the master document change affects it and if so informs all document listeners.
Parameters:
  masterEvent - the master document event



masterDocumentChanged
public void masterDocumentChanged(DocumentEvent masterEvent)(Code)
When called, this projection document is informed about a change of its master document. If this projection document is affected it informs all of its document listeners.
Parameters:
  masterEvent - the master document event



registerPostNotificationReplace
public void registerPostNotificationReplace(IDocumentListener owner, IDocumentExtension.IReplace replace)(Code)



removeMasterDocumentRange
public void removeMasterDocumentRange(int offsetInMaster, int lengthInMaster) throws BadLocationException(Code)
Ensures that the given range of the master document is not part of this projection document.
Parameters:
  offsetInMaster - the offset of the master document range
Parameters:
  lengthInMaster - the length of the master document range
throws:
  BadLocationException - in case the master event is not valid



replace
public void replace(int offset, int length, String text) throws BadLocationException(Code)



replaceMasterDocumentRanges
public void replaceMasterDocumentRanges(int offsetInMaster, int lengthInMaster) throws BadLocationException(Code)
Replaces all master document ranges with the given master document range.
Parameters:
  offsetInMaster - the offset in the master document
Parameters:
  lengthInMaster - the length in the master document
throws:
  BadLocationException - if the given range of the master document is not valid



set
public void set(String text)(Code)



setAutoExpandMode
public void setAutoExpandMode(boolean autoExpandMode)(Code)
Sets the auto expand mode for this document.
Parameters:
  autoExpandMode - true if auto-expanding



updateDocumentStructures
protected void updateDocumentStructures(DocumentEvent event)(Code)



Methods inherited from org.eclipse.jface.text.AbstractDocument
public void acceptPostNotificationReplaces()(Code)(Java Doc)
public void addDocumentListener(IDocumentListener listener)(Code)(Java Doc)
public void addDocumentPartitioningListener(IDocumentPartitioningListener listener)(Code)(Java Doc)
public void addDocumentRewriteSessionListener(IDocumentRewriteSessionListener listener)(Code)(Java Doc)
public void addPosition(String category, Position position) throws BadLocationException, BadPositionCategoryException(Code)(Java Doc)
public void addPosition(Position position) throws BadLocationException(Code)(Java Doc)
public void addPositionCategory(String category)(Code)(Java Doc)
public void addPositionUpdater(IPositionUpdater updater)(Code)(Java Doc)
public void addPrenotifiedDocumentListener(IDocumentListener listener)(Code)(Java Doc)
final protected void checkStateOfPartitioner(IDocumentPartitioner partitioner, String partitioning)(Code)(Java Doc)
protected void completeInitialization()(Code)(Java Doc)
public int computeIndexInCategory(String category, int offset) throws BadLocationException, BadPositionCategoryException(Code)(Java Doc)
protected int computeIndexInPositionList(List positions, int offset)(Code)(Java Doc)
public int computeNumberOfLines(String text)(Code)(Java Doc)
public ITypedRegion[] computePartitioning(int offset, int length) throws BadLocationException(Code)(Java Doc)
public ITypedRegion[] computePartitioning(String partitioning, int offset, int length, boolean includeZeroLengthPartitions) throws BadLocationException, BadPartitioningException(Code)(Java Doc)
public boolean containsPosition(String category, int offset, int length)(Code)(Java Doc)
public boolean containsPositionCategory(String category)(Code)(Java Doc)
protected void doFireDocumentChanged(DocumentEvent event)(Code)(Java Doc)
protected void doFireDocumentChanged(DocumentEvent event, boolean firePartitionChange, IRegion partitionChange)(Code)(Java Doc)
protected void doFireDocumentChanged2(DocumentEvent event)(Code)(Java Doc)
protected void fireDocumentAboutToBeChanged(DocumentEvent event)(Code)(Java Doc)
protected void fireDocumentChanged(DocumentEvent event)(Code)(Java Doc)
protected void fireDocumentPartitioningChanged()(Code)(Java Doc)
protected void fireDocumentPartitioningChanged(IRegion region)(Code)(Java Doc)
protected void fireDocumentPartitioningChanged(DocumentPartitioningChangedEvent event)(Code)(Java Doc)
protected void fireRewriteSessionChanged(DocumentRewriteSessionEvent event)(Code)(Java Doc)
public String get()(Code)(Java Doc)
public String get(int pos, int length) throws BadLocationException(Code)(Java Doc)
final public DocumentRewriteSession getActiveRewriteSession()(Code)(Java Doc)
public char getChar(int pos) throws BadLocationException(Code)(Java Doc)
public String getContentType(int offset) throws BadLocationException(Code)(Java Doc)
public String getContentType(String partitioning, int offset, boolean preferOpenPartitions) throws BadLocationException, BadPartitioningException(Code)(Java Doc)
public String getDefaultLineDelimiter()(Code)(Java Doc)
protected List getDocumentListeners()(Code)(Java Doc)
protected Map getDocumentManagedPositions()(Code)(Java Doc)
public IDocumentPartitioner getDocumentPartitioner()(Code)(Java Doc)
public IDocumentPartitioner getDocumentPartitioner(String partitioning)(Code)(Java Doc)
protected List getDocumentPartitioningListeners()(Code)(Java Doc)
public String[] getLegalContentTypes()(Code)(Java Doc)
public String[] getLegalContentTypes(String partitioning) throws BadPartitioningException(Code)(Java Doc)
public String[] getLegalLineDelimiters()(Code)(Java Doc)
public int getLength()(Code)(Java Doc)
public String getLineDelimiter(int line) throws BadLocationException(Code)(Java Doc)
public IRegion getLineInformation(int line) throws BadLocationException(Code)(Java Doc)
public IRegion getLineInformationOfOffset(int offset) throws BadLocationException(Code)(Java Doc)
public int getLineLength(int line) throws BadLocationException(Code)(Java Doc)
public int getLineOfOffset(int pos) throws BadLocationException(Code)(Java Doc)
public int getLineOffset(int line) throws BadLocationException(Code)(Java Doc)
public long getModificationStamp()(Code)(Java Doc)
public int getNumberOfLines()(Code)(Java Doc)
public int getNumberOfLines(int offset, int length) throws BadLocationException(Code)(Java Doc)
public ITypedRegion getPartition(int offset) throws BadLocationException(Code)(Java Doc)
public ITypedRegion getPartition(String partitioning, int offset, boolean preferOpenPartitions) throws BadLocationException, BadPartitioningException(Code)(Java Doc)
public String[] getPartitionings()(Code)(Java Doc)
public String[] getPositionCategories()(Code)(Java Doc)
public IPositionUpdater[] getPositionUpdaters()(Code)(Java Doc)
public Position[] getPositions(String category) throws BadPositionCategoryException(Code)(Java Doc)
protected ITextStore getStore()(Code)(Java Doc)
protected ILineTracker getTracker()(Code)(Java Doc)
public void ignorePostNotificationReplaces()(Code)(Java Doc)
public void insertPositionUpdater(IPositionUpdater updater, int index)(Code)(Java Doc)
protected boolean mustRepairLineInformation(int pos, int length, String text)(Code)(Java Doc)
public void registerPostNotificationReplace(IDocumentListener owner, IDocumentExtension.IReplace replace)(Code)(Java Doc)
public void removeDocumentListener(IDocumentListener listener)(Code)(Java Doc)
public void removeDocumentPartitioningListener(IDocumentPartitioningListener listener)(Code)(Java Doc)
public void removeDocumentRewriteSessionListener(IDocumentRewriteSessionListener listener)(Code)(Java Doc)
public void removePosition(String category, Position position) throws BadPositionCategoryException(Code)(Java Doc)
public void removePosition(Position position)(Code)(Java Doc)
public void removePositionCategory(String category) throws BadPositionCategoryException(Code)(Java Doc)
public void removePositionUpdater(IPositionUpdater updater)(Code)(Java Doc)
public void removePrenotifiedDocumentListener(IDocumentListener listener)(Code)(Java Doc)
public void repairLineInformation()(Code)(Java Doc)
public void replace(int pos, int length, String text, long modificationStamp) throws BadLocationException(Code)(Java Doc)
public void replace(int pos, int length, String text) throws BadLocationException(Code)(Java Doc)
public void resumeListenerNotification()(Code)(Java Doc)
public void resumePostNotificationProcessing()(Code)(Java Doc)
public int search(int startPosition, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord) throws BadLocationException(Code)(Java Doc)
public void set(String text)(Code)(Java Doc)
public void set(String text, long modificationStamp)(Code)(Java Doc)
public void setDocumentPartitioner(IDocumentPartitioner partitioner)(Code)(Java Doc)
public void setDocumentPartitioner(String partitioning, IDocumentPartitioner partitioner)(Code)(Java Doc)
public void setInitialLineDelimiter(String lineDelimiter)(Code)(Java Doc)
protected void setLineTracker(ILineTracker tracker)(Code)(Java Doc)
protected void setTextStore(ITextStore store)(Code)(Java Doc)
public DocumentRewriteSession startRewriteSession(DocumentRewriteSessionType sessionType)(Code)(Java Doc)
final protected void startRewriteSessionOnPartitioners(DocumentRewriteSession session)(Code)(Java Doc)
public void startSequentialRewrite(boolean normalized)(Code)(Java Doc)
public void stopListenerNotification()(Code)(Java Doc)
public void stopPostNotificationProcessing()(Code)(Java Doc)
public void stopRewriteSession(DocumentRewriteSession session)(Code)(Java Doc)
final protected void stopRewriteSessionOnPartitioners(DocumentRewriteSession session)(Code)(Java Doc)
public void stopSequentialRewrite()(Code)(Java Doc)
protected void updateDocumentStructures(DocumentEvent event)(Code)(Java Doc)
protected void updatePositions(DocumentEvent event)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.