Package org.cfeclipse.cfml.dictionary

Examples of org.cfeclipse.cfml.dictionary.SyntaxDictionary


      boolean invokerIsSpace = invoker.equals(" ");
      boolean invokerIsTab = invoker.equals("\t");
      boolean invokerIsCloseChevron = invoker.equals(">");
      boolean invokerIsPeriod = invoker.equals(".");
     
      SyntaxDictionary syntax = null;
     
      if (cftag || invokerIsPeriod) {
        syntax = DictionaryManager.getDictionary(DictionaryManager.CFDIC);
      } else {
        syntax = DictionaryManager.getDictionary(DictionaryManager.HTDIC);
View Full Code Here


      //  functionname = functionname.substring(0,functionname.length() - 1);
     
      //System.out.println("f>>" + functionname.trim() + "<<f");
     
      //System.err.println(functionname.trim());
      SyntaxDictionary syntax = DictionaryManager.getDictionary(DictionaryManager.CFDIC);
     
      Set fst = syntax.getFunctions();
      fst = SyntaxDictionary.limitSet(fst,functionname.trim());
     
      //Function fun = syntax.getFunction(functionname.trim());
      //String usage = fun.toString();
     
      //String usage = ((SyntaxDictionaryInterface)syntax).getFunctionUsage(functionname.trim());
           
      //if(usage != null)
      //System.out.println(fst.size());
      if(fst.size() > 0)
      {
        //bit of a hack - there are only a copule functions that have
        //several wasys to call them, so if there are more then one
        //they are sperated by ||s
        //st = new StringTokenizer(usage,"||");
       
        ////////////////////////////////////////////////////////////////
        //TODO figure out why this has to have 2 - it wont show otherwise
        //IContextInformation[] result = new IContextInformation[st.countTokens() + 1];
        //IContextInformation result[] = new IContextInformation[2];
        IContextInformation result[] = new IContextInformation[fst.size()+1];
       
        Iterator i = fst.iterator();
        int x = 0;
        while(i.hasNext())
        {
          //System.out.println(x);
          Function fun = syntax.getFunction((String)i.next());
            //(Function)i.next();

            String usage = fun.toString();
            //System.err.println(usage);
           
View Full Code Here

     * Need to provide simple methods in the partitioner or document to
     * retrieve the stored partition details.
     *
     */
   
    SyntaxDictionary sd = DictionaryManager.getDictionary(DictionaryManager.CFDIC);
   
    Tag tg = null;
    try
    {
      Set elements = ((ISyntaxDictionary)sd).getAllElements();
     
      Iterator it = elements.iterator();
      while(it.hasNext())
      {
        String ename = (String)it.next();
        //System.out.println(ename);

          tg = sd.getTag(ename);
          rules.add(new NamedTagRule("<" + ename,">", CF_START_TAG, CF_TAG_ATTRIBS));
          //if(!tg.isSingle())
          //{ 
            rules.add(new NamedTagRule("</" + ename,">", CF_END_TAG, CF_END_TAG));
          //}
       
      }
    }
    catch(Exception e)
    {
      e.printStackTrace(System.err);
    }
   
    //these are not really handled in the dictionary because you can call
    //normal pages as cf_'s
    rules.add(new CustomTagRule("<cf_",">", CF_START_TAG, CF_TAG_ATTRIBS));
    rules.add(new CustomTagRule("</cf_",">", CF_END_TAG, CF_END_TAG));
   
    //do the html tags now
    sd = DictionaryManager.getDictionary(DictionaryManager.HTDIC);
   
    try
    {
      Set elements = ((ISyntaxDictionary)sd).getAllElements();
     
      //this is going to be used to tell if we need to add a form, table,
      //or normal tag for the html tags
      String startTokenType = HTM_START_TAG;
      String endTokenType = HTM_END_TAG;
      String midTokenType = HTM_TAG_ATTRIBS;
     
      //loop over all the tags in the html dictionary and try to set the
      //partition to the correct type
      Iterator it = elements.iterator();
      while(it.hasNext())
      {
        String ename = (String)it.next();
       
       
          tg = sd.getTag(ename);
         
          //colour form and table tags differently...
          if(tg.isTableTag()) { 
              startTokenType = TABLE_START_TAG;
              midTokenType = TABLE_TAG_ATTRIBS;
View Full Code Here

    boolean cftag = tagName.toLowerCase().startsWith("cf");
    //
    // End of block to comment out
    //
    SyntaxDictionary syntax = DictionaryManager
        .getDictionary((cftag) ? DictionaryManager.CFDIC
            : DictionaryManager.HTDIC);
    Tag currTag = syntax.getTag(tagName);
    if (currTag == null)
      return true;
    return currTag.isSingle();
  }
View Full Code Here

  public CategoryLoader(String name, String Dictionary){
    this.cattags = new TreeParent(name);
    this.fulltags = new TreeParent(name);
    this.cfmlversion = Dictionary;
   
    SyntaxDictionary dictionaryByVersion = DictionaryManager.getDictionaryByVersionAlt(Dictionary);
   
    if(dictionaryByVersion == null){
      System.err.println("Error getting " + Dictionary);
    }
    else{
View Full Code Here

TOP

Related Classes of org.cfeclipse.cfml.dictionary.SyntaxDictionary

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.