4 * this is the code represents a File when using the Gtk view..
18 public class PlainFile : JsRender
22 public PlainFile(Project.Project project, string path) {
25 this.xtype = "PlainFile";
27 var f = File.new_for_path (path) ;
28 var info = f.query_info ("standard::*", 0);
29 var ct = info.get_content_type();
31 this.language = "vala";
36 this.id = "file-plain-%d".printf(plid++);
38 // various loader methods..
40 // Class = list of arguments ... and which property to use as a value.
49 setNSID : function(id)
52 this.items[0]['*class'] = id;
61 public override void removeFiles() {
62 if (FileUtils.test(this.path, FileTest.EXISTS)) {
63 GLib.FileUtils.remove(this.path);
68 public override void loadItems() throws GLib.Error // : function(cb, sync) == original was async.
71 GLib.FileUtils.get_contents(this.path, out this.contents);
77 public override string toSourcePreview()
81 public override void setSource(string str) {
84 public override string toSource()
92 public override void save() {
93 this.writeFile(this.path, this.contents);
96 // ignore these calls.
97 public override void saveHTML ( string html ) {}
103 * save as a javascript file.
104 * why is this not save...???
109 string getHelpUrl(string cls)
113 public override void findTransStrings(Node? node )