The namespace elements <tx:advice> and <tx:annotation-driven> have an attribute "transaction-manager".
This attribute should refer to a bean of PlatformTransactionManager type.
At the moment the XML editor inserts a completion variant "transactionManager" from the "default" attribute declaration in XSD.
It would be nice if this could be disabled:
- if there's no bean named "transactionManager" the suggestion will be invalid
- if there actually is a "transactionManager" bean, the spring facet itself will provide completion for it (based on DOM or schema annotations, not sure)
An API to restrict/filter completions coming from DTD/XSD would be nice, but I assume not in Selena timeframe :)
Issue was resolved
However, when using the spring facet, sometimes XSD-driven completion suggests a "default" value that is not valid (in spring sense).
Ok, so if we let the current behavior in place, if there a way for the spring facet to remove such a completion variant?
namespace URI: http://www.springframework.org/schema/tx
element names: "annotation-driven", "advice"
attribute name: "transaction-manager"
Try to invoke code completion for "transaction-manager" attributes in example below:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"> <bean class="org.springframework.jdbc.datasource.DataSourceTransactionManager" id="txMan"/> <tx:annotation-driven transaction-manager=""/> <tx:advice transaction-manager=""/> </beans>Using #7531, I still get _both_ the XSD-driven default attribute value proposal, as well as the facet-provided bean name reference.
However, such pattern is not limited to <tx:advice> and <tx:annotation-driven>: the new "jms" namespace uses a number of such "bean name reference" defaults in the schema. Also some custom namespaces copy the pattern.