Java Doc for IDocumentProvider.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » texteditor » 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 » ui workbench » org.eclipse.ui.texteditor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.texteditor.IDocumentProvider

All known Subclasses:   org.eclipse.ui.texteditor.AbstractDocumentProvider,
IDocumentProvider
public interface IDocumentProvider (Code)
A document provider maps between domain elements and documents. A document provider has the following responsibilities:
  • create an annotation model of a domain model element
  • create and manage a textual representation, i.e., a document, of a domain model element
  • create and save the content of domain model elements based on given documents
  • update the documents this document provider manages for domain model elements to changes directly applied to those domain model elements
  • notify all element state listeners about changes directly applied to domain model elements this document provider manages a document for, i.e. the document provider must know which changes of a domain model element are to be interpreted as element moves, deletes, etc.
Text editors use document providers to bridge the gap between their input elements and the documents they work on. A single document provider may be shared between multiple editors; the methods take the editors' input elements as a parameter.

This interface may be implemented by clients; or subclass the standard abstract base class AbstractDocumentProvider.

In order to provided backward compatibility for clients of IDocumentProvider, extension interfaces are used to provide a means of evolution. The following extension interfaces exist:


See Also:   org.eclipse.jface.text.IDocument
See Also:   org.eclipse.ui.texteditor.AbstractDocumentProvider
See Also:   org.eclipse.ui.texteditor.IDocumentProviderExtension
See Also:   org.eclipse.ui.texteditor.IDocumentProviderExtension2
See Also:   org.eclipse.ui.texteditor.IDocumentProviderExtension3
See Also:   org.eclipse.ui.texteditor.IDocumentProviderExtension4
See Also:   org.eclipse.ui.texteditor.IDocumentProviderExtension5




Method Summary
 voidaboutToChange(Object element)
     Informs this document provider about upcoming changes of the given element. The changes might cause change notifications specific for the type of the given element. If this provider manages a document for the given element, the document provider must not change the document because of the notifications received after aboutToChange has been and before changed is called.
 voidaddElementStateListener(IElementStateListener listener)
     Adds the given element state listener to this document provider.
 booleancanSaveDocument(Object element)
     Returns whether the document provided for the given element differs from its original state which would required that it be saved.
 voidchanged(Object element)
     Informs this document provider that the given element has been changed. All notifications have been sent out.
 voidconnect(Object element)
     Connects the given element to this document provider.
 voiddisconnect(Object element)
     Disconnects the given element from this document provider.
 IAnnotationModelgetAnnotationModel(Object element)
     Returns the annotation model for the given element.
 IDocumentgetDocument(Object element)
     Returns the document for the given element.
 longgetModificationStamp(Object element)
     Returns the modification stamp of the given element.
 longgetSynchronizationStamp(Object element)
     Returns the time stamp of the last synchronization of the given element and it's provided document.
 booleanisDeleted(Object element)
     Returns whether the given element has been deleted.
 booleanmustSaveDocument(Object element)
     Returns whether the document provided for the given element must be saved.
 voidremoveElementStateListener(IElementStateListener listener)
     Removes the given element state listener from this document provider.
 voidresetDocument(Object element)
     Resets the given element's document to its last saved state.
 voidsaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite)
     Saves the given document provided for the given element.



Method Detail
aboutToChange
void aboutToChange(Object element)(Code)
Informs this document provider about upcoming changes of the given element. The changes might cause change notifications specific for the type of the given element. If this provider manages a document for the given element, the document provider must not change the document because of the notifications received after aboutToChange has been and before changed is called. In this case, it is assumed that the document is already up to date, e.g., a save operation is a typical case.

The concrete nature of the change notification depends on the concrete type of the given element. If the element is, e.g., an IResource the notification is a resource delta.
Parameters:
  element - the element, or null




addElementStateListener
void addElementStateListener(IElementStateListener listener)(Code)
Adds the given element state listener to this document provider. Has no effect if an identical listener is already registered.
Parameters:
  listener - the listener



canSaveDocument
boolean canSaveDocument(Object element)(Code)
Returns whether the document provided for the given element differs from its original state which would required that it be saved.
Parameters:
  element - the element, or null true if the document can be saved, andfalse otherwise (including the element is null)



changed
void changed(Object element)(Code)
Informs this document provider that the given element has been changed. All notifications have been sent out. If this provider manages a document for the given element, the document provider must from now on change the document on the receipt of change notifications. The concrete nature of the change notification depends on the concrete type of the given element. If the element is, e.g., an IResource the notification is a resource delta.
Parameters:
  element - the element, or null



connect
void connect(Object element) throws CoreException(Code)
Connects the given element to this document provider. This tells the provider that caller of this method is interested to work with the document provided for the given domain model element. By counting the invocations of this method and disconnect(Object) this provider can assume to know the correct number of clients working with the document provided for that domain model element.

The given element must not be null.
Parameters:
  element - the element
exception:
  CoreException - if the textual representation or the annotation modelof the element could not be created




disconnect
void disconnect(Object element)(Code)
Disconnects the given element from this document provider. This tells the provider that the caller of this method is no longer interested in working with the document provided for the given domain model element. By counting the invocations of connect(Object) and of this method this provider can assume to know the correct number of clients working with the document provided for that domain model element.

The given element must not be null.
Parameters:
  element - the element




getAnnotationModel
IAnnotationModel getAnnotationModel(Object element)(Code)
Returns the annotation model for the given element.
Parameters:
  element - the element, or null the annotation model, or null if none



getDocument
IDocument getDocument(Object element)(Code)
Returns the document for the given element. Usually the document contains a textual presentation of the content of the element, or is the element itself.
Parameters:
  element - the element, or null the document, or null if none



getModificationStamp
long getModificationStamp(Object element)(Code)
Returns the modification stamp of the given element.
Parameters:
  element - the element the modification stamp of the given element



getSynchronizationStamp
long getSynchronizationStamp(Object element)(Code)
Returns the time stamp of the last synchronization of the given element and it's provided document.
Parameters:
  element - the element the synchronization stamp of the given element



isDeleted
boolean isDeleted(Object element)(Code)
Returns whether the given element has been deleted.
Parameters:
  element - the element true if the element has been deleted



mustSaveDocument
boolean mustSaveDocument(Object element)(Code)
Returns whether the document provided for the given element must be saved.
Parameters:
  element - the element, or null true if the document must be saved, andfalse otherwise (including the element is null)



removeElementStateListener
void removeElementStateListener(IElementStateListener listener)(Code)
Removes the given element state listener from this document provider. Has no affect if an identical listener is not registered.
Parameters:
  listener - the listener



resetDocument
void resetDocument(Object element) throws CoreException(Code)
Resets the given element's document to its last saved state. Element state listeners are notified both before (elementContentAboutToBeReplaced) and after (elementContentReplaced) the content is changed.
Parameters:
  element - the element, or null
exception:
  CoreException - if document could not be reset for the given element



saveDocument
void saveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException(Code)
Saves the given document provided for the given element.
Parameters:
  monitor - a progress monitor to report progress and request cancelation
Parameters:
  element - the element, or null
Parameters:
  document - the document
Parameters:
  overwrite - indicates whether overwrite should be performedwhile saving the given element if necessary
exception:
  CoreException - if document could not be stored to the given element



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