1

IntelliJ Idea 11.1.4 中的工具提示存在一些问题

我有一个项目,我在其中使用spring进行配置。

当我想将很多 xsd 文件组合在一起时,工具提示不起作用。我给你举个例子。在spring.schemas我们有两条记录

http\://www.example.com/schema/test.xsd=test-schema.xsd
http\://www.example.com/schema/test-in.xsd=test-schema-in.xsd

测试模式 in.xsd

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://www.example.com/schema/test"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:beans="http://www.springframework.org/schema/beans"
            targetNamespace="http://www.example.com/schema/test"
            elementFormDefault="qualified">

    <xsd:element name="name-element" type="type1"/>

    <xsd:complexType name="type1">
        <xsd:complexContent>
            <xsd:extension base="beans:identifiedType">
                <xsd:all>
                    <xsd:element name="name" type="xsd:string"/>
                </xsd:all>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

</xsd:schema>

测试模式.xsd

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://www.example.com/schema/test"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:beans="http://www.springframework.org/schema/beans"
            targetNamespace="http://www.example.com/schema/test"
            elementFormDefault="qualified">

    <xsd:include schemaLocation="http://www.example.com/schema/test-in.xsd"/>

    <xsd:element name="age-element" type="type2"/>

    <xsd:complexType name="type2">
        <xsd:complexContent>
            <xsd:extension base="beans:identifiedType">
                <xsd:all>
                    <xsd:element name="age" type="xsd:integer"/>
                </xsd:all>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

</xsd:schema>

我们有这么简单的xml文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:ex="http://www.example.com/schema/test"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.example.com/schema/test
       http://www.example.com/schema/test.xsd">

    <ex:age-element>
        <ex:age>
            3
        </ex:age>
    </ex:age-element>

    <ex:name-element>
        <ex:name >
            Simple Name
        </ex:name>
    </ex:name-element>

</beans>

在工具提示中,我可以看到age-element,但看不到name-element

有没有一种解决方案可以在一个命名空间(包含)中使用大量 xsd 文件并查看Idea 工具提示中的元素?

4

0 回答 0