3 * Code to convert node tree to Vala...
5 * usage : x = (new JsRender.NodeToVala(node)).munge();
9 * pack - can we come up with a replacement?
10 - parent.child == child_widget -- actually uses getters and effectively does 'add'?
14 * args -- vala constructor args (should really only be used at top level - we did use it for clutter originally(
15 * ctor -- different ctor argument
26 public class JsRender.NodeToVala : Object {
34 string cls; // node fqn()
41 Gee.ArrayList<string> ignoreList;
42 Gee.ArrayList<string> ignoreWrappedList;
43 Gee.ArrayList<string> myvars;
44 Gee.ArrayList<Node> vitems; // top level items
50 * ctor - just initializes things
51 * - wraps a render node
53 public NodeToVala( JsRender file, Node node, int depth, NodeToVala? parent)
59 this.inpad = string.nfill(depth > 0 ? 4 : 0, ' ');
60 this.pad = this.inpad + " ";
61 this.ipad = this.inpad + " ";
62 this.cls = node.xvala_cls;
63 this.xcls = node.xvala_xcls;
65 this.cur_line = parent == null ? 0 : parent.cur_line;
68 this.top = parent == null ? this : parent.top;
69 this.ignoreList = new Gee.ArrayList<string>();
70 this.ignoreWrappedList = new Gee.ArrayList<string>();
71 this.myvars = new Gee.ArrayList<string>();
72 this.vitems = new Gee.ArrayList<Node>();
75 // initialize line data..
76 node.line_start = this.cur_line;
77 node.line_end = this.cur_line;
78 node.lines = new Gee.ArrayList<int>();
79 node.line_map = new Gee.HashMap<int,string>();
81 node.node_lines = new Gee.ArrayList<int>();
82 node.node_lines_map = new Gee.HashMap<int,Node>();
88 string toValaNS(Node item)
90 var ns = item.get("xns") ;
91 if (ns == "GtkSource") {
96 public void toValaName(Node item, int depth =0)
100 var ns = this.toValaNS(item) ;
101 var cls = ns + item.get("xtype");
104 item.xvala_cls = cls;
107 string id = item.get("id").length > 0 ?
108 item.get("id") : "%s%d".printf(item.get("xtype"), this.vcnt);
113 if (id[0] == '*' || id[0] == '+') {
114 item.xvala_xcls = "Xcls_" + id.substring(1);
116 item.xvala_xcls = "Xcls_" + id;
122 this.vitems.add(item);
124 // setting id on top level class changes it classname..
125 // oddly enough we havent really thought about namespacing here.
127 } else if (!item.props.has_key("id")) {
128 // use the file name..
129 item.xvala_xcls = this.file.name;
131 item.xvala_id = this.file.name;
136 if (item.items.size < 1) {
139 for(var i =0;i<item.items.size;i++) {
140 this.toValaName(item.items.get(i), depth+1);
145 * Main entry point to convert a file into a string..
147 public static string mungeFile(JsRender file)
149 if (file.tree == null) {
153 var n = new NodeToVala(file, file.tree, 0, null);
157 n.toValaName(file.tree);
160 GLib.debug("top cls %s / xlcs %s\n ",file.tree.xvala_cls,file.tree.xvala_cls);
161 n.cls = file.tree.xvala_cls;
162 n.xcls = file.tree.xvala_xcls;
168 public string munge ( )
170 //return this.mungeToString(this.node);
175 this.ignore("xtype");
181 this.addTopProperties();
183 this.addPlusProperties();
186 this.addWrappedCtor();
188 this.addInitMyVars();
189 this.addWrappedProperties();
194 this.addUserMethods();
201 public string mungeChild( Node cnode)
203 var x = new NodeToVala(this.file, cnode, this.depth+1, this);
206 public void addLine(string str= "")
209 //this.ret += "/*%d*/ ".printf(this.cur_line-1) + str + "\n";
210 this.ret += str + "\n";
212 public void addMultiLine(string str= "")
215 this.cur_line += str.split("\n").length;
216 //this.ret += "/*%d*/ ".printf(l) + str + "\n";
217 this.ret += str + "\n";
221 public void globalVars()
223 if (this.depth > 0) {
226 // Global Vars..??? when did this get removed..?
227 //this.ret += this.inpad + "public static " + this.xcls + " " + this.node.xvala_id+ ";\n\n";
229 this.addLine(this.inpad + "static " + this.xcls + " _" + this.node.xvala_id+ ";");
238 // class xxx { WrappedGtk el; }
239 this.node.line_start = this.cur_line;
241 this.top.node.setNodeLine(this.cur_line, this.node);
243 this.addLine(inpad + "public class " + this.xcls + " : Object");
244 this.addLine(this.inpad + "{");
247 this.addLine(this.pad + "public " + this.cls + " el;");
249 this.addLine(this.pad + "private " + this.top.xcls + " _this;");
261 this.addLine(pad + "public static " + xcls + " singleton()");
262 this.addLine(this.pad + "{");
263 this.addLine(this.ipad + "if (_" + this.node.xvala_id + " == null) {");
264 this.addLine(this.ipad + " _" + this.node.xvala_id + "= new "+ this.xcls + "();"); // what about args?
265 this.addLine(this.ipad + "}");
266 this.addLine(this.ipad + "return _" + this.node.xvala_id +";");
267 this.addLine(this.pad + "}");
271 * when ID is used... on an element, it registeres a property on the top level...
272 * so that _this.ID always works..
275 void addTopProperties()
277 if (this.depth > 0) {
280 // properties - global..??
282 var iter = this.vitems.list_iterator();
287 if (!n.props.has_key("id") || n.xvala_id.length < 0) {
291 if (n.xvala_id[0] == '*') {
294 if (n.xvala_id[0] == '+') {
297 this.addLine(this.pad + "public " + n.xvala_xcls + " " + n.xvala_id + ";");
303 * create properties that are not 'part of the wrapped element.
310 GLib.debug("callinged addMhyVars");
313 this.addLine(this.ipad + "// my vars (def)");
317 var cls = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn());
320 GLib.debug("Gir factory failed to find class %s", this.node.fqn());
327 var iter = this.node.props.map_iterator();
328 while (iter.next()) {
330 var prop = iter.get_value();
332 if (this.shouldIgnore(prop.name)) {
336 // user defined method
337 if (prop.ptype == NodePropType.METHOD) {
340 if (prop.ptype == NodePropType.SPECIAL) {
344 if (prop.ptype == NodePropType.SIGNAL) {
345 this.node.setLine(this.cur_line, "p", prop.name);
346 this.addLine(this.pad + "public signal " + prop.rtype + " " + prop.name + " " + prop.val + ";");
348 this.ignore(prop.name);
352 GLib.debug("Got myvars: %s", prop.name.strip());
354 if (prop.rtype.strip().length < 1) {
358 // is it a class property...
359 if (cls.props.has_key(prop.name) && prop.ptype != NodePropType.USER) {
363 this.myvars.add(prop.name);
364 prop.start_line = this.cur_line;
366 this.node.setLine(this.cur_line, "p", prop.name);
368 this.addLine(this.pad + "public " + prop.rtype + " " + prop.name + ";"); // definer - does not include value.
371 prop.end_line = this.cur_line;
372 this.ignore(prop.name);
378 // if id of child is '+' then it's a property of this..
379 void addPlusProperties()
381 if (this.node.items.size < 1) {
384 var iter = this.node.items.list_iterator();
385 while (iter.next()) {
388 if (ci.xvala_id[0] != '+') {
389 continue; // skip generation of children?
393 this.addLine(this.pad + "public " + ci.xvala_xcls + " " + ci.xvala_id.substring(1) + ";");
399 * add the constructor definition..
411 this.addLine(this.pad + "// ctor");
413 if (this.node.has("* args")) {
414 // not sure what this is supposed to be ding..
416 cargs_str = this.node.get("* args");
417 //var ar = this.node.get("* args");.split(",");
418 //for (var ari =0; ari < ar.length; ari++) {
419 // cargs += (ar[ari].trim().split(" ").pop();
423 if (this.depth < 1) {
425 // top level - does not pass the top level element..
426 this.addLine(this.pad + "public " + this.xcls + "(" + cargs_str +")");
427 this.addLine(this.pad + "{");
429 if (cargs_str.length > 0) {
430 cargs_str = ", " + cargs_str;
432 // for sub classes = we passs the top level as _owner
433 this.addLine(this.pad + "public " + this.xcls + "(" + this.top.xcls + " _owner " + cargs_str + ")");
434 this.addLine(this.pad + "{");
440 * make sure _this is defined..
446 this.addLine( this.ipad + "_this = this;");
449 // for non top level = _this point to owner, and _this.ID is set
451 this.addLine( this.ipad + "_this = _owner;");
453 if (this.node.props.has_key("id")
455 this.node.xvala_id != ""
457 this.node.xvala_id[0] != '*'
459 this.node.xvala_id[0] != '+'
461 this.addLine( this.ipad + "_this." + node.xvala_id + " = this;");
467 * Initialize this.el to point to the wrapped element.
472 void addWrappedCtor()
475 // this may need to look up properties to fill in the arguments..
476 // introspection does not workk..... - as things like gtkmessagedialog
478 if (cls == 'Gtk.Table') {
480 var methods = this.palete.getPropertiesFor(cls, 'methods');
482 print(JSON.stringify(this.palete.proplist[cls], null,4));
487 // ctor can still override.
488 if (this.node.has("* ctor")) {
489 this.node.setLine(this.cur_line, "p", "* ctor");
490 this.addLine(this.ipad + "this.el = " + this.node.get("* ctor")+ ";");
494 this.node.setLine(this.cur_line, "p", "* xtype");;
496 // is the wrapped element a struct?
498 var ncls = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn());
499 if (ncls != null && ncls.nodetype == "Struct") {
500 // we can use regular setters to apply the values.
501 this.addLine(this.ipad + "this.el = " + this.node.fqn() + "();");
509 switch(this.node.fqn()) {
512 var is_entry = this.node.has("has_entry") && this.node.get_prop("has_entry").val.down() == "true";
514 break; // regular ctor.
516 this.ignoreWrapped("has_entry");
517 ctor = ".with_entry";
521 case "Gtk.ListStore":
522 case "Gtk.TreeStore":
524 // not sure if this works.. otherwise we have to go with varargs and count + vals...
525 if (this.node.has("* types")) {
526 args_str = this.node.get_prop("* types").val;
528 if (this.node.has("n_columns") && this.node.has("columns")) { // old value?
529 args_str = " { " + this.node.get_prop("columns").val + " } ";
530 this.ignoreWrapped("columns");
531 this.ignoreWrapped("n_columns");
534 this.addLine(this.ipad + "this.el = new " + this.node.fqn() + ".newv( " + args_str + " );");
538 case "Gtk.LinkButton": // args filled with values.
539 if (this.node.has("label")) {
540 ctor = ".with_label";
547 var default_ctor = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn() + ctor);
550 // use the default ctor - with arguments (from properties)
552 if (default_ctor != null && default_ctor.paramset != null && default_ctor.paramset.params.size > 0) {
554 var iter = default_ctor.paramset.params.list_iterator();
555 while (iter.next()) {
556 var n = iter.get().name;
557 GLib.debug("building CTOR ARGS: %s, %s", n, iter.get().is_varargs ? "VARARGS": "");
558 if (n == "___") { // for some reason our varargs are converted to '___' ...
562 if (!this.node.has(n)) { // node does not have a value
565 if (iter.get().type.contains("int")) {
569 if (iter.get().type.contains("float")) {
573 if (iter.get().type.contains("bool")) {
574 args += "true"; // always default to true?
577 // any other types???
582 this.ignoreWrapped(n);
585 var v = this.node.get(n);
587 if (iter.get().type == "string") {
588 v = "\"" + v.escape("") + "\"";
590 if (v == "TRUE" || v == "FALSE") {
598 this.node.setLine(this.cur_line, "p", "* xtype");
600 this.addLine(this.ipad + "this.el = new " + this.node.fqn() + "( "+ string.joinv(", ",args) + " );") ;
604 // default ctor with no params..
605 if (default_ctor != null && ctor != ".new" ) {
606 this.node.setLine(this.cur_line, "p", "* xtype");
608 this.addLine(this.ipad + "this.el = new " + this.node.fqn() + ctor + "( );") ;
613 this.addLine(this.ipad + "this.el = new " + this.node.fqn() + "(" + args_str + ");");
622 //var meths = this.palete.getPropertiesFor(item['|xns'] + '.' + item.xtype, 'methods');
623 //print(JSON.stringify(meths,null,4));Seed.quit();
627 // initialize.. my vars..
629 this.addLine( this.ipad + "// my vars (dec)");
631 var iter = this.myvars.list_iterator();
636 var ar = k.strip().split(" ");
637 var kname = ar[ar.length-1];
639 var prop = this.node.props.get(k);
641 var v = prop.val.strip();
646 // at this point start using
648 if (v == "FALSE" || v == "TRUE") {
651 //FIXME -- check for raw string.. "string XXXX"
653 // if it's a string...
655 prop.start_line = this.cur_line;
656 this.addLine(this.ipad + "this." + prop.name + " = " + v +";");
657 prop.end_line = this.cur_line;
665 void addWrappedProperties()
667 var cls = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn());
669 GLib.debug("Skipping wrapped properties - could not find class %s" , this.node.fqn());
672 // what are the properties of this class???
674 this.addLine(this.ipad + "// set gobject values");
677 var iter = cls.props.map_iterator();
678 while (iter.next()) {
679 var p = iter.get_key();
680 //print("Check Write %s\n", p);
681 if (!this.node.has(p)) {
684 if (this.shouldIgnoreWrapped(p)) {
691 var prop = this.node.get_prop(p);
694 // user defined properties.
695 if (prop.ptype == NodePropType.USER) {
701 var is_raw = prop.ptype == NodePropType.RAW;
703 // what's the type.. - if it's a string.. then we quote it..
704 if (iter.get_value().type == "string" && !is_raw) {
705 v = "\"" + v.escape("") + "\"";
707 if (v == "TRUE" || v == "FALSE") {
710 if (iter.get_value().type == "float" && v[v.length-1] != 'f') {
714 prop.start_line = this.cur_line;
715 this.addLine("%sthis.el.%s = %s;".printf(ipad,p,v)); // // %s, iter.get_value().type);
716 prop.end_line = this.cur_line;
724 * pack the children into the parent.
726 * if the child's id starts with '*' then it is not packed...
727 * - this allows you to define children and add them manually..
733 if (this.node.items.size < 1) {
736 this.pane_number = 0;
737 var cols = this.node.has("* columns") ? int.parse(this.node.get_prop("* columns").val) : 1;
740 var iter = this.node.items.list_iterator();
742 while (iter.next()) {
745 var child = iter.get();
747 if (child.xvala_id[0] == '*') {
748 continue; // skip generation of children?
752 if (child.has("* args")) {
754 var ar = child.get_prop("* args").val.split(",");
755 for (var ari = 0 ; ari < ar.length; ari++ ) {
756 var arg = ar[ari].split(" ");
757 xargs += "," + arg[arg.length -1];
760 // create the element..
761 this.addLine(this.ipad + "var child_" + "%d".printf(i) + " = new " + child.xvala_xcls +
762 "( _this " + xargs + ");" );
764 // this is only needed if it does not have an ID???
767 if (child.has("* prop")) {
768 // fixme special packing!??!?!
769 if (child.get_prop("* prop").val.contains("[]")) {
770 // currently these 'child props
771 // used for label[] on Notebook
772 // used for button[] on Dialog?
774 this.packChild(child, i, 0, 0, child.get_prop("* prop").val); /// fixme - this is a bit speciall...
777 // add a ref... (if 'id' is not set... to a '+' ?? what does that mean? - fake ids?
778 if (child.xvala_id.length < 1 || child.xvala_id[0] != '+') {
779 this.addLine(this.ipad + "child_" + "%d".printf(i) +".ref();"); // we need to reference increase unnamed children...
781 //this.addLine(this.ipad + "// no ref as xvala_id is %s".printf(child.xvala_id));
785 this.addLine(ipad + "this.el." + child.get_prop("* prop").val + " = child_" + "%d".printf(i) + ".el;");
789 if (child.xvala_id.length < 1 || child.xvala_id[0] != '+') {
790 this.addLine(this.ipad + "child_" + "%d".printf(i) +".ref();"); // we need to reference increase unnamed children...
792 //this.addLine(this.ipad + "// no ref as xvala_id is %s".printf(child.xvala_id));
796 this.packChild(child, i, cols, colpos);
797 if (child.has("colspan")) {
798 colpos += int.parse(child.get_prop("colspan").val);
803 if (child.xvala_id[0] != '+') {
804 continue; // skip generation of children?
807 // this.{id - without the '+'} = the element...
808 this.addLine(this.ipad + "this." + child.xvala_id.substring(1) + " = child_" + "%d".printf(i) + ";");
815 void packChild(Node child, int i, int cols, int colpos, string propname= "")
818 GLib.debug("packChild %s=>%s", this.node.fqn(), child.fqn());
819 // forcing no packing? - true or false? -should we just accept false?
820 if (child.has("* pack") && child.get("* pack").down() == "false") {
821 return; // force no packing
823 if (child.has("* pack") && child.get("* pack").down() == "true") {
824 return; // force no packing
827 // BC really - don't want to support this anymore.
828 if (child.has("* pack")) {
830 string[] packing = { "add" };
831 if (child.has("* pack")) {
832 packing = child.get("* pack").split(",");
835 var pack = packing[0];
836 this.addLine(this.ipad + "this.el." + pack.strip() + " ( child_" + "%d".printf(i) + ".el " +
837 (packing.length > 1 ?
838 (", " + string.joinv(",", packing).substring(pack.length+1))
844 switch (this.node.fqn()) {
850 var x = child.has("x") ? child.get_prop("x").val : "0";
851 var y = child.has("y") ? child.get_prop("y").val : "0";
852 this.addLine(this.ipad + "this.el.put( child_%d.el, %s, %s );".printf(i,x,y) );
856 var x = "%d".printf(colpos % cols);
857 var y = "%d".printf(( colpos - (colpos % cols) ) / cols);
858 var w = child.has("colspan") ? child.get_prop("colspan").val : "1";
860 this.addLine(this.ipad + "this.el.attach( child_%d.el, %s, %s, %s, %s );".printf(i,x,y, w, h) );
864 var named = child.has("stack_name") ? child.get_prop("stack_name").val.escape() : "";
865 var title = child.has("stack_title") ? child.get_prop("stack_title").val.escape() : "";
866 if (title.length > 0) {
867 this.addLine(this.ipad + "this.el.add_titled( child_%d.el, \"%\", \"%s\" );".printf(i,named,title));
869 this.addLine(this.ipad + "this.el.add_named( child_%d.el, \"%s\" );".printf(i,named));
873 case "Gtk.Notebook": // use label
874 var label = child.has("notebook_label") ? child.get_prop("notebook_label").val.escape() : "";
875 this.addLine(this.ipad + "this.el.append_page( child_%d.el, new Gtk.Label(\"%s\"));".printf(i, label));
879 case "Gtk.TreeView": // adding TreeViewColumns
880 this.addLine(this.ipad + "this.el.append_column( child_" + "%d".printf(i) + ".el );");
883 case "Gtk.TreeViewColumn": //adding Renderers - I think these are all proprerties of the renderer used...
884 if (child.has("markup_column") && int.parse(child.get_prop("markup_column").val) > -1) {
885 this.addLine(this.ipad + "this.el.add_attribute( child_%d.el, \"markup\", %s );".printf(i, child.get_prop("markup_column").val));
887 if (child.has("text_column") && int.parse(child.get_prop("text_column").val) > -1) {
888 this.addLine(this.ipad + "this.el.add_attribute( child_%d.el, \"text\", %s );".printf(i, child.get_prop("text_column").val));
890 if (child.has("pixbuf_column") && int.parse(child.get_prop("pixbuf_column").val) > -1) {
891 this.addLine(this.ipad + "this.el.add_attribute( child_%d.el, \"pixbuf\", %s );".printf(i, child.get_prop("pixbuf_column").val));
893 if (child.has("pixbuf_column") && int.parse(child.get_prop("active_column").val) > -1) {
894 this.addLine(this.ipad + "this.el.add_attribute( child_%d.el, \"active\", %s );".printf(i, child.get_prop("active_column").val));
896 if (child.has("background_column") && int.parse(child.get_prop("background_column").val) > -1) {
897 this.addLine(this.ipad + "this.el.add_attribute( child_%d.el, \"background-rgba\", %s );".printf(i, child.get_prop("background_column").val));
899 this.addLine(this.ipad + "this.el.add( child_" + "%d".printf(i) + ".el );");
904 if (propname == "buttons[]") {
906 if (child.has("* response_id")) {
907 resp_id = int.parse(child.get_prop("* response_id").val);
909 this.addLine(this.ipad + "this.el.add_action_widget( child_%d.el, %d);".printf(i,resp_id) );
914 this.addLine(this.ipad + "this.el.get_content_area().add( child_" + "%d".printf(i) + ".el );");
919 switch(this.pane_number) {
922 this.addLine(this.ipad + "this.el.pack%d( child_%d".printf(this.pane_number,i) + ".el );");
930 this.addLine(this.ipad + "this.el.add( child_" + "%d".printf(i) + ".el );");
939 // fixme GtkDialog?!? buttons[]
941 // fixme ... add case "Gtk.RadioButton": // group_id ??
949 if (!this.node.has("* init")) {
953 this.addLine(ipad + "// init method");
955 this.node.setLine(this.cur_line, "p", "init");
957 var init = this.node.get_prop("* init");
958 init.start_line = this.cur_line;
959 this.addMultiLine(ipad + this.padMultiline(ipad, init.val) );
960 init.end_line = this.cur_line;
964 if (this.node.listeners.size < 1) {
969 this.addLine(ipad + "//listeners");
973 var iter = this.node.listeners.map_iterator();
974 while (iter.next()) {
975 var k = iter.get_key();
976 var prop = iter.get_value();
979 prop.start_line = this.cur_line;
980 this.node.setLine(this.cur_line, "l", k);
981 this.addMultiLine(this.ipad + "this.el." + k + ".connect( " +
982 this.padMultiline(this.ipad,v) +");");
983 prop.end_line = this.cur_line;
990 this.addLine(this.pad + "}");
995 * Standardize this crap...
997 * standard properties (use to set)
998 * If they are long values show the dialog..
1001 * bool is_xxx :: can show a pulldown.. (true/false)
1003 * $ string html = string with value interpolated eg. baseURL + ".."
1004 * Clutter.ActorAlign x_align (typed) -- shows pulldowns if type is ENUM?
1005 * $ untypedvalue = javascript untyped value...
1006 * _ string html ... = translatable..
1009 * object properties (not part of the GOjbect being wrapped?
1010 * # Gee.ArrayList<Xcls_fileitem> fileitems
1015 * methods -- always text editor..
1023 * * init -- big string?
1025 * event handlers (listeners)
1030 * +XXXX -- indicates it's a instance property / not glob...
1031 * *XXXX -- skip writing glob property (used as classes that can be created...)
1036 void addUserMethods()
1039 this.addLine(this.pad + "// user defined functions");
1041 // user defined functions...
1042 var iter = this.node.props.map_iterator();
1043 while(iter.next()) {
1044 var prop = iter.get_value();
1045 if (this.shouldIgnore(prop.name)) {
1048 // HOW TO DETERIME if its a method?
1049 if (prop.ptype != NodePropType.METHOD) {
1050 //strbuilder("\n" + pad + "// skip " + k + " - not pipe \n");
1054 // function in the format of {type} (args) { .... }
1058 prop.start_line = this.cur_line;
1059 this.node.setLine(this.cur_line, "p", prop.name);
1060 this.addMultiLine(this.pad + "public " + prop.rtype + " " + prop.name + " " + this.padMultiline(this.pad, prop.val));;
1061 prop.end_line = this.cur_line;
1068 this.node.line_end = this.cur_line;
1069 this.node.sortLines();
1072 if (this.depth > 0) {
1073 this.addLine(this.inpad + "}");
1076 var iter = this.node.items.list_iterator();
1078 while (iter.next()) {
1079 this.addMultiLine(this.mungeChild(iter.get()));
1082 if (this.depth < 1) {
1083 this.addLine(this.inpad + "}");
1088 string padMultiline(string pad, string str)
1090 var ar = str.strip().split("\n");
1091 return string.joinv("\n" + pad , ar);
1094 void ignore(string i) {
1095 this.ignoreList.add(i);
1098 void ignoreWrapped(string i) {
1099 this.ignoreWrappedList.add(i);
1102 bool shouldIgnore(string i)
1104 return ignoreList.contains(i);
1106 bool shouldIgnoreWrapped(string i)
1108 return ignoreWrappedList.contains(i);