},
*/
- public override void removeFiles() {
- var js = GLib.Path.get_dirname(this.path) +"/" + name + ".js";
- if (FileUtils.test(js, FileTest.EXISTS)) {
- GLib.FileUtils.remove(js);
- }
- var vala = GLib.Path.get_dirname(this.path) +"/" + name + ".vala";
- if (FileUtils.test(vala, FileTest.EXISTS)) {
- GLib.FileUtils.remove(vala);
+ public override void removeFiles() {
+ var js = GLib.Path.get_dirname(this.path) +"/" + name + ".js";
+ if (FileUtils.test(js, FileTest.EXISTS)) {
+ GLib.FileUtils.remove(js);
+ }
+ var vala = GLib.Path.get_dirname(this.path) +"/" + name + ".vala";
+ if (FileUtils.test(vala, FileTest.EXISTS)) {
+ GLib.FileUtils.remove(vala);
+ }
}
- }
- public override void loadItems() throws GLib.Error // : function(cb, sync) == original was async.
- {
-
- print("load Items!");
- if (this.tree != null) {
- return;
- }
-
- print("load: " + this.path);
+ public override void loadItems() throws GLib.Error // : function(cb, sync) == original was async.
+ {
+
+ print("load Items!");
+ if (this.tree != null) {
+ return;
+ }
+
+ print("load: " + this.path);
- var pa = new Json.Parser();
- pa.load_from_file(this.path);
- var node = pa.get_root();
-
- if (node.get_node_type () != Json.NodeType.OBJECT) {
- throw new Error.INVALID_FORMAT ("Unexpected element type %s", node.type_name ());
- }
- var obj = node.get_object ();
-
- this.name = obj.get_string_member("name");
- this.parent = obj.get_string_member("parent");
- this.title = obj.get_string_member("title");
-
- if (obj.has_member("build_module")) { // should check type really..
+ var pa = new Json.Parser();
+ pa.load_from_file(this.path);
+ var node = pa.get_root();
+
+ if (node.get_node_type () != Json.NodeType.OBJECT) {
+ throw new Error.INVALID_FORMAT ("Unexpected element type %s", node.type_name ());
+ }
+ var obj = node.get_object ();
+
+ this.name = obj.get_string_member("name");
+ this.parent = obj.get_string_member("parent");
+ this.title = obj.get_string_member("title");
+
+ if (obj.has_member("build_module")) { // should check type really..
this.build_module = obj.get_string_member("build_module");
- }
-
- // load items[0] ??? into tree...
+ }
+
+ // load items[0] ??? into tree...
var bjs_version_str = this.jsonHasOrEmpty(obj, "bjs-version");
bjs_version_str = bjs_version_str == "" ? "1" : bjs_version_str;
}
-
- }
-
- // convert xtype for munged output..
+
+ }
- /*
- mungeXtype : function(xtype, els)
- {
- els.push('xtype: '+ xtype);
- },
- */
+
public override string toSourcePreview()
{