Package org.drools.guvnor.client.packages.PackageHeaderWidget

Examples of org.drools.guvnor.client.packages.PackageHeaderWidget.Global


        assertEquals(1, t.globals.size());

        Import i = (Import) t.imports.get(0);
        assertEquals("goo.bar.Whee", i.type);

        Global g = (Global) t.globals.get(0);
        assertEquals("wee.waah.Foo", g.type);
        assertEquals("asd", g.name);


    }
View Full Code Here


        t = PackageHeaderHelper.parseHeader(h);
        assertEquals(1, t.imports.size());
        Import i = (Import) t.imports.get(0);
        assertEquals("foo.bar.Baz", i.type);

        t.globals.add(new Global("foo.Bar", "xs"));
        t.globals.add(new Global("whee.wah", "tt"));
        h = PackageHeaderHelper.renderTypes(t);
        assertEquals("import foo.bar.Baz\nglobal foo.Bar xs\nglobal whee.wah tt", h.trim());

    }
View Full Code Here

            tk = tk.substring(6).trim();
            if (tk.endsWith(";")) {
              tk = tk.substring(0, tk.length() - 1);
            }
            String[] gt = tk.split("\\s+");
            t.globals.add(new Global(gt[0], gt[1]));
          } else {
            return null;
          }
        }
      }
View Full Code Here

      Import i = (Import) iterator.next();
      sb.append("import " + i.type + "\n");
    }

    for (Iterator it = t.globals.iterator(); it.hasNext();) {
      Global g = (Global) it.next();
      sb.append("global " + g.type + " " + g.name);
      if (it.hasNext()) {
        sb.append('\n');
      }
    }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.packages.PackageHeaderWidget.Global

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.