Java Doc for SourceFile.java in  » IDE » tIDE » tide » sources » 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 » tIDE » tide.sources 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.tree.DefaultMutableTreeNode
      tide.sources.SourceFile

SourceFile
public class SourceFile extends DefaultMutableTreeNode implements FileItem(Code)
Represents a single .java File or a directory (package). Temporary stores the edited content before saving it ( temporaryEditedContent!=null) Also contain a reference on the generated class (?? classeS ??) Order: save changed files, and then look for the ones that must be compiled

Inner Class :public enum Kind

Field Summary
public  SourcesTreeIcon.IconColoriconColor
    
final public  booleanisDirectory
    
public  booleanisProjectMainClass
    
public  FilejavaFile
    
public  StringjavaPartName
    
public  Stringname
    
final public  SourceFileDependenciessourceFileDependencies
    
public  KindtopKind
    
public  UndoManagerundoManager
    
public  booleanvisited
    

Constructor Summary
 SourceFile(File file, String name, String javaName, String packageName)
    
 SourceFile(String name, String absolutePackageName)
    

Method Summary
public  voidaddResourceFile(ResourceFile rf)
     Adds a resource associated to a folder text, pics, ...
public  voidcancelExternalChanges()
    
public  voiddeleteAssociatedClassFiles()
    
public  voiddeleteCachedContent()
    
public  voidfileHasBeenDeleted()
     Call after deletion.
public  intgetCaretColumnPosition()
    
public  intgetCaretLinePosition()
    
public  SourceFilegetChildFileAt(int i)
    
public  StringgetContent()
    
public  FilegetFileOrDirectory()
     For java sources files, this method simply return the javaFile for directories, the directory is returned, constructed from tree names.
public  longgetFileSize()
    
public  booleangetHasBeenRemoved()
    
public  SourcesTreeIcon.IgnoredgetIgnoredType()
    
public  intgetJavaChildsCount()
     Files and packages, but without the resources.
public  StringgetJavaName()
    
public  StringgetJavaPartName()
     Also the java part name or simple name, used for node sorting.
public  longgetLastModified()
     the lastModified field of the file or directory.
public  longgetLastModifiedJavaFile()
     Cached.
final public  longgetLastStoredLastModifiedJavaFile()
     Is the date read when this was restored from vector rep.
public  StringgetName()
     Hello.java.
public  StringgetNodeNameToDisplayInTree()
     This is also the java part name, used for node sorting.
public  StringgetPackageName()
    
public  ParserResultgetParserResultIfAlreadyMade()
    
public  List<ResourceFile>getResourceFiles()
    
public  SimplifiedSyntaxTree2getSimplifiedSyntaxTreeIfAlreadyMade()
    
public  StorageVectorgetVectorRep()
    
public  booleanhasFileContentChangedOnDiskSinceLastGetContent()
    
public  booleanhasPackageDirectJavaChilds()
    
public  booleanhasTextRepresentation()
    
public  booleanisBeingEdited()
    
public  booleanisCompiled()
    
public  booleanisDirectory()
    
public  booleanisEditable()
     Looks on disk if the file can be written.
public  booleanisIgnored()
    
public  booleanisJavaFile()
    
public  booleanisSourceFile()
    
public  voidliberateResourcesForGC()
    
public  List<File>lookForAssociatedClassFiles()
     Used in JLint classes analysis tool...
public  booleanlookIfJavaFileChangedAndTreat()
     Look if the date on disk has changed, if true, directly sets state to "not compiled".
public  voidrename(String newSimpleName, boolean renameTypeNameInFile, boolean renameInProject)
     Sorting is NOT performed (todo?).
public  voidrenameAllOccurencesRegex(String oldStr, String newStr)
     Used in the rename.
public  booleanrestoreFromVectorRepr(StorageVector rep, SourcesTreeModel model)
     should be called after all source files have been restored in the project.
public  voidsaveContentToFile()
     If has been edited, i.e.
public  voidsetBeingEdited(boolean is)
    
public  voidsetCaretPositionToRemember(int line, int column)
    
