src/Palete/Gtk.vala
authorAlan Knowles <alan@roojs.com>
Tue, 18 Oct 2022 09:33:42 +0000 (17:33 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 18 Oct 2022 09:33:42 +0000 (17:33 +0800)
src/Palete/Gtk.vala

index 4b4f227..37b30c5 100644 (file)
@@ -991,7 +991,7 @@ namespace Palete {
                                for (var i =0; i < max;i++) {
                                        var m = (Vala.TokenType)i;
                                        var s = m.to_string();
-                                       var ss = s.slice(1,-1);
+                                       var ss = s.slice(1,-1); 
                                        if (s[0] == '`' && GLib.Regex.match_simple("^[a-z]+$", ss) &&
                                                complete_string != ss && ss.index_of(complete_string,0) == 0 ) {
                                                var sci = SourceCompletionItem.new2();
@@ -1007,13 +1007,25 @@ namespace Palete {
                                        var ss = miter.get_key();
                                        
                                        if (complete_string != ss && ss.index_of(complete_string,0) == 0 ) {
-                                               ret.append(new SourceCompletionItem (ss, ss, null, "vala namespace : " + ss));
+                                       
+                                                       var sci = SourceCompletionItem.new2();
+                                               //string label, string text, Pixbuf? icon, string? info)
+                                               sci.label = ss;
+                                               sci.text = ss;
+                                               sci.info = "vala namespace: " + ss;
+                                               ret.append(sci);
                                        }
                                }
                                 
                                
                                if (complete_string != "_this" && "_this".index_of(complete_string,0) == 0 ) { // should we ignore exact matches... ???
-                                       ret.append(new SourceCompletionItem ("_this - the top level element", "_this", null, "Top level element"));
+                                       
+                                       var sci = SourceCompletionItem.new2();
+                                       //string label, string text, Pixbuf? icon, string? info)
+                                       sci.label = "_this - the top level element";
+                                       sci.text = "_this";
+                                       sci.info = "Reference to the container object instance of this file";
+                                       ret.append(sci);
                                }
                                // basic types..