XmlAttribute name with colon is not recognized by the @Attribute annotation

Answered

Hi all,

I am writing a plugin for an XML file validation. I have an XML tag with an attribute that contains colon in it and the extension of DomElement doesn't pickup the attribute automatically.

XML example:

<serviceTask activiti:expression="#{newCustomerProcessBean.createCustomer(someDetails, otherDetails, execution)}">

Java code:

public interface ServiceTaskTag extends ActivitiDomElement {
@Attribute(value = "activiti:expression")
@Convert(ActivitiExpressionReferenceConverter.class)
GenericAttributeValue<PsiReference> getActivitiExpression();
}

The issue is that I don't get any hit on my converter. If I change the name of the attribute both in XML and Java code then it gets hit. Also the code is not highlighted with red inside the attribute value.

Is this the expected functionality of the API or I need to do something to catch the name with colon?

Thanks,

George

 

1 comment
Comment actions Permalink

Hi,

For those who still need an answer to this question, @Yann answered to it in a different thread. I registered "activiti" namespace in DomFileDescription, I made an extension of GenericAttributeValue that I annotated with @Namespace("activiti") and I use this extension as definition for an attribute annotated with @Attribute("expression".

Here is a link https://intellij-support.jetbrains.com/hc/en-us/community/posts/205450390/comments/115000035024 

0

Please sign in to leave a comment.