ctrl-b navigation in non-jsp include tags (ATG Dynamo)

Is there any way to get IDEA to recognize JSP tags as
navigable? For example, ATG Dynamo has a <dsp:include>
tag that works just like <jsp:include>, and I'd like to
be able to ctrl-b on this tag to navigate to the reference.

Is there any way to add this tag to a list of navigable
tags?

Could this be accomplished by writing a plugin?

There are also:

<dsp:importbean bean="/atg/dynamo/droplet/Switch>
and
<dsp:droplet name="/atg/dynamo/droplet/Switch>

tags that point to .properties files. It would be
nice to be able to navigate to these files.

Anyone else using IDEA on a Dynamo project? Have any
tips/tricks?

Thanks --Joachim

2 comments

You need PsiReferenceProvider implemented in plugin that is bound to
uri of your taglib, tag and attribute names of interest.
ReferenceProviderRegistry allows getting providers for path references.
More explicit customization will be available in Demetra

Joachim Martin wrote:

Is there any way to get IDEA to recognize JSP tags as
navigable? For example, ATG Dynamo has a <dsp:include>
tag that works just like <jsp:include>, and I'd like to
be able to ctrl-b on this tag to navigate to the reference.

Is there any way to add this tag to a list of navigable
tags?

Could this be accomplished by writing a plugin?

There are also:

<dsp:importbean bean="/atg/dynamo/droplet/Switch>
and
<dsp:droplet name="/atg/dynamo/droplet/Switch>

tags that point to .properties files. It would be
nice to be able to navigate to these files.

Anyone else using IDEA on a Dynamo project? Have any
tips/tricks?

Thanks --Joachim



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Joachim Martin wrote:

Is there any way to add this tag to a list of navigable tags?


Not that I know of. There is no generic mechanism that can declare tags/attributes to be a
reference to a file. This sounds like a good feature request though.

Could this be accomplished by writing a plugin?


Probably. It does work with "pure" XML though I'm not sure about custom JSP tags. However
it's not possible with the officially published OpenAPI, you need to use unsupported
IDEA-classes to inject references to files into a custom tag/attribute.

You'll need to look at the following classes to get started:

com.intellij.psi.impl.source.resolve.reference.
ReferenceProvidersRegistry
PsiReferenceProvider
providers.FileReferenceSet

There's also the XPathView+XSLT-Support plugin (comes with sources) you can use for reference.

HTH,
Sascha

0

Please sign in to leave a comment.