Java Doc for SourceUnit.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » insync » 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 Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.insync 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.visualweb.insync.SourceUnit

All known Subclasses:   org.netbeans.modules.visualweb.insync.java.JavaUnit,  org.netbeans.modules.visualweb.insync.markup.MarkupUnit,
SourceUnit
abstract public class SourceUnit implements Unit,DocumentListener,UndoableEditListener,PropertyChangeListener,FileChangeListener(Code)
A partial Unit implementation that provides common functionality for all source-based Units.
author:
   Carl Quinn

Inner Class :public class CountingWriter extends Writer

Field Summary
protected  FileObjectfobj
    
protected  DatelastModelDirty
    
protected  DatelastModified
    
protected  HashSetlisteners
    
 intreaderCount
    
 Statestate
    
protected  StyledDocumentstyledDocument
    
protected  UndoManagerundoManager
    
 intwriterCount
    
 ThreadwritingThread
    

Constructor Summary
protected  SourceUnit(FileObject fobj, UndoManager undoManager)
    

Method Summary
public  voidaddListener(SourceUnitListener listener)
    
public  voidchangedUpdate(DocumentEvent e)
    
public  voiddestroy()
    
final public  voiddumpTo(OutputStream out)
    
protected  voidendFlush(boolean madeDirty)
    
public  voidfileAttributeChanged(FileAttributeEvent fe)
    
public  voidfileChanged(FileEvent fe)
    
public  voidfileDataCreated(FileEvent fe)
    
public  voidfileDeleted(FileEvent fe)
    
public  voidfileFolderCreated(FileEvent fe)
    
public  voidfileRenamed(FileRenameEvent fe)
    
protected  voidfireModelDirtied()
     Notify my listeners of the fact that my model has been made dirty.
protected  voidfireSaved()
    
protected  voidfireSourceDirtied()
     Notify my listeners of the fact that my source has been made dirty.
protected synchronized  voidfirstWriteLock()
    
public  booleanflush()
     Flush this unit to its document, writing changes as needed and updating flags.
public  DataObjectgetDataObject()
    
public  ParserAnnotation[]getErrors()
    
public  FileObjectgetFileObject()
    
public  StringgetName()
    
public  StyledDocumentgetSourceDocument()
    
public  StategetState()
    
final protected synchronized  ThreadgetWritingThread()
     Fetches the current writing thread if there is one.
public  voidinsertUpdate(DocumentEvent e)
    
public  booleanisBusted()
     Return true if my state is busted.
public  booleanisWriteLocked()
    
protected synchronized  voidlastWriteUnlock()
    
protected  booleanminimalReplace(String newText)
     Internal routine for performing the smallest single update operation to the document given an old document and a new text string.
public  voidpropertyChange(PropertyChangeEvent event)
    
abstract protected  voidread(char[] cbuf, int len)
     Read the actual characters from the source document's content.
final public synchronized  voidreadLock()
    
final public synchronized  voidreadUnlock()
    
protected  voidreleaseDocument()
     Release the current document and all listener hooks.
public  voidremoveListener(SourceUnitListener listener)
    
public  voidremoveUpdate(DocumentEvent e)
    
public  voidsave()
    
public  voidsetBusted()
     Mark the source as being busted - e.g.
public  voidsetClean()
    
public  voidsetModelDirty()
    
public  voidsetSourceDirty()
    
protected  voidstartFlush()
    
public  booleansync()
     Implicit read.
public  StringtoString()
     Improve the readability of String display in debugger's variable inspector.
protected  voidtoString(StringBuffer sb)
     Subclasses should override to Improve the readability of String display in debugger's variable inspector.
public  voidundoableEditHappened(UndoableEditEvent e)
    
final public synchronized  voidwriteLock(UndoEvent event)
    
abstract public  voidwriteTo(Writer w)
    
public  voidwriteTo(OutputStream out)
    
final public synchronized  booleanwriteUnlock(UndoEvent event)
    

Field Detail
fobj
protected FileObject fobj(Code)



lastModelDirty
protected Date lastModelDirty(Code)



lastModified
protected Date lastModified(Code)



listeners
protected HashSet listeners(Code)



readerCount
int readerCount(Code)



state
State state(Code)



styledDocument
protected StyledDocument styledDocument(Code)



undoManager
protected UndoManager undoManager(Code)



writerCount
int writerCount(Code)



writingThread
Thread writingThread(Code)




Constructor Detail
SourceUnit
protected SourceUnit(FileObject fobj, UndoManager undoManager)(Code)
Construct a SourceUnit from an existing source Document
Parameters:
  dobj -




