Java Doc for AbstractDocumentProvider.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) 


java.lang.Object
   org.eclipse.ui.texteditor.AbstractDocumentProvider

AbstractDocumentProvider
abstract public class AbstractDocumentProvider implements IDocumentProvider,IDocumentProviderExtension,IDocumentProviderExtension2,IDocumentProviderExtension3,IDocumentProviderExtension4,IDocumentProviderExtension5(Code)
An abstract implementation of a sharable document provider.

Subclasses must implement createDocument, createAnnotationModel, and doSaveDocument.


Inner Class :abstract protected static class DocumentProviderOperation implements IRunnableWithProgress
Inner Class :protected class ElementInfo implements IDocumentListener

Field Summary
final protected static  booleanPR10806_UC5_ENABLED
     Enables a certain behavior.
final protected static  booleanPR14469_ENABLED
     Enables a certain behavior.
final protected static  IStatusSTATUS_ERROR
     Constant for representing the error status.
final protected static  IStatusSTATUS_OK
     Constant for representing the OK status.

Constructor Summary
protected  AbstractDocumentProvider()
     Creates a new document provider.

Method Summary
public  voidaboutToChange(Object element)
     The AbstractDocumentProvider implementation of this IDocumentProvider method does nothing.
public  voidaddElementStateListener(IElementStateListener listener)
    
protected  voidaddUnchangedElementListeners(Object element, ElementInfo info)
     Called on initial creation and when the dirty state of the element changes to false.
public  booleancanSaveDocument(Object element)
    
public  voidchanged(Object element)
     The AbstractDocumentProvider implementation of this IDocumentProvider method does nothing.
final public  voidconnect(Object element)
    
protected  voidconnected()
     This hook method is called when this provider starts managing documents for elements.
abstract protected  IAnnotationModelcreateAnnotationModel(Object element)
     Creates an annotation model for the given element.
abstract protected  IDocumentcreateDocument(Object element)
     Creates the document for the given element.
protected  ElementInfocreateElementInfo(Object element)
     Creates a new element info object for the given element.

This method is called from connect when an element info needs to be created.

final public  voiddisconnect(Object element)
    
protected  voiddisconnected()
     This hook method is called when this provider stops managing documents for element.
protected  voiddisposeElementInfo(Object element, ElementInfo info)
     Disposes of the given element info object.

This method is called when an element info is disposed.

protected  voiddoResetDocument(Object element, IProgressMonitor monitor)
     Executes the actual work of reseting the given elements document.
abstract protected  voiddoSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite)
     Performs the actual work of saving the given document provided for the given element.
protected  voiddoSynchronize(Object element, IProgressMonitor monitor)
     Performs the actual work of synchronizing the given element.
protected  voiddoUpdateStateCache(Object element)
     Hook method for updating the state of the given element.
protected  voiddoValidateState(Object element, Object computationContext)
     Hook method for validating the state of the given element.
protected  voidexecuteOperation(DocumentProviderOperation operation, IProgressMonitor monitor)
     Executes the given operation in the providers runnable context.
protected  voidfireElementContentAboutToBeReplaced(Object element)
     Informs all registered element state listeners about an impending replace of the given element's content.
protected  voidfireElementContentReplaced(Object element)
     Informs all registered element state listeners about the just-completed replace of the given element's content.
protected  voidfireElementDeleted(Object element)
     Informs all registered element state listeners about the deletion of the given element.
protected  voidfireElementDirtyStateChanged(Object element, boolean isDirty)
     Informs all registered element state listeners about a change in the dirty state of the given element.
protected  voidfireElementMoved(Object originalElement, Object movedElement)
     Informs all registered element state listeners about a move.
protected  voidfireElementStateChangeFailed(Object element)
    
protected  voidfireElementStateChanging(Object element)
    
protected  voidfireElementStateValidationChanged(Object element, boolean isStateValidated)
     Informs all registered element state listeners about a change in the state validation of the given element.
public  IAnnotationModelgetAnnotationModel(Object element)
    
protected  IteratorgetConnectedElements()
     Enumerates the elements connected via this document provider.
public  IContentTypegetContentType(Object element)
    
public  IDocumentgetDocument(Object element)
    
protected  ElementInfogetElementInfo(Object element)
     Returns the element info object for the given element.
public  longgetModificationStamp(Object element)
    
abstract protected  IRunnableContextgetOperationRunner(IProgressMonitor monitor)
     Returns the runnable context for this document provider.
public  IProgressMonitorgetProgressMonitor()
    
