Package tk.eclipse.plugin.htmleditor.assist

Examples of tk.eclipse.plugin.htmleditor.assist.AttributeInfo


            boolean required = false;
            if(decl == DTDDecl.REQUIRED){
              required = true;
            }
           
            AttributeInfo attrInfo = new AttributeInfo(attrName,true,AttributeInfo.NONE,required);
            tagInfo.addAttributeInfo(attrInfo);
           
            Object attrType = attr.getType();
            if(attrType instanceof DTDEnumeration){
              DTDEnumeration dtdEnum = (DTDEnumeration)attrType;
              String[] items = dtdEnum.getItems();
              for(int j=0;j<items.length;j++){
                attrInfo.addValue(items[j]);
              }
            }
          }
          tagList.add(tagInfo);
          // TODO root tag is an element that was found at first.
View Full Code Here


      }
      XSObjectList attrs = ((XSComplexTypeDefinition)type).getAttributeUses();
      for(int i=0;i<attrs.getLength();i++){
        XSAttributeUse attrUse = (XSAttributeUse)attrs.item(i);
        XSAttributeDeclaration attr = attrUse.getAttrDeclaration();
        AttributeInfo attrInfo = new AttributeInfo(attr.getName(),true,AttributeInfo.NONE,attrUse.getRequired());
        tagInfo.addAttributeInfo(attrInfo);
      }
     
    }
  }
View Full Code Here

   */
  private TagInfo createPrefixTagInfo(TagInfo tagInfo,String prefix){
    TagInfo newTagInfo = new TagInfo(prefix + ":" + tagInfo.getTagName(),tagInfo.hasBody());
    AttributeInfo[] attrInfos = tagInfo.getAttributeInfo();
    for(int i=0;i<attrInfos.length;i++){
      AttributeInfo newAttrInfo = new AttributeInfo(
          prefix + ":" + attrInfos[i].getAttributeName(),
          true,
          AttributeInfo.NONE,
          attrInfos[i].isRequired());
      newTagInfo.addAttributeInfo(newAttrInfo);
View Full Code Here

    while (matcher.find()) {
      String content = matcher.group(1);
      String name = getAttribute(content, NAME);
      boolean required = getBooleanValue(getAttribute(content, REQUIRED));
     
      tag.addAttributeInfo(new AttributeInfo(name, true, AttributeInfo.NONE, required));
    }
   
    return tag;
  }
View Full Code Here

  private HashMap namespace = new HashMap();
 
  public JSPAssistProcessor(){
    // JSP actions
    TagInfo useBean = new TagInfo("jsp:useBean",true);
    useBean.addAttributeInfo(new AttributeInfo("id",true));
    useBean.addAttributeInfo(new AttributeInfo("scope",true,SCOPE));
    useBean.addAttributeInfo(new AttributeInfo("class",true));
    tagList.add(useBean);
   
    TagInfo setProperty = new TagInfo("jsp:setProperty",false);
    setProperty.addAttributeInfo(new AttributeInfo("name",true));
    setProperty.addAttributeInfo(new AttributeInfo("param",true));
    setProperty.addAttributeInfo(new AttributeInfo("property",true));
    tagList.add(setProperty);
   
    TagInfo include = new TagInfo("jsp:include",false);
    include.addAttributeInfo(new AttributeInfo("page",true));
    tagList.add(include);
   
    TagInfo forward = new TagInfo("jsp:forward",true);
    forward.addAttributeInfo(new AttributeInfo("page",true));
    tagList.add(forward);
   
    TagInfo param = new TagInfo("jsp:param",false);
    param.addAttributeInfo(new AttributeInfo("name",true));
    param.addAttributeInfo(new AttributeInfo("value",true));
    tagList.add(param);
   
    TagInfo attribute = new TagInfo("jsp:attribute",true);
    attribute.addAttributeInfo(new AttributeInfo("name",true));
    tagList.add(attribute);
   
    TagInfo body = new TagInfo("jsp:body",true);
    tagList.add(body);
   
    TagInfo element = new TagInfo("jsp:element",true);
    element.addAttributeInfo(new AttributeInfo("name",true));
    tagList.add(element);
   
    TagInfo text = new TagInfo("jsp:text",true);
    tagList.add(text);
   
View Full Code Here

        String attrName = (String)attributes.get(i);
        boolean required = false;
        if(this.attrRequiredMap.get(attrName)!=null){
          required = true;
        }
        AttributeInfo attrInfo = new AttributeInfo(attrName,true,AttributeInfo.NONE,required);
        if(attrDescMap.get(attrName)!=null){
          attrInfo.setDescription(wrap((String)attrDescMap.get(attrName)));
        }
        info.addAttributeInfo(attrInfo);
      }
      if(tagDesc.length() > 0){
        info.setDescription(wrap(tagDesc.toString()));
View Full Code Here

            boolean required = false;
            if (decl == DTDDecl.REQUIRED) {
              required = true;
            }

            AttributeInfo attrInfo = new AttributeInfo(attrName, true, AttributeInfo.NONE, required);
            tagInfo.addAttributeInfo(attrInfo);

            Object attrType = attr.getType();
            if (attrType instanceof DTDEnumeration) {
              DTDEnumeration dtdEnum = (DTDEnumeration) attrType;
              String[] items = dtdEnum.getItems();
              for (int j = 0; j < items.length; j++) {
                attrInfo.addValue(items[j]);
              }
            }
            else if (attrType.equals("ID")) {
              attrInfo.setAttributeType(AttributeInfo.ID);
            }
            else if (attrType.equals("IDREF")) {
              attrInfo.setAttributeType(AttributeInfo.IDREF);
            }
            else if (attrType.equals("IDREFS")) {
              attrInfo.setAttributeType(AttributeInfo.IDREFS);
            }
          }
          _tagList.add(tagInfo);
          // TODO root tag is an element that was found at first.
        }
View Full Code Here

      }
      XSObjectList attrs = ((XSComplexTypeDefinition) type).getAttributeUses();
      for (int i = 0; i < attrs.getLength(); i++) {
        XSAttributeUse attrUse = (XSAttributeUse) attrs.item(i);
        XSAttributeDeclaration attr = attrUse.getAttrDeclaration();
        AttributeInfo attrInfo = new AttributeInfo(attr.getName(), true, AttributeInfo.NONE, attrUse.getRequired());
        tagInfo.addAttributeInfo(attrInfo);
      }

    }
  }
View Full Code Here

   */
  private TagInfo createPrefixTagInfo(TagInfo tagInfo, String prefix) {
    TagInfo newTagInfo = new TagInfo(prefix + ":" + tagInfo.getTagName(), tagInfo.hasBody());
    AttributeInfo[] attrInfos = tagInfo.getAttributeInfo();
    for (int i = 0; i < attrInfos.length; i++) {
      AttributeInfo newAttrInfo = new AttributeInfo(prefix + ":" + attrInfos[i].getAttributeName(), true, AttributeInfo.NONE, attrInfos[i].isRequired());
      newTagInfo.addAttributeInfo(newAttrInfo);
    }
    String[] children = tagInfo.getChildTagNames();
    for (int i = 0; i < children.length; i++) {
      newTagInfo.addChildTagName(prefix + ":" + children[i]);
View Full Code Here

      super(tagName, true);
    }

    @Override
    public AttributeInfo getAttributeInfo(String name) {
      AttributeInfo attrInfo = new AttributeInfo(name, true);
      return attrInfo;
    }
View Full Code Here

TOP

Related Classes of tk.eclipse.plugin.htmleditor.assist.AttributeInfo

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.