Custom ReferenceProvider for EL Expressions

Hi, I need to register custom reference provider for EL Expressions in JSP, or better, extend in some way the internal one (is it possible).

I would like to provide definition of variable name and its bean in comment like:

<% // row is com.domain.java.some.package.RowBean %>

and provide code completion for EL Expressions just like it works when <jsp:useBean/> is used. My only problem now is that I do not know where do I have to register my reference provider or which interfaces do I have to implement.

I found thread http://intellij.net/forums/thread.jspa?messageID=5080353 about supplying resolver for JSF EL - is my problem the same case?

Thanks, Josef Pavlas

7 comments

Hello Josef,

and provide code completion for EL Expressions just like it works when
<jsp:useBean/> is used. My only problem now is that I do not know
where do I have to register my reference provider or which interfaces
do I have to implement.


Exactly this functionality is already present, and can be invoked by an intention
(that is available for unresolved EL variables).
You can also add it by hand:
---
<%@elvariable id="someBaz" type="foo.bar.Baz"%>
---


0

Hello Taras,

where is the intention you mentioned? I am using IDEA 6.0.5 (build 6180) and I can't find
it anywhere. But if was it already working, it would be great!

Thanks, Josef

0

This functionality is implemented in IDEA 7.0M1

Josef Pavlas wrote:

Hello Taras,

where is the intention you mentioned? I am using IDEA 6.0.5 (build 6180) and I can't find
it anywhere. But if was it already working, it would be great!

Thanks, Josef



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

0

Oh, okay, thanks very much. I'll try the new version.

0

By the way, why not simply use <jsp:useBean type="..."/>?


0

It's not my decision. I was told to do it... :)

0

So now I am developing under IDEA 7.0 M1, but there is problem with developers pack.

Class com.intellij.psi.impl.source.jsp.WebDirectoryUtil cannot be found and is used in classes such as com.intellij.struts.ValidatorDomFactory or com.intellij.struts.StrutsModelImpl.

Found another missing classes:
com.intellij.psi.impl.source.resolve.reference.impl.providers.WebPathReferenceProvider
com.intellij.javaee.web.ServletPathReferenceProvider
com.intellij.javaee.web.ServletDataHolder

Is it in some extra library??

Thanks, Josef

Message was edited by:
Josef Pavlas

Finally I found them. In JavaEE plugin.

Message was edited by:
Josef Pavlas

0

Please sign in to leave a comment.