Here Is it possible to use arrow keys alone to expand tree node in package explorer in Eclipse on Linux? I've found good idea to change behavior of treeview in eclipse. I'd like to improve it, but I'm don't know how to do, because i cant found example of using if-then-else statement in gtk.css configuration file.
I've found the couple of methods "test-collapse-row" and "test-expand-row" in ref below https://developer.gnome.org/gtk3/stable/GtkTreeView.html#GtkTreeView-select-cursor-row to test current line on expandable it or not. I've tried to find an example with condition for css key bindings but yet not found.
@binding-set MyTreeViewBinding
{
bind "Left" { "select-cursor-parent" ()
"expand-collapse-cursor-row" (0,0,0) };
/* I've try code below instead code above - isn't work
bind "Left" { if ("test-expand-row" ())
"expand-collapse-cursor-row" (0,0,0)
else
"select-cursor-parent" () }; */
bind "Right" { "expand-collapse-cursor-row" (0,1,0) };
}
treeview
{
-gtk-key-bindings: MyTreeViewBinding;
}
I need if it node, and it not collapsed collapse it, but if it not node or it already collapsed set up pointer to parent, but don't collapse it.