Exemplo n.º 1
0
        public override IXmlAttribute CreateAttribute(IXmlIdentifierNode nameIdentifier,
            IXmlAttributeContainer attributeContainer,
            IXmlTagContainer parentTag)
        {
            IXmlAttribute baseRet = base.CreateAttribute(nameIdentifier, attributeContainer, parentTag);

            return baseRet;
        }
Exemplo n.º 2
0
        private void Highlight(IXmlIdentifierNode node, string attributeId)
        {
            Highlight(node.GetDocumentRange(), attributeId);

            IXmlTagHeaderNode header = node.Parent as IXmlTagHeaderNode;
            if(header != null)
            {
                IXmlTagNode tag = header.Parent as IXmlTagNode;
                Assert.CheckNotNull(tag);
                if(tag.Footer != null)
                    Highlight(tag.Footer.Name.GetDocumentRange(), attributeId);
            }
        }
 public override IXmlAttribute CreateAttribute(IXmlIdentifierNode nameIdentifier, IXmlAttributeContainer attributeContainer, IXmlTagContainer parentTag) {
     string attributeName = nameIdentifier.GetText();
     string containerName = attributeContainer.ContainerName;
     if (attributeName == Keyword.Name) {
         switch (containerName) {
             case Keyword.Id:
                 return new PropertyNameAttribute(containerName);
             case Keyword.Property:
                 return new PropertyNameAttribute(containerName);
             case Keyword.Component:
                 return new PropertyNameAttribute(containerName);
             case Keyword.DynamicComponent:
                 return new PropertyNameAttribute(containerName);
             case Keyword.Bag:
                 return new PropertyNameAttribute(containerName);
             case Keyword.Set:
                 return new PropertyNameAttribute(containerName);
             case Keyword.IdBag:
                 return new PropertyNameAttribute(containerName);
             case Keyword.Array:
                 return new PropertyNameAttribute(containerName);
             case Keyword.PrimitiveArray:
                 return new PropertyNameAttribute(containerName);
             case Keyword.List:
                 return new PropertyNameAttribute(containerName);
             case Keyword.Any:
                 return new PropertyNameAttribute(containerName);
             case Keyword.ManyToOne:
                 return new PropertyNameAttribute(containerName);
             case Keyword.OneToOne:
                 return new PropertyNameAttribute(containerName);
             case Keyword.Parent:
                 return new PropertyNameAttribute(containerName);
             case Keyword.NestedCompositeElement:
                 return new PropertyNameAttribute(containerName);
             case Keyword.Class:
                 return new ClassNameAttribute(containerName);
         }
     }
     if ((attributeName == Keyword.Type) || (attributeName == Keyword.Class)) {
         return new ClassNameAttribute(containerName);
     }
     return base.CreateAttribute(nameIdentifier, attributeContainer, parentTag);
 }