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";
29 this.language = "vala";
34 this.id = "file-plain-%d".printf(gid++);
36 // various loader methods..
38 // Class = list of arguments ... and which property to use as a value.
47 setNSID : function(id)
50 this.items[0]['*class'] = id;
59 public override void removeFiles() {
60 if (FileUtils.test(this.pat, FileTest.EXISTS)) {
61 GLib.FileUtils.remove(this.pat);
66 public override void loadItems() throws GLib.Error // : function(cb, sync) == original was async.
73 public override string toSourcePreview()
78 public override string toSource()
86 public override void save() {
88 // this.saveJS(); - disabled at present.. project settings will probably enable this later..
92 // ignore these calls.
93 public override void saveHTML ( string html ) {}
99 * save as a javascript file.
100 * why is this not save...???
107 var fn = GLib.Path.get_dirname(this.path) + "/" + this.name + ".js";
108 print("WRITE :%s\n " , fn);
109 this.writeFile(fn, this.toSource());
115 if (this.tree == null) {
118 var fn = GLib.Path.get_dirname(this.path) + "/" + this.name + ".vala";
119 print("WRITE :%s\n " , fn);
120 this.writeFile(fn, NodeToVala.mungeFile(this));
125 valaCompileCmd : function()
128 var fn = '/tmp/' + this.name + '.vala';
129 print("WRITE : " + fn);
130 File.write(fn, this.toVala(true));
137 "--pkg" , "gtk+-3.0",
138 "--pkg", "libnotify",
139 "--pkg", "gtksourceview-3.0",
140 "--pkg", "libwnck-3.0",
141 fn , "-o", "/tmp/" + this.name];
150 string getHelpUrl(string cls)
152 return "http://devel.akbkhome.com/seed/" + cls + ".html";
154 public override void findTransStrings(Node? node )