protected  ISchedulingRulegetResetRule(Object element)
     Returns the scheduling rule required for executing reset on the given element.
protected  ISchedulingRulegetSaveRule(Object element)
     Returns the scheduling rule required for executing save on the given element.
public  IStatusgetStatus(Object element)
    
public  longgetSynchronizationStamp(Object element)
    
protected  ISchedulingRulegetSynchronizeRule(Object element)
     Returns the scheduling rule required for executing synchronize on the given element.
protected  ISchedulingRulegetValidateStateRule(Object element)
     Returns the scheduling rule required for executing validateState on the given element.
protected  booleaninvalidatesState(Object element, boolean wasReadOnly)
     Returns whether the state of the element must be invalidated given its previous read-only state.
public  booleanisDeleted(Object element)
    
public  booleanisModifiable(Object element)
    
public  booleanisNotSynchronizedException(Object element, CoreException ex)
    
public  booleanisReadOnly(Object element)
    
public  booleanisStateValidated(Object element)
     Returns whether validateState has been called for the given element since the element's state has potentially been invalidated.
public  booleanisSynchronized(Object element)
    
public  booleanmustSaveDocument(Object element)
    
public  voidremoveElementStateListener(IElementStateListener listener)
    
protected  voidremoveUnchangedElementListeners(Object element, ElementInfo info)
     Called when the given element gets dirty.
final public  voidresetDocument(Object element)
    
final public  voidsaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite)
    
public  voidsetCanSaveDocument(Object element)
    
public  voidsetProgressMonitor(IProgressMonitor progressMonitor)
    
final public  voidsynchronize(Object element)
    
final public  voidupdateStateCache(Object element)
    
public  voidvalidateState(Object element, Object computationContext)
    

Field Detail
PR10806_UC5_ENABLED
final protected static boolean PR10806_UC5_ENABLED(Code)
Enables a certain behavior. Indicates whether this provider should behave as described in use case 5 of http://bugs.eclipse.org/bugs/show_bug.cgi?id=10806. Current value: true since 3.0
since:
   2.0



PR14469_ENABLED
final protected static boolean PR14469_ENABLED(Code)
Enables a certain behavior. Indicates whether this provider should behave as described in http://bugs.eclipse.org/bugs/show_bug.cgi?id=14469 Notes: This contradicts PR10806_UC5_ENABLED. Current value: false since 3.0
since:
   2.0



STATUS_ERROR
final protected static IStatus STATUS_ERROR(Code)
Constant for representing the error status. This is considered a value object.
since:
   2.0



STATUS_OK
final protected static IStatus STATUS_OK(Code)
Constant for representing the OK status. This is considered a value object.
since:
   2.0




Constructor Detail
AbstractDocumentProvider
protected AbstractDocumentProvider()(Code)
Creates a new document provider.




Method Detail
aboutToChange
public void aboutToChange(Object element)(Code)
The AbstractDocumentProvider implementation of this IDocumentProvider method does nothing. Subclasses may reimplement.
Parameters:
  element - the element



addElementStateListener
public void addElementStateListener(IElementStateListener listener)(Code)



addUnchangedElementListeners
protected void addUnchangedElementListeners(Object element, ElementInfo info)(Code)
Called on initial creation and when the dirty state of the element changes to false. Adds all listeners which must be active as long as the element is not dirty. This method is called before fireElementDirtyStateChanged or fireElementContentReplaced is called. Subclasses may extend.
Parameters:
  element - the element
Parameters:
  info - the element info object



canSaveDocument
public boolean canSaveDocument(Object element)(Code)



changed
public void changed(Object element)(Code)
The AbstractDocumentProvider implementation of this IDocumentProvider method does nothing. Subclasses may reimplement.
Parameters:
  element - the element



connect
final public void connect(Object element) throws CoreException(Code)



connected
protected void connected()(Code)
This hook method is called when this provider starts managing documents for elements. I.e. it is called when the first element gets connected to this provider. Subclasses may extend.
since:
   2.0



createAnnotationModel
abstract protected IAnnotationModel createAnnotationModel(Object element) throws CoreException(Code)
Creates an annotation model for the given element.

Subclasses must implement this method.


Parameters:
  element - the element the annotation model or null if none
exception:
  CoreException - if the annotation model could not be created



createDocument
abstract protected IDocument createDocument(Object element) throws CoreException(Code)
Creates the document for the given element.

Subclasses must implement this method.


Parameters:
  element - the element the document
exception:
  CoreException - if the document could not be created



createElementInfo
protected ElementInfo createElementInfo(Object element) throws CoreException(Code)
Creates a new element info object for the given element.

