001: package tide.sources;
002:
003: import snow.utils.storage.*;
004: import tide.syntaxtree.*;
005: import javax.swing.tree.*;
006: import javax.swing.undo.*;
007: import java.io.*;
008: import java.util.*;
009:
010: public final class ResourceFile extends DefaultMutableTreeNode
011: implements FileItem {
012: final String name;
013: String packageName;
014:
015: public ResourceFile(String name, String packageName) {
016: //super(name);
017: this .name = name;
018: this .packageName = packageName;
019: }
020:
021: /** "Hello" Used in the tree as display */
022: public String getName() {
023: return name;
024: }
025:
026: /** "mypack.Hello" used to address the class */
027: public String getJavaName() {
028: return name;
029: }
030:
031: /** "mypack" is the package name */
032: public String getPackageName() {
033: return packageName;
034: }
035:
036: public String getContent() throws Exception {
037: throw new Exception("no content");
038: }
039:
040: /** data may be lost if not saved previously !
041: * used to enforce reload from file !
042: */
043: public void deleteCachedContent() {
044: }
045:
046: public long getLastModified() {
047: return -1;
048: }
049:
050: public long getFileSize() {
051: return -1;
052: }
053:
054: public int getCaretLinePosition() {
055: return -1;
056: }
057:
058: public int getCaretColumnPosition() {
059: return -1;
060: }
061:
062: public void setCaretPositionToRemember(int line, int column) {
063: }
064:
065: public String getJavaPartName() {
066: return name;
067: }
068:
069: public boolean isJavaFile() {
070: return false;
071: }
072:
073: public boolean isDirectory() {
074: return false;
075: }
076:
077: public boolean isSourceFile() {
078: return false;
079: }
080:
081: public boolean isIgnored() {
082: return false;
083: }
084:
085: public boolean isEditable() {
086: return false;
087: }
088:
089: public boolean hasTextRepresentation() {
090: return false;
091: }
092:
093: public boolean hasPackageDirectJavaChilds() {
094: return false;
095: }
096:
097: public SimplifiedSyntaxTree2 getSimplifiedSyntaxTreeIfAlreadyMade() {
098: return null;
099: }
100:
101: public void setSimplifiedSyntaxTree(SimplifiedSyntaxTree2 st) {
102: }
103:
104: public ParserResult getParserResultIfAlreadyMade() {
105: return null;
106: }
107:
108: public void setParserResult(ParserResult st) {
109: }
110:
111: public void liberateResourcesForGC() {
112: }
113:
114: public boolean getHasBeenRemoved() {
115: return false;
116: }
117:
118: }
|