reference custom xml schema

Hello everyone,
I'm writing a plugin which adds reference to my custom xml schema. Below is a sample xml file I'm using. As you can see it is inface a spring xml file with custom elements added through "xmlns:u="http://www.adroitlogic.org/ultraesb" line.

<?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:u="http://www.adroitlogic.org/ultraesb"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.adroitlogic.org/ultraesb http://schemas.ultraesb.org/ultraesb-2.0.xsd">
    <u:proxy id="hello-proxy">
        <u:transport id="http-8280"/>
        <u:target>
            <u:inSequence>
                <u:class name="com.org.ultra.CustomSequence"/>
            </u:inSequence>
        </u:target>
    </u:proxy>

    <u:proxy id="direct-proxy">
        <u:transport id="http-8280"></u:transport>
        <u:target endpoint="foo-endpoint" sequence="error-seq">
            <u:inSequence>
                <u:class name="com.org.ultra.CustomSequence"/>
            </u:inSequence>
        </u:target>
    </u:proxy>

    <u:sequence id="foo-seq">

    </u:sequence>

    <u:endpoint id="foo-endpoint">
    </u:endpoint>

    <u:sequence id="error-seq">
    </u:sequence>
</beans>


What I'm trying to do is   in the  <u:target inDestination="foo-endpoint" errorSequence="error-seq"> line there is "error-seq" value and when ctrl+click on that value it should navigate me to
<u:sequence id="error-seq">
    </u:sequence>
I know spring already has this facility. But how can I add that to my plugin?

And also in below section "com.org.ultra.CustomSequence" is a java class in java source path of the project. Like in spring, when I ctrl+click on that "com.org.ultra.CustomSequence", I want idea to navigate me to that java class.
<u:inSequence>
       <u:class name="com.org.ultra.CustomSequence"/>
</u:inSequence>

If someone can point out to me sample code, or a sample plugin which achive something simillar to above mentioned scenario that would be really helpful. It would be nice to look at Spring plugin source code to see how it does that. But unfortunately it is not included in idea community edition source code.

7 comments
Comment actions Permalink

We're going to opensource Spring-API in 13.1, so you'll be able to perform exactly these tasks and much more.

http://confluence.jetbrains.com/display/IDEADEV/Spring+API+Guide

0
Comment actions Permalink

That's wonderful news. But I using the latest IDEA available (13.0.2 ultimate). I can find below files.

  • $IDEA_HOME$/plugins/spring/spring-api.jar
  • $IDEA_HOME$/plugins/spring/spring.jar

But there is no

  • $IDEA_HOME$/lib/src/src_spring-openapi.zip


If you could please provide me src_spring-openapi.zip that would be most helpful.

0
Comment actions Permalink

It will be available in upcoming 13.<1>

0
Comment actions Permalink

I see. Thank you very much for the good news :) But in the mean time how can solve above mentioned problems with current resources?

0
Comment actions Permalink

13.1 EAP is now open: http://confluence.jetbrains.com/display/IDEADEV/IDEA+13.1+EAP

Please let us know how Spring API works for your needs.

0
Comment actions Permalink

Thanks Yann. I'll check it out and let you know how we utilized Spring API.

0
Comment actions Permalink

Awesome! This is good to hear :)

0

Please sign in to leave a comment.