This method is called from connect when an element info needs to be created. The AbstractDocumentProvider implementation of this method returns a new element info object whose document and annotation model are the values of createDocument(element) and createAnnotationModel(element), respectively. Subclasses may override.


Parameters:
  element - the element a new element info object
exception:
  CoreException - if the document or annotation model could not be created



disconnect
final public void disconnect(Object element)(Code)



disconnected
protected void disconnected()(Code)
This hook method is called when this provider stops managing documents for element. I.e. it is called when the last element gets disconnected from this provider. Subclasses may extend.
since:
   2.0



disposeElementInfo
protected void disposeElementInfo(Object element, ElementInfo info)(Code)
Disposes of the given element info object.

This method is called when an element info is disposed. The AbstractDocumentProvider implementation of this method does nothing. Subclasses may reimplement.


Parameters:
  element - the element
Parameters:
  info - the element info object



doResetDocument
protected void doResetDocument(Object element, IProgressMonitor monitor) throws CoreException(Code)
Executes the actual work of reseting the given elements document.
Parameters:
  element - the element
Parameters:
  monitor - the progress monitor
throws:
  CoreException -
since:
   3.0



doSaveDocument
abstract protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException(Code)
Performs the actual work of saving the given document provided for the given element.

Subclasses must implement this method.


Parameters:
  monitor - a progress monitor to report progress and request cancelation
Parameters:
  element - the element
Parameters:
  document - the document
Parameters:
  overwrite - indicates whether an overwrite should happen if necessary
exception:
  CoreException - if document could not be stored to the given element



doSynchronize
protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException(Code)
Performs the actual work of synchronizing the given element.
Parameters:
  element - the element
Parameters:
  monitor - the progress monitor
exception:
  CoreException - in the case that synchronization fails
since:
   3.0



doUpdateStateCache
protected void doUpdateStateCache(Object element) throws CoreException(Code)
Hook method for updating the state of the given element. Default implementation is empty.
Parameters:
  element - the element
exception:
  CoreException - in case state cache updating fails
since:
   2.0



doValidateState
protected void doValidateState(Object element, Object computationContext) throws CoreException(Code)
Hook method for validating the state of the given element. Must not take care of cache updating etc. Default implementation is empty.
Parameters:
  element - the element
Parameters:
  computationContext - the context in which validation happens
exception:
  CoreException - in case validation fails
since:
   2.0



executeOperation
protected void executeOperation(DocumentProviderOperation operation, IProgressMonitor monitor) throws CoreException(Code)
Executes the given operation in the providers runnable context.
Parameters:
  operation - the operation to be executes
Parameters:
  monitor - the progress monitor
exception:
  CoreException - the operation's core exception
since:
   3.0



fireElementContentAboutToBeReplaced
protected void fireElementContentAboutToBeReplaced(Object element)(Code)
Informs all registered element state listeners about an impending replace of the given element's content.
Parameters:
  element - the element
See Also:   IElementStateListener.elementContentAboutToBeReplaced(Object)



fireElementContentReplaced
protected void fireElementContentReplaced(Object element)(Code)
Informs all registered element state listeners about the just-completed replace of the given element's content.
Parameters:
  element - the element
See Also:   IElementStateListener.elementContentReplaced(Object)



fireElementDeleted
protected void fireElementDeleted(Object element)(Code)
Informs all registered element state listeners about the deletion of the given element.
Parameters:
  element - the element
See Also:   IElementStateListener.elementDeleted(Object)



fireElementDirtyStateChanged
protected void fireElementDirtyStateChanged(Object element, boolean isDirty)(Code)
Informs all registered element state listeners about a change in the dirty state of the given element.
Parameters:
  element - the element
Parameters:
  isDirty - the new dirty state
See Also:   IElementStateListener.elementDirtyStateChanged(Objectboolean)



fireElementMoved
protected void fireElementMoved(Object originalElement, Object movedElement)(Code)
Informs all registered element state listeners about a move.
Parameters:
  originalElement - the element before the move
Parameters:
  movedElement - the element after the move
See Also:   IElementStateListener.elementMoved(ObjectObject)



fireElementStateChangeFailed
protected void fireElementStateChangeFailed(Object element)(Code)
Informs all registered element state listeners about the failed state change of the element
Parameters:
  element - the element
See Also:   IElementStateListenerExtension.elementStateChangeFailed(Object)
since:
   2.0



fireElementStateChanging
protected void fireElementStateChanging(Object element)(Code)
Informs all registered element state listeners about the current state change of the element
Parameters:
  element - the element