public  voidsetClassRoot(File classesRoot)
    
public  voidsetContentFromEditor(String txt, boolean allowChangesFromOutside)
     Sets the content edited. Will be stored later.
public  voidsetIgnoredType(SourcesTreeIcon.Ignored a)
    
public  voidsetIsCompiled(boolean is)
     Called for folders based on child states.
public  voidsetParserResult(ParserResult st)
    
public  voidsetSimplifiedSyntaxTree(SimplifiedSyntaxTree2 st)
     Deletes the old syntax tree, if any.
public  StringtoString()
    

Field Detail
iconColor
public SourcesTreeIcon.IconColor iconColor(Code)



isDirectory
final public boolean isDirectory(Code)



isProjectMainClass
public boolean isProjectMainClass(Code)



javaFile
public File javaFile(Code)



javaPartName
public String javaPartName(Code)



name
public String name(Code)



sourceFileDependencies
final public SourceFileDependencies sourceFileDependencies(Code)



topKind
public Kind topKind(Code)



undoManager
public UndoManager undoManager(Code)



visited
public boolean visited(Code)




Constructor Detail
SourceFile
SourceFile(File file, String name, String javaName, String packageName)(Code)



SourceFile
SourceFile(String name, String absolutePackageName)(Code)
used for intermediate directories and the root (absolutePackageName="") name = java9 absolutePackageName = hello.my.java9




Method Detail
addResourceFile
public void addResourceFile(ResourceFile rf)(Code)
Adds a resource associated to a folder text, pics, ...



cancelExternalChanges
public void cancelExternalChanges()(Code)



deleteAssociatedClassFiles
public void deleteAssociatedClassFiles()(Code)



deleteCachedContent
public void deleteCachedContent()(Code)
Data may be lost if not saved previously ! used to enforce reload from file !



fileHasBeenDeleted
public void fileHasBeenDeleted()(Code)
Call after deletion.



getCaretColumnPosition
public int getCaretColumnPosition()(Code)



getCaretLinePosition
public int getCaretLinePosition()(Code)



getChildFileAt
public SourceFile getChildFileAt(int i)(Code)



getContent
public String getContent() throws Exception(Code)
temporaryEditedContent if not null or the file content from disk.ASSERT: ONLY PLACE TO GET THE CONTENT !



getFileOrDirectory
public File getFileOrDirectory()(Code)
For java sources files, this method simply return the javaFile for directories, the directory is returned, constructed from tree names. CAUTION: javaNama.replace('.', '/') is not robust, because the directory names may contain "." (not valid for packages, but maybe for resources, also managed in the sources model)



getFileSize
public long getFileSize()(Code)



getHasBeenRemoved
public boolean getHasBeenRemoved()(Code)



getIgnoredType
public SourcesTreeIcon.Ignored getIgnoredType()(Code)



getJavaChildsCount
public int getJavaChildsCount()(Code)
Files and packages, but without the resources.



getJavaName
public String getJavaName()(Code)
According to folder and file names (ATTENTION !) private classes may have other names !!! (IGNORED HERE) the javaname for source files or packages (".") separated



getJavaPartName
public String getJavaPartName()(Code)
Also the java part name or simple name, used for node sorting.



getLastModified
public long getLastModified()(Code)
the lastModified field of the file or directory. SLOW. Direct call to file's lastModified routine, NOT cached.



getLastModifiedJavaFile
public long getLastModifiedJavaFile()(Code)
Cached. Set when call to setIsCompiled(*) or lookIfJavaFileChanged().



getLastStoredLastModifiedJavaFile
final public long getLastStoredLastModifiedJavaFile()(Code)
Is the date read when this was restored from vector rep. Used to create human readable changes logs



getName
public String getName()(Code)
Hello.java. ONLY USED IN VIEW (?)



getNodeNameToDisplayInTree
public String getNodeNameToDisplayInTree()(Code)
This is also the java part name, used for node sorting.



getPackageName
public String getPackageName()(Code)



getParserResultIfAlreadyMade
public ParserResult getParserResultIfAlreadyMade()(Code)