Method Detail
addListener
public void addListener(SourceUnitListener listener)(Code)



changedUpdate
public void changedUpdate(DocumentEvent e)(Code)



destroy
public void destroy()(Code)



dumpTo
final public void dumpTo(OutputStream out)(Code)

Parameters:
  out -



endFlush
protected void endFlush(boolean madeDirty)(Code)



fileAttributeChanged
public void fileAttributeChanged(FileAttributeEvent fe)(Code)



fileChanged
public void fileChanged(FileEvent fe)(Code)



fileDataCreated
public void fileDataCreated(FileEvent fe)(Code)



fileDeleted
public void fileDeleted(FileEvent fe)(Code)



fileFolderCreated
public void fileFolderCreated(FileEvent fe)(Code)



fileRenamed
public void fileRenamed(FileRenameEvent fe)(Code)



fireModelDirtied
protected void fireModelDirtied()(Code)
Notify my listeners of the fact that my model has been made dirty.



fireSaved
protected void fireSaved()(Code)



fireSourceDirtied
protected void fireSourceDirtied()(Code)
Notify my listeners of the fact that my source has been made dirty.



firstWriteLock
protected synchronized void firstWriteLock()(Code)



flush
public boolean flush()(Code)
Flush this unit to its document, writing changes as needed and updating flags.
See Also:   SourceUnit.writeLock true iff the document was written to by the operation public abstract booleanflush();



getDataObject
public DataObject getDataObject()(Code)



getErrors
public ParserAnnotation[] getErrors()(Code)



getFileObject
public FileObject getFileObject()(Code)



getName
public String getName()(Code)



getSourceDocument
public StyledDocument getSourceDocument()(Code)



getState
public State getState()(Code)



getWritingThread
final protected synchronized Thread getWritingThread()(Code)
Fetches the current writing thread if there is one. This can be used to distinguish whether a method is being called as part of an existing modification or if a lock needs to be acquired and a new transaction started. the thread actively modifying the document or null if there are nomodifications in progress



insertUpdate
public void insertUpdate(DocumentEvent e)(Code)



isBusted
public boolean isBusted()(Code)
Return true if my state is busted.



isWriteLocked
public boolean isWriteLocked()(Code)



lastWriteUnlock
protected synchronized void lastWriteUnlock()(Code)



minimalReplace
protected boolean minimalReplace(String newText)(Code)
Internal routine for performing the smallest single update operation to the document given an old document and a new text string.
Parameters:
  newText - The new document text contents.



propertyChange
public void propertyChange(PropertyChangeEvent event)(Code)



read
abstract protected void read(char[] cbuf, int len)(Code)
Read the actual characters from the source document's content. Concrete subclasses must override this method to process the buffer characters into the model.



readLock
final public synchronized void readLock()(Code)



readUnlock
final public synchronized void readUnlock()(Code)



releaseDocument
protected void releaseDocument()(Code)
Release the current document and all listener hooks. The document will have to be grabbed again before use.



removeListener
public void removeListener(SourceUnitListener listener)(Code)



removeUpdate
public void removeUpdate(DocumentEvent e)(Code)



save
public void save()(Code)
Saves the owning file using project apis



setBusted
public void setBusted()(Code)
Mark the source as being busted - e.g. cannot be parsed.



setClean
public void setClean()(Code)



setModelDirty
public void setModelDirty()(Code)
Called by various subclasses when they actually mutate their model



setSourceDirty
public void setSourceDirty()(Code)
Called by document listeners to let us know that our buffer is dirty and needs re-syncing



startFlush
protected void startFlush()(Code)



sync
public boolean sync()(Code)
Implicit read. Read the document supplied during construction into this model. whether or not the read affected the model.



toString
public String toString()(Code)
Improve the readability of String display in debugger's variable inspector.



toString
protected void toString(StringBuffer sb)(Code)
Subclasses should override to Improve the readability of String display in debugger's variable inspector.



undoableEditHappened
public void undoableEditHappened(UndoableEditEvent e)(Code)



writeLock
final public synchronized void writeLock(UndoEvent event)(Code)



writeTo
abstract public void writeTo(Writer w) throws java.io.IOException(Code)

Parameters:
  w -
throws:
  java.io.IOException -



writeTo
public void writeTo(OutputStream out) throws java.io.IOException(Code)

Parameters:
  out -
throws:
  java.io.IOException -



writeUnlock
final public synchronized boolean writeUnlock(UndoEvent event)(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.