See Also:   IElementStateListenerExtension.elementStateChanging(Object)
since:
   2.0



fireElementStateValidationChanged
protected void fireElementStateValidationChanged(Object element, boolean isStateValidated)(Code)
Informs all registered element state listeners about a change in the state validation of the given element.
Parameters:
  element - the element
Parameters:
  isStateValidated -
See Also:   IElementStateListenerExtension.elementStateValidationChanged(Objectboolean)
since:
   2.0



getAnnotationModel
public IAnnotationModel getAnnotationModel(Object element)(Code)



getConnectedElements
protected Iterator getConnectedElements()(Code)
Enumerates the elements connected via this document provider. the list of elements (element type: Object)



getContentType
public IContentType getContentType(Object element) throws CoreException(Code)



getDocument
public IDocument getDocument(Object element)(Code)



getElementInfo
protected ElementInfo getElementInfo(Object element)(Code)
Returns the element info object for the given element.
Parameters:
  element - the element the element info object, or null if none



getModificationStamp
public long getModificationStamp(Object element)(Code)



getOperationRunner
abstract protected IRunnableContext getOperationRunner(IProgressMonitor monitor)(Code)
Returns the runnable context for this document provider.
Parameters:
  monitor - a progress monitor to track the operation the runnable context for this document provider
since:
   3.0



getProgressMonitor
public IProgressMonitor getProgressMonitor()(Code)



getResetRule
protected ISchedulingRule getResetRule(Object element)(Code)
Returns the scheduling rule required for executing reset on the given element. This default implementation returns null.
Parameters:
  element - the element the scheduling rule for reset
since:
   3.0



getSaveRule
protected ISchedulingRule getSaveRule(Object element)(Code)
Returns the scheduling rule required for executing save on the given element. This default implementation returns null.
Parameters:
  element - the element the scheduling rule for save
since:
   3.0



getStatus
public IStatus getStatus(Object element)(Code)



getSynchronizationStamp
public long getSynchronizationStamp(Object element)(Code)



getSynchronizeRule
protected ISchedulingRule getSynchronizeRule(Object element)(Code)
Returns the scheduling rule required for executing synchronize on the given element. This default implementation returns null.
Parameters:
  element - the element the scheduling rule for synchronize
since:
   3.0



getValidateStateRule
protected ISchedulingRule getValidateStateRule(Object element)(Code)
Returns the scheduling rule required for executing validateState on the given element. This default implementation returns null.
Parameters:
  element - the element the scheduling rule for validateState
since:
   3.0



invalidatesState
protected boolean invalidatesState(Object element, boolean wasReadOnly)(Code)
Returns whether the state of the element must be invalidated given its previous read-only state.
Parameters:
  element - the element
Parameters:
  wasReadOnly - the previous read-only state true if the state of the given element must be invalidated
since:
   2.0



isDeleted
public boolean isDeleted(Object element)(Code)



isModifiable
public boolean isModifiable(Object element)(Code)



isNotSynchronizedException
public boolean isNotSynchronizedException(Object element, CoreException ex)(Code)



isReadOnly
public boolean isReadOnly(Object element)(Code)



isStateValidated
public boolean isStateValidated(Object element)(Code)
Returns whether validateState has been called for the given element since the element's state has potentially been invalidated.
Parameters:
  element - the element whether validateState has been called for the given element
since:
   2.0



isSynchronized
public boolean isSynchronized(Object element)(Code)



mustSaveDocument
public boolean mustSaveDocument(Object element)(Code)



removeElementStateListener
public void removeElementStateListener(IElementStateListener listener)(Code)



removeUnchangedElementListeners
protected void removeUnchangedElementListeners(Object element, ElementInfo info)(Code)
Called when the given element gets dirty. Removes all listeners which must be active only when the element is not dirty. This method is called before fireElementDirtyStateChanged or fireElementContentReplaced is called. Subclasses may extend.
Parameters:
  element - the element
Parameters:
  info - the element info object



resetDocument
final public void resetDocument(Object element) throws CoreException(Code)



saveDocument
final public void saveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException(Code)



setCanSaveDocument
public void setCanSaveDocument(Object element)(Code)



setProgressMonitor
public void setProgressMonitor(IProgressMonitor progressMonitor)(Code)



synchronize
final public void synchronize(Object element) throws CoreException(Code)



updateStateCache
final public void updateStateCache(Object element) throws CoreException(Code)



validateState
public void validateState(Object element, Object computationContext) throws CoreException(Code)



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.