getResourceFiles
public List<ResourceFile> getResourceFiles()(Code)



getSimplifiedSyntaxTreeIfAlreadyMade
public SimplifiedSyntaxTree2 getSimplifiedSyntaxTreeIfAlreadyMade()(Code)



getVectorRep
public StorageVector getVectorRep()(Code)



hasFileContentChangedOnDiskSinceLastGetContent
public boolean hasFileContentChangedOnDiskSinceLastGetContent()(Code)



hasPackageDirectJavaChilds
public boolean hasPackageDirectJavaChilds()(Code)



hasTextRepresentation
public boolean hasTextRepresentation()(Code)



isBeingEdited
public boolean isBeingEdited()(Code)



isCompiled
public boolean isCompiled()(Code)



isDirectory
public boolean isDirectory()(Code)



isEditable
public boolean isEditable()(Code)
Looks on disk if the file can be written.



isIgnored
public boolean isIgnored()(Code)
Decision based on ignoredType directories may be partially ignored, if they contain both ignored and not ignored childs



isJavaFile
public boolean isJavaFile()(Code)



isSourceFile
public boolean isSourceFile()(Code)



liberateResourcesForGC
public void liberateResourcesForGC()(Code)



lookForAssociatedClassFiles
public List<File> lookForAssociatedClassFiles()(Code)
Used in JLint classes analysis tool... Classes are also removed when deleting a source file.



lookIfJavaFileChangedAndTreat
public boolean lookIfJavaFileChangedAndTreat()(Code)
Look if the date on disk has changed, if true, directly sets state to "not compiled". Automatically called at recreation and scan for external changes functions (manual sync, SVN, ...). CALL ONLY ONCE, AFTER FIRST CALL, SETS THE lastModifiedJavaFile to the actual date and compiled to false.



rename
public void rename(String newSimpleName, boolean renameTypeNameInFile, boolean renameInProject) throws Exception(Code)
Sorting is NOT performed (todo?).



renameAllOccurencesRegex
public void renameAllOccurencesRegex(String oldStr, String newStr) throws Exception(Code)
Used in the rename. Called for dependencies. BE CAREFUL !



restoreFromVectorRepr
public boolean restoreFromVectorRepr(StorageVector rep, SourcesTreeModel model) throws Exception(Code)
should be called after all source files have been restored in the project. because this also restore the dependencies lookIfJavaFileChanged();



saveContentToFile
public void saveContentToFile() throws Exception(Code)
If has been edited, i.e. setContentFromEditor() was called => writes the content to file (temporaryEditedContent) And sets the file to not compiled. Tail spaces are removed automatically.



setBeingEdited
public void setBeingEdited(boolean is)(Code)



setCaretPositionToRemember
public void setCaretPositionToRemember(int line, int column)(Code)



setClassRoot
public void setClassRoot(File classesRoot)(Code)
This will set or update the classFile reference (or package directory) look for all classes starting with this name.class ore name$ PROBLEM : classes that are not public are not constraint to carry the name of the java file !!! TODO recognize in the source files (parse or maybe a simple regex search) the class names (several possible !!)



setContentFromEditor
public void setContentFromEditor(String txt, boolean allowChangesFromOutside)(Code)
Sets the content edited. Will be stored later. Here, it is stored in temporaryEditedContent. Please check hasFileContentChangedOnDiskSinceLastGetContent() !
Parameters:
  allowChangesFromOutside - if false, and changes occured outside tIDE since last getContent() , throws a RuntimeException.



setIgnoredType
public void setIgnoredType(SourcesTreeIcon.Ignored a)(Code)



setIsCompiled
public void setIsCompiled(boolean is)(Code)
Called for folders based on child states. Called for childs based on the compiler success. Called at startup and when the file has been edited and stored (sets comp to false).



setParserResult
public void setParserResult(ParserResult st)(Code)



setSimplifiedSyntaxTree
public void setSimplifiedSyntaxTree(SimplifiedSyntaxTree2 st)(Code)
Deletes the old syntax tree, if any.



