Examples of Global


Examples of org.drools.eclipse.core.Global

                        }
                        // add globals
                        List globals = drlInfo.getPackageDescr().getGlobals();
                        for (Iterator iterator = globals.iterator(); iterator.hasNext();) {
                            GlobalDescr globalDescr = (GlobalDescr) iterator.next();
                            Global global = DroolsModelBuilder.addGlobal(
                                pkg, globalDescr.getIdentifier(), file, globalDescr.getStartCharacter(),
                                globalDescr.getEndCharacter() - globalDescr.getStartCharacter() + 1);
                            // create link between resource and created rule nodes
                            List droolsElements = (List) resourcesMap.get(file);
                            if (droolsElements == null) {
View Full Code Here

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

    assertNotNull(t.imports);

    assertEquals(3, t.globals.size());
    assertEquals(0, t.imports.size());

    Global i = (Global) t.globals.get(0);
    assertEquals("goo.bar.Whee", i.type);
    assertEquals("x", i.name);

    i = (Global) t.globals.get(1);
    assertEquals("wee.waah.Foo", i.type);
View Full Code Here

Examples of org.drools.guvnor.shared.modules.ModuleHeader.Global

                        if ( tk.endsWith( ";" ) ) {
                            tk = tk.substring( 0,
                                               tk.length() - 1 );
                        }
                        String[] gt = tk.split( "\\s+" );
                        mh.getGlobals().add( new Global( gt[0],
                                                         gt[1] ) );
                    } else if ( tk.startsWith( "rule" ) ) {
                        mh.setHasRules( true );
                        return mh;
                    } else if ( tk.startsWith( "declare" ) ) {
View Full Code Here

Examples of org.drools.template.model.Global

        for( String variableCell: variableCells ){
            final StringTokenizer tokens = new StringTokenizer( variableCell, "," );
            while ( tokens.hasMoreTokens() ) {
                final String token = tokens.nextToken();
                final Global vars = new Global();
                final StringTokenizer paramTokens = new StringTokenizer( token, " " );
                vars.setClassName( paramTokens.nextToken() );
                if ( !paramTokens.hasMoreTokens() ) {
                    throw new DecisionTableParseException( "The format for global variables is incorrect. " + "It should be: [Class name, Class otherName]. But it was: [" + variableCell + "]" );
                }
                vars.setIdentifier( paramTokens.nextToken() );
                variableList.add( vars );
            }
        }
        return variableList;
    }
View Full Code Here

Examples of org.drools.workbench.screens.globals.model.Global

            @Override
            public void execute() {
                final String alias = addGlobalPopup.getAlias();
                final String className = addGlobalPopup.getClassName();
                dataProvider.getList().add( new Global( alias,
                                                        className ) );
                isDirty = true;
            }
        };
    }
View Full Code Here

Examples of org.elasticsearch.search.aggregations.bucket.global.Global

        logger.info("--> checking single filtering alias search with global facets");
        searchResponse = client().prepareSearch("tests").setQuery(QueryBuilders.matchQuery("name", "bar"))
                .addAggregation(AggregationBuilders.global("global").subAggregation(AggregationBuilders.terms("test").field("name")))
                .get();
        assertSearchResponse(searchResponse);
        Global global = searchResponse.getAggregations().get("global");
        Terms terms = global.getAggregations().get("test");
        assertThat(terms.getBuckets().size(), equalTo(4));

        logger.info("--> checking single filtering alias search with global facets and sort");
        searchResponse = client().prepareSearch("tests").setQuery(QueryBuilders.matchQuery("name", "bar"))
                .addAggregation(AggregationBuilders.global("global").subAggregation(AggregationBuilders.terms("test").field("name")))
                .addSort("_uid", SortOrder.ASC).get();
        assertSearchResponse(searchResponse);
        global = searchResponse.getAggregations().get("global");
        terms = global.getAggregations().get("test");
        assertThat(terms.getBuckets().size(), equalTo(4));

        logger.info("--> checking single filtering alias search with non-global facets");
        searchResponse = client().prepareSearch("tests").setQuery(QueryBuilders.matchQuery("name", "bar"))
                .addAggregation(AggregationBuilders.terms("test").field("name"))
View Full Code Here

Examples of org.jgroups.Global

      cache.put(fqn("/a"), "key", clazz1.newInstance());

      Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
      try
      {
         @SuppressWarnings("unused")
         Global object = (Global) cache.get(fqn("/a"), "key");
         fail("Should have produced a ClassCastException");
      }
      catch (ClassCastException cce)
      {
View Full Code Here

Examples of org.jgroups.Global

      region.registerContextClassLoader(Thread.currentThread().getContextClassLoader());

      try
      {
         Global object = (Global) cache.get(fqn("/a"), "key");
         assertNull(object);
      }
      catch (ClassCastException cce)
      {
//         cce.printStackTrace();
View Full Code Here

Examples of org.mozilla.javascript.tools.shell.Global

         * if you step over from one script block, the debugger fails to kick in on the beginning of the next script block.
         * This makes it difficult to set a break point on arbitrary script block in the HTML page. We need to fix this
         * by tweaking {@link Dim.StackFrame#onLineChange(Context, int)}.
         */
        public Dim interactiveJavaScriptDebugger() {
            Global global = new Global();
            HtmlUnitContextFactory cf = getJavaScriptEngine().getContextFactory();
            global.init(cf);

            Dim dim = org.mozilla.javascript.tools.debugger.Main.mainEmbedded(cf, global, "Rhino debugger: " + getName());

            // break on exceptions. this catch most of the errors
            dim.setBreakOnExceptions(true);
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.Global

                exprType tback = arity >= 3 ? ((exprType) stack.popNode()) : null;
                exprType inst = arity >= 2 ? ((exprType) stack.popNode()) : null;
                exprType type = arity >= 1 ? ((exprType) stack.popNode()) : null;
                return new Raise(type, inst, tback, null);
            case JJTGLOBAL_STMT:
                Global global = new Global(makeIdentifiers(NameTok.GlobalName), null);
                return global;
            case JJTASSERT_STMT:
                exprType msg = arity == 2 ? ((exprType) stack.popNode()) : null;
                test = (exprType) stack.popNode();
                return new Assert(test, msg);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.