Package org.cfeclipse.cfml.dictionary

Examples of org.cfeclipse.cfml.dictionary.Tag


        String display = "";
        String help = "";
       
        if(obj[i] instanceof Tag)
        { 
          Tag ptr_tg = (Tag)obj[i];
         
          //get the full on name
          name = ptr_tg.getName();
          display = ptr_tg.toString();
          help = ptr_tg.getHelp();
          boolean hasParams = ptr_tg.hasParameters();
          boolean isXmlStyle = ptr_tg.isXMLStyle();
          boolean isSingle = ptr_tg.isSingle();
          boolean takesCFScriptExp = false;
         
          // Bodge job for cfif, cfelse, cfelseif, cfset, and cfreturn
          if(name.compareToIgnoreCase("cfif") == 0
            || name.compareToIgnoreCase("cfelse") == 0
View Full Code Here


   
    //you are setting my attributes
   
    //System.out.println(object.getClass());
    if(object instanceof TagItem){
      Tag tag = ((TagItem)object).getTag();
      this.fillAttributes(tag.getParameters());
    }
    else if(object instanceof FunctionItem){
      Function func = ((FunctionItem)object).getFunction();
      this.fillAttributes(func.getParameters());
   
View Full Code Here

     *
     */
   
    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;
              endTokenType = TABLE_END_TAG;
          }
          else if(tg.isFormTag()) {
              startTokenType = FORM_START_TAG;
              midTokenType = FORM_TAG_ATTRIBS;
              endTokenType = FORM_END_TAG;
          }
          else {
View Full Code Here

    // 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

      /*
       * Now open the TagEditDialog, we know the tag name (as a string)
       * and the tag attributes (as a map) So, we go and get the tag from
       * the dictionary
       */
      Tag tagToEdit = DictionaryManager.getDictionary("CF_DICTIONARY").getTag(tagItem.getName());

      /*
       * Setup the tageditor dialog
       */
      TagEditDialog tagview = new TagEditDialog(shell, tagToEdit);
View Full Code Here

    ISelection selection = viewer.getSelection();
    Object obj = ((IStructuredSelection) selection).getFirstElement();
   
    System.out.println(obj.getClass());
    if(obj instanceof TagItem){
      Tag thistag = ((TagItem)obj).getTag();
     
      //if(thistag.isCustomTag()){
        manager.add(editTagAction);
      //}
    }
View Full Code Here

   * @param obj
   */
  protected void editTag(Object obj){
   
    if(obj instanceof TagItem){
      Tag tg = ((TagItem)obj).getTag();
      EditCustomTagAction ecta = new EditCustomTagAction(tg, this.getViewSite().getShell());
        ecta.run();
    }
    else if (obj == null){
      EditCustomTagAction ecta = new EditCustomTagAction(this.getViewSite().getShell());
View Full Code Here

           
            //System.err.println("]" + tglookup + "[");
           
            if(dictionary.tagExists(tglookup))
            { 
              Tag tag = dictionary.getTag(tglookup);
              message = " " + tag.getHelp();
              //System.err.print(tag.getHelp());
            }
           
            /*
            Set tagAttributes = ((SyntaxDictionaryInterface)dictionary).getElementAttributes(wordFound.substring(2, wordFound.length()));
View Full Code Here

          for(int i=1; i < categoryItem.getChildNodes().getLength(); i = i + 2){
           
            Node thisItem = categoryItem.getChildNodes().item(i);
            if(type.equals("tag")){
                //Now we can get the tag
                Tag thistag = cfdic.getTag(thisItem.getAttributes().getNamedItem("label").getNodeValue());
               
                if(thistag != null){
                  TagItem tag = new TagItem(thistag);
                  tag.setDictionary(cfdic);
                  catItem.addChild(tag);
View Full Code Here

   

    //Get all the tags from the dictionary and add them
    Iterator tagIter = cfdic.getAllTags().iterator();
    while (tagIter.hasNext()) {
      Tag currTag = (Tag) tagIter.next();
      TagItem tag = new TagItem(currTag);
      tag.setDictionary(cfdic);
      tags.addChild(tag);
    }
   
View Full Code Here

TOP

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

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.