"# Project.Project project" : "null",
"# WindowState windowstate" : "",
"# bool winloading" : false,
+ "# default_height" : 850,
"$ type" : "Gtk.WindowType.TOPLEVEL",
"$ xns" : "Gtk",
"* ctor" : "new Gtk.ApplicationWindow(BuilderApplication.singleton({}))",
""
],
"border_width" : 0,
- "default_height" : 850,
"default_width" : 1200,
"id" : "MainWindow",
"items" : [
"listeners" : {
"bind" : [
"(listitem) => {",
- "\t var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();",
- "\t var item = (listitem as Gtk.ListItem).get_item() as WindowState;",
- "\t ",
+ "\tvar li = (listitem as Gtk.ListItem);",
+ "\tif (li == null) {",
+ "\t\treturn;",
+ "\t}",
+ "\t var lb = (Gtk.Label) li.get_child() as Gtk.Label;",
+ "\t if (lb == null) {",
+ "\t \treturn;",
+ " \t}",
+ "\t var item = li.get_item() as WindowState;",
+ "\t if (item == null) {",
+ "\t \treturn;",
+ " \t}",
"\t lb.label = item.project.name;",
"",
"",
],
"setup" : [
"(listitem) => {",
+ "",
+ "\tvar li = (listitem as Gtk.ListItem);",
+ "\tif (li == null) {",
+ "\t\treturn;",
+ "\t}",
+ "",
"\tvar lbl = new Gtk.Label(\"\");",
- " \t(listitem as Gtk.ListItem).set_child(lbl);",
+ " \tli.set_child(lbl);",
" \tlbl.justify = Gtk.Justification.LEFT;",
" \tlbl.xalign = 0;",
" \tlbl.use_markup = true;",
"\tlbl.ellipsize = Pango.EllipsizeMode.START;",
" ",
- "\t(listitem as Gtk.ListItem).activatable = true;",
+ "\tli.activatable = true;",
"}",
""
]
"listeners" : {
"bind" : [
"(listitem) => {",
- " var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();",
- " var item = (listitem as Gtk.ListItem).get_item() as WindowState;",
- " ",
- " lb.label = item.file.relpath;",
+ "\tvar li = (listitem as Gtk.ListItem);",
+ "\tif (li == null) {",
+ "\t\treturn;",
+ "\t}",
+ "\t var lb = (Gtk.Label) li.get_child() as Gtk.Label;",
+ "\t if (lb == null) {",
+ "\t \treturn;",
+ " \t}",
+ "\t var item = li.get_item() as WindowState;",
+ "\t if (item == null) {",
+ "\t \treturn;",
+ " \t}",
+ " \t",
+ " \t ",
+ " ",
+ " \tlb.label = item.file.relpath;",
"",
"",
" ",
],
"setup" : [
"(listitem) => {",
+ "\tvar li = (listitem as Gtk.ListItem);",
+ "\tif (li == null) {",
+ "\t\treturn;",
+ "\t}",
"\tvar lbl = new Gtk.Label(\"\");",
- " \t(listitem as Gtk.ListItem).set_child(lbl);",
+ " \tli.set_child(lbl);",
" \tlbl.justify = Gtk.Justification.LEFT;",
" \tlbl.xalign = 0;",
" \tlbl.use_markup = true;",
"\tlbl.ellipsize = Pango.EllipsizeMode.START;",
" ",
- "\t(listitem as Gtk.ListItem).activatable = true;",
+ "\tli.activatable = true;",
"}",
""
]
"\t BuilderApplication.removeWindow(this);",
"\t ",
"\t if (BuilderApplication.windows.size < 1) {",
- "\t\tthis.windowstate.file.getLanguageServer().exit();",
+ "\t \ttry {",
+ "\t\t\tthis.windowstate.file.getLanguageServer().exit();",
+ "\t\t} catch(Error e) {}",
+ "\t\t",
"\t\tBuilderApplication.singleton( null ).quit();",
"\t }",
"\treturn true;",
// set gobject values
this.el.title = "Roo Application Builder";
- this.el.default_height = 850;
this.el.default_width = 1200;
new Xcls_headerbar( _this );
this.el.set_titlebar ( _this.headerbar.el );
BuilderApplication.removeWindow(this);
if (BuilderApplication.windows.size < 1) {
- this.windowstate.file.getLanguageServer().exit();
+ try {
+ this.windowstate.file.getLanguageServer().exit();
+ } catch(Error e) {}
+
BuilderApplication.singleton( null ).quit();
}
return true;
//listeners
this.el.setup.connect( (listitem) => {
+
+ var li = (listitem as Gtk.ListItem);
+ if (li == null) {
+ return;
+ }
+
var lbl = new Gtk.Label("");
- (listitem as Gtk.ListItem).set_child(lbl);
+ li.set_child(lbl);
lbl.justify = Gtk.Justification.LEFT;
lbl.xalign = 0;
lbl.use_markup = true;
lbl.ellipsize = Pango.EllipsizeMode.START;
- (listitem as Gtk.ListItem).activatable = true;
+ li.activatable = true;
});
this.el.bind.connect( (listitem) => {
- var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
- var item = (listitem as Gtk.ListItem).get_item() as WindowState;
-
+ var li = (listitem as Gtk.ListItem);
+ if (li == null) {
+ return;
+ }
+ var lb = (Gtk.Label) li.get_child() as Gtk.Label;
+ if (lb == null) {
+ return;
+ }
+ var item = li.get_item() as WindowState;
+ if (item == null) {
+ return;
+ }
lb.label = item.project.name;
//listeners
this.el.setup.connect( (listitem) => {
+ var li = (listitem as Gtk.ListItem);
+ if (li == null) {
+ return;
+ }
var lbl = new Gtk.Label("");
- (listitem as Gtk.ListItem).set_child(lbl);
+ li.set_child(lbl);
lbl.justify = Gtk.Justification.LEFT;
lbl.xalign = 0;
lbl.use_markup = true;
lbl.ellipsize = Pango.EllipsizeMode.START;
- (listitem as Gtk.ListItem).activatable = true;
+ li.activatable = true;
});
this.el.bind.connect( (listitem) => {
- var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
- var item = (listitem as Gtk.ListItem).get_item() as WindowState;
-
- lb.label = item.file.relpath;
+ var li = (listitem as Gtk.ListItem);
+ if (li == null) {
+ return;
+ }
+ var lb = (Gtk.Label) li.get_child() as Gtk.Label;
+ if (lb == null) {
+ return;
+ }
+ var item = li.get_item() as WindowState;
+ if (item == null) {
+ return;
+ }
+
+
+
+ lb.label = item.file.relpath;
"gen_extended" : false,
"items" : [
{
+ "# Gee.HashMap<string,Gtk.TreeListRow>? rows" : "null",
"# Xcls_MainWindow window" : "",
"$ xns" : "Gtk",
"* ctor" : "new Gtk.Popover()",
"\tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
"\tvar np = (Palete.CompileError) lr.get_item();",
"\t",
+ "\tif (np.diag == null) {",
+ "\t\t_this.rows.set(np.file.path, lr);",
+ "\t",
+ "\t}",
+ "",
"\t",
"\t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
"\tlbl.label = np.linemsg;",
" \t GLib.debug(\"errors : none available\");",
" \treturn;",
"\t}",
- " \t//this.el.present();",
- " //this.el.popup();",
- " ",
- " //print(\"looking for %s\\n\", id);",
- " // loop through parent childnre",
- " ",
- " ",
- " ; //<< very important!!!",
- " ",
- " // store.set_sort_column_id(0,Gtk.SortType.ASCENDING);",
- " ",
+ " \t ",
" var win = this.window.el;",
" var w = win.get_width();",
" var h = win.get_height();",
" GLib.debug(\"set size\");",
" this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));",
" ",
- "",
- " // this.el.set_relative_to(onbtn);",
- "\t//Gtk.Allocation rect;",
- "\t//onbtn.get_allocation(out rect);",
- " //this.el.set_pointing_to(rect);",
- "\t//this.el.present();",
+ " ",
"\t",
"\tGLib.debug(\"call popup\");",
" this.el.popup();",
- " // only need to load once.",
- " \t//if (!this.loaded) {",
- " \t\t ",
- "\t\t//this.loaded = true;",
- "\t //}",
- "\t ",
- " ",
- " ",
- " \t//if (expand != null) {",
- " //\t_this.compile_tree.el.expand_row( store.get_path(expand) , true);",
- "//\t}",
- " ",
- " // this.hpane.el.set_position( 0);",
+ " if (this.rows.has_key(this.window.windowstate.file.path)) {",
+ " \tthis.rows.get(this.window.windowstate.file.path).expanded = true;",
+ " }",
"}",
""
],
"\t\t}",
"\t\t",
"\t);",
- " ",
+ "\tthis.rows = new Gee.HashMap<string,Gtk.TreeListRow>();",
"\t_this.model.el = tm;",
"\t_this.sortmodel.el.set_model(tm);",
"\t this.tree.el.show();",
+ "\t if (this.rows.has_key(this.window.windowstate.file.path)) {",
+ " \tthis.rows.get(this.window.windowstate.file.path).expanded = true;",
+ " }",
"}"
]
}
public Xcls_model model;
// my vars (def)
+ public Gee.HashMap<string,Gtk.TreeListRow>? rows;
public Xcls_MainWindow window;
public bool loaded;
this.el = new Gtk.Popover();
// my vars (dec)
+ this.rows = null;
this.loaded = false;
// set gobject values
}
);
-
+ this.rows = new Gee.HashMap<string,Gtk.TreeListRow>();
_this.model.el = tm;
_this.sortmodel.el.set_model(tm);
this.tree.el.show();
+ if (this.rows.has_key(this.window.windowstate.file.path)) {
+ this.rows.get(this.window.windowstate.file.path).expanded = true;
+ }
}
public void show ( ) {
GLib.debug("errors : show");
GLib.debug("errors : none available");
return;
}
- //this.el.present();
- //this.el.popup();
-
- //print("looking for %s\n", id);
- // loop through parent childnre
-
-
- ; //<< very important!!!
-
- // store.set_sort_column_id(0,Gtk.SortType.ASCENDING);
-
+
var win = this.window.el;
var w = win.get_width();
var h = win.get_height();
GLib.debug("set size");
this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));
-
- // this.el.set_relative_to(onbtn);
- //Gtk.Allocation rect;
- //onbtn.get_allocation(out rect);
- //this.el.set_pointing_to(rect);
- //this.el.present();
+
GLib.debug("call popup");
this.el.popup();
- // only need to load once.
- //if (!this.loaded) {
-
- //this.loaded = true;
- //}
-
-
-
- //if (expand != null) {
- // _this.compile_tree.el.expand_row( store.get_path(expand) , true);
- // }
-
- // this.hpane.el.set_position( 0);
+ if (this.rows.has_key(this.window.windowstate.file.path)) {
+ this.rows.get(this.window.windowstate.file.path).expanded = true;
+ }
}
public class Xcls_compile_view : Object
{
// set gobject values
this.el.homogeneous = false;
this.el.hexpand = false;
- var child_1 = new Xcls_ScrolledWindow3( _this );
+ var child_1 = new Xcls_ScrolledWindow2( _this );
child_1.ref();
this.el.append( child_1.el );
}
// user defined functions
}
- public class Xcls_ScrolledWindow3 : Object
+ public class Xcls_ScrolledWindow2 : Object
{
public Gtk.ScrolledWindow el;
private Xcls_ValaCompileErrors _this;
// my vars (def)
// ctor
- public Xcls_ScrolledWindow3(Xcls_ValaCompileErrors _owner )
+ public Xcls_ScrolledWindow2(Xcls_ValaCompileErrors _owner )
{
_this = _owner;
this.el = new Gtk.ScrolledWindow();
// set gobject values
this.el.hexpand = true;
this.el.vexpand = true;
- var child_2 = new Xcls_ColumnViewColumn11( _this );
+ var child_2 = new Xcls_ColumnViewColumn10( _this );
child_2.ref();
this.el.append_column ( child_2.el );
- var child_3 = new Xcls_GestureClick13( _this );
+ var child_3 = new Xcls_GestureClick12( _this );
child_3.ref();
this.el.add_controller( child_3.el );
}
_this = _owner;
_this.sortmodel = this;
new Xcls_model( _this );
- var child_2 = new Xcls_TreeListRowSorter8( _this );
+ var child_2 = new Xcls_TreeListRowSorter7( _this );
child_2.ref();
this.el = new Gtk.SortListModel( _this.model.el, child_2.el );
// user defined functions
}
- public class Xcls_TreeListRowSorter8 : Object
+ public class Xcls_TreeListRowSorter7 : Object
{
public Gtk.TreeListRowSorter el;
private Xcls_ValaCompileErrors _this;
// my vars (def)
// ctor
- public Xcls_TreeListRowSorter8(Xcls_ValaCompileErrors _owner )
+ public Xcls_TreeListRowSorter7(Xcls_ValaCompileErrors _owner )
{
_this = _owner;
- var child_1 = new Xcls_StringSorter9( _this );
+ var child_1 = new Xcls_StringSorter8( _this );
child_1.ref();
this.el = new Gtk.TreeListRowSorter( child_1.el );
// user defined functions
}
- public class Xcls_StringSorter9 : Object
+ public class Xcls_StringSorter8 : Object
{
public Gtk.StringSorter el;
private Xcls_ValaCompileErrors _this;
// my vars (def)
// ctor
- public Xcls_StringSorter9(Xcls_ValaCompileErrors _owner )
+ public Xcls_StringSorter8(Xcls_ValaCompileErrors _owner )
{
_this = _owner;
- var child_1 = new Xcls_PropertyExpression10( _this );
+ var child_1 = new Xcls_PropertyExpression9( _this );
child_1.ref();
this.el = new Gtk.StringSorter( child_1.el );
// user defined functions
}
- public class Xcls_PropertyExpression10 : Object
+ public class Xcls_PropertyExpression9 : Object
{
public Gtk.PropertyExpression el;
private Xcls_ValaCompileErrors _this;
// my vars (def)
// ctor
- public Xcls_PropertyExpression10(Xcls_ValaCompileErrors _owner )
+ public Xcls_PropertyExpression9(Xcls_ValaCompileErrors _owner )
{
_this = _owner;
this.el = new Gtk.PropertyExpression( typeof(Palete.CompileError), null, "linemsg" );
- public class Xcls_ColumnViewColumn11 : Object
+ public class Xcls_ColumnViewColumn10 : Object
{
public Gtk.ColumnViewColumn el;
private Xcls_ValaCompileErrors _this;
// my vars (def)
// ctor
- public Xcls_ColumnViewColumn11(Xcls_ValaCompileErrors _owner )
+ public Xcls_ColumnViewColumn10(Xcls_ValaCompileErrors _owner )
{
_this = _owner;
- var child_1 = new Xcls_SignalListItemFactory12( _this );
+ var child_1 = new Xcls_SignalListItemFactory11( _this );
child_1.ref();
this.el = new Gtk.ColumnViewColumn( "Compile Result", child_1.el );
// user defined functions
}
- public class Xcls_SignalListItemFactory12 : Object
+ public class Xcls_SignalListItemFactory11 : Object
{
public Gtk.SignalListItemFactory el;
private Xcls_ValaCompileErrors _this;
// my vars (def)
// ctor
- public Xcls_SignalListItemFactory12(Xcls_ValaCompileErrors _owner )
+ public Xcls_SignalListItemFactory11(Xcls_ValaCompileErrors _owner )
{
_this = _owner;
this.el = new Gtk.SignalListItemFactory();
var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
var np = (Palete.CompileError) lr.get_item();
+ if (np.diag == null) {
+ _this.rows.set(np.file.path, lr);
+
+ }
+
//GLib.debug("change %s to %s", lbl.label, np.name);
lbl.label = np.linemsg;
}
- public class Xcls_GestureClick13 : Object
+ public class Xcls_GestureClick12 : Object
{
public Gtk.GestureClick el;
private Xcls_ValaCompileErrors _this;
// my vars (def)
// ctor
- public Xcls_GestureClick13(Xcls_ValaCompileErrors _owner )
+ public Xcls_GestureClick12(Xcls_ValaCompileErrors _owner )
{
_this = _owner;
this.el = new Gtk.GestureClick();
"items" : [
{
"# Xcls_MainWindow? main_window" : "null",
+ "# int last_error_counter" : "-1",
"$ xns" : "Gtk",
"@ bool before_node_change" : "()",
"@ void changed" : "()",
"bool hexpand" : true,
"bool vexpand" : true,
"id" : "WindowLeftTree",
- "int last_error_counter" : "-1",
"items" : [
{
"$ xns" : "Gtk",
"| JsRender.JsRender getActiveFile" : [
"() {",
" return this.main_window.windowstate.file;",
+ " ",
"}",
""
],
}
public JsRender.JsRender getActiveFile () {
return this.main_window.windowstate.file;
+
}
public class Xcls_ListView1 : Object
{