toString
public String toString()(Code)
Not really used, only for debug



Fields inherited from javax.swing.tree.DefaultMutableTreeNode
final public static Enumeration<TreeNode> EMPTY_ENUMERATION(Code)(Java Doc)
protected boolean allowsChildren(Code)(Java Doc)
protected Vector children(Code)(Java Doc)
protected MutableTreeNode parent(Code)(Java Doc)
protected transient Object userObject(Code)(Java Doc)

Methods inherited from javax.swing.tree.DefaultMutableTreeNode
public void add(MutableTreeNode newChild)(Code)(Java Doc)
public Enumeration breadthFirstEnumeration()(Code)(Java Doc)
public Enumeration children()(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
public Enumeration depthFirstEnumeration()(Code)(Java Doc)
public boolean getAllowsChildren()(Code)(Java Doc)
public TreeNode getChildAfter(TreeNode aChild)(Code)(Java Doc)
public TreeNode getChildAt(int index)(Code)(Java Doc)
public TreeNode getChildBefore(TreeNode aChild)(Code)(Java Doc)
public int getChildCount()(Code)(Java Doc)
public int getDepth()(Code)(Java Doc)
public TreeNode getFirstChild()(Code)(Java Doc)
public DefaultMutableTreeNode getFirstLeaf()(Code)(Java Doc)
public int getIndex(TreeNode aChild)(Code)(Java Doc)
public TreeNode getLastChild()(Code)(Java Doc)
public DefaultMutableTreeNode getLastLeaf()(Code)(Java Doc)
public int getLeafCount()(Code)(Java Doc)
public int getLevel()(Code)(Java Doc)
public DefaultMutableTreeNode getNextLeaf()(Code)(Java Doc)
public DefaultMutableTreeNode getNextNode()(Code)(Java Doc)
public DefaultMutableTreeNode getNextSibling()(Code)(Java Doc)
public TreeNode getParent()(Code)(Java Doc)
public TreeNode[] getPath()(Code)(Java Doc)
protected TreeNode[] getPathToRoot(TreeNode aNode, int depth)(Code)(Java Doc)
public DefaultMutableTreeNode getPreviousLeaf()(Code)(Java Doc)
public DefaultMutableTreeNode getPreviousNode()(Code)(Java Doc)
public DefaultMutableTreeNode getPreviousSibling()(Code)(Java Doc)
public TreeNode getRoot()(Code)(Java Doc)
public TreeNode getSharedAncestor(DefaultMutableTreeNode aNode)(Code)(Java Doc)
public int getSiblingCount()(Code)(Java Doc)
public Object getUserObject()(Code)(Java Doc)
public Object[] getUserObjectPath()(Code)(Java Doc)
public void insert(MutableTreeNode newChild, int childIndex)(Code)(Java Doc)
public boolean isLeaf()(Code)(Java Doc)
public boolean isNodeAncestor(TreeNode anotherNode)(Code)(Java Doc)
public boolean isNodeChild(TreeNode aNode)(Code)(Java Doc)
public boolean isNodeDescendant(DefaultMutableTreeNode anotherNode)(Code)(Java Doc)
public boolean isNodeRelated(DefaultMutableTreeNode aNode)(Code)(Java Doc)
public boolean isNodeSibling(TreeNode anotherNode)(Code)(Java Doc)
public boolean isRoot()(Code)(Java Doc)
public Enumeration pathFromAncestorEnumeration(TreeNode ancestor)(Code)(Java Doc)
public Enumeration postorderEnumeration()(Code)(Java Doc)
public Enumeration preorderEnumeration()(Code)(Java Doc)
public void remove(int childIndex)(Code)(Java Doc)
public void remove(MutableTreeNode aChild)(Code)(Java Doc)
public void removeAllChildren()(Code)(Java Doc)
public void removeFromParent()(Code)(Java Doc)
public void setAllowsChildren(boolean allows)(Code)(Java Doc)
public void setParent(MutableTreeNode newParent)(Code)(Java Doc)
public void setUserObject(Object userObject)(Code)(Java Doc)
public String toString()(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.