Examples of Directive


Examples of org.apache.velocity.runtime.directive.Directive

    ASTDirective jjtn000 = new ASTDirective(this, JJTDIRECTIVE);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);Token t = null;
    int argType;
    int argPos = 0;
    Directive d;
    int directiveType;
    boolean isVM = false;
    boolean doItNow = false;
    try {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case WORD:
        t = jj_consume_token(WORD);
        break;
      case BRACKETED_WORD:
        t = jj_consume_token(BRACKETED_WORD);
        break;
      default:
        jj_la1[7] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
        String directiveName;
        if (t.kind == ParserConstants.BRACKETED_WORD)
        {
            directiveName = t.image.substring(2, t.image.length() - 1);
        }
        else
        {
            directiveName = t.image.substring(1);
        }

        d = (Directive) directives.get(directiveName);

        /*
         *  Velocimacro support : if the directive is macro directive
         *   then set the flag so after the block parsing, we add the VM
         *   right then. (So available if used w/in the current template )
         */

        if (directiveName.equals("macro"))
        {
             doItNow = true;
        }

        /*
         * set the directive name from here.  No reason for the thing to know
         * about parser tokens
         */

        jjtn000.setDirectiveName(directiveName);

        if ( d == null)
        {
            /*
             *  if null, then not a real directive, but maybe a Velocimacro
             */

            isVM = rsvc.isVelocimacro(directiveName, currentTemplateName);

            /*
             *  Currently, all VMs are LINE directives
             */

            directiveType = Directive.LINE;
        }
        else
        {
            directiveType = d.getType();
        }

        /*
         *  now, switch us out of PRE_DIRECTIVE
         */
 
View Full Code Here

Examples of org.auraframework.util.javascript.directive.Directive

     * Test basic initialization.
     */
    public void testIfDirectiveBasicInitialization() throws Exception {
        IfDirectiveType directiveTypeObj = new IfDirectiveType();
        assertTrue("If Directive type should be labled as 'if'", directiveTypeObj.getLabel().equals("if"));
        Directive directiveObj = directiveTypeObj.constructDirective(4, "");
        assertTrue("If directive is a multiline directive", directiveObj.isMultiline());
        String content = "Write anything you want and this will just throw is back. But it should throw back the exact same thing";
        directiveObj.setContent(content);
        // Regardless of the javascriptGenerator mode, an IF directive just
        // spits out its contents. Hence using null as
        // the mode.
        assertTrue("If directive should just spit out whatever was given to it", directiveObj.generateOutput(null)
                .equals(content));
    }
View Full Code Here

Examples of org.eclipse.assemblyformatter.ir.Directive

          String s = section.getContent(document);

          for (String i : Directive.IAR_LIST) {
            if (s.compareToIgnoreCase(i) == 0) {
              // Replace SYMBOL with DIRECTIVE.
              Section directiveSection = new Directive();
              directiveSection.copyPosition(section);
              directiveSection.setNextSection(nextSection);

              // Special link handling.
              if (prevSection != null) {
                prevSection.setNextSection(directiveSection);
              } else {
View Full Code Here

Examples of org.jboss.ide.eclipse.freemarker.lang.Directive

      return null;
    }
    else {
      Item directive = null;
      String type = region.getType();
      Directive directiveType = Directive.fastValueOf(type);
      if (directiveType != null) {
        directive = directiveType.createModelItem(itemSet);
      }
      else {
        PartitionType partitionType = PartitionType.fastValueOf(type);
        switch (partitionType) {
        case DOLLAR_INTERPOLATION:
View Full Code Here

Examples of org.osmorc.manifest.lang.psi.Directive

  public List<String> getReExportedBundles() {
    Header header = myManifestFile.getHeader(REQUIRE_BUNDLE);
    return header == null ? ContainerUtil.<String>emptyList() : ContainerUtil.mapNotNull(header.getHeaderValues(), new NullableFunction<HeaderValue, String>() {
             @Override
             public String fun(HeaderValue value) {
               Directive directive = ((Clause)value).getDirective(VISIBILITY_DIRECTIVE);
               return directive != null && VISIBILITY_REEXPORT.equals(directive.getValue()) ? value.getUnwrappedText() : null;
             }
           });
  }
View Full Code Here

Examples of org.osmorc.manifest.lang.psi.Directive

    if (header == null) return false;

    for (HeaderValue value : header.getHeaderValues()) {
      String requireSpec = value.getUnwrappedText();
      // first check if the clause is set to re-export, if not, we can skip the more expensive checks
      Directive directive = ((Clause)value).getDirective(VISIBILITY_DIRECTIVE);
      if (directive == null) {
        continue; // skip to the next require
      }
      if (VISIBILITY_REEXPORT.equals(directive.getValue())) {
        // ok it's a re-export. Now check if the bundle would satisfy the dependency
        if (otherBundle.isRequiredBundle(requireSpec)) {
          return true;
        }
      }
View Full Code Here

Examples of org.redline_rpm.payload.Directive

                int filemode = fileset.getFileMode( getProject()) & 07777;
        int dirmode = fileset.getDirMode( getProject()) & 07777;
        String username = null;
        String group = null;
                Directive directive = null;

        if (fileset instanceof TarFileSet) {
          TarFileSet tarFileSet = (TarFileSet)fileset;
          username = tarFileSet.getUserName();
          group = tarFileSet.getGroup();
View Full Code Here

Examples of org.rythmengine.internal.parser.Directive

                        params.addParameterDeclaration(r.stringMatched(4), r.stringMatched(5), ctx());
                    }
                }


                return new Directive(s, ctx()) {
                    @Override
                    public void call() {
                        try {
                            builder().setExtended(sExtend, params, lineNo);
                        } catch (NoClassDefFoundError e) {
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.