Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Content Assist exstension in JSP editor(How to add content assist extension for speciific tag lib. )
Content Assist exstension in JSP editor [message #529375] Sat, 24 April 2010 09:27 Go to next message
Filip Kis is currently offline Filip KisFriend
Messages: 31
Registered: April 2010
Member
Hi all!

I'm working on a project JSP Tag Library project and I would be interested in extending JSP editor so that I provide some specific Content Assist on attribute completion.

So basically when user writes following

<mak:list from="

I would like to compute dynamically the right possibilities for the from attribute and provide them to the user.

I've seen that there have been some recent additions to the SSE about Content Assist stuff, but I'm not sure if and how I could use them to extend the JSP editor.

Any help would be very appreciated.

Cheers

Filip
Re: Content Assist exstension in JSP editor [message #529597 is a reply to message #529375] Mon, 26 April 2010 14:01 Go to previous messageGo to next message
Ian Tewksbury is currently offline Ian TewksburyFriend
Messages: 48
Registered: July 2009
Location: RTP, NC, USA
Member
Filip,

You are correct, there have been significant improvements made to the content assist and the extension points adopters can use to extend it.

Assuming you have one of the latest WTP 3.2 milestone builds I suggest you take a look at the org.eclipse.wst.sse.ui.completionProposal extension point in the org.eclipse.wst.see.ui plugin. It is very well documented and provides examples. If you are still having issues after reading through the documentation please let me know and I will help in any way I can.

Blue Skies,

~Ian


Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
Re: Content Assist exstension in JSP editor [message #529859 is a reply to message #529597] Tue, 27 April 2010 13:41 Go to previous messageGo to next message
Filip Kis is currently offline Filip KisFriend
Messages: 31
Registered: April 2010
Member
Hi Ian!

Thank you for your help. Indeed I was using the WTP 3.2 and managed to get the proposal extension working.

However I've found that i would greatly benefit if I would be able to extend

org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLCom pletionProposalComputer

since I'm basically dealing with content assisting of attribute values. But the usage of that class is discouraged (since it's internal). Is there any way around this, because I don't feel like reimplementing the whole XML parsing logic.

Also, I'm doing this for a JSP Tag library and it would be great if I could access the taglib declarations (to know the prefix of my taglib) and maybe some other information (that didn't come to my mind yet). So any tip on how I could access this information in my content assist class would be helpful.

Thanks once more

Filip
Re: Content Assist exstension in JSP editor [message #529880 is a reply to message #529859] Tue, 27 April 2010 14:39 Go to previous message
Ian Tewksbury is currently offline Ian TewksburyFriend
Messages: 48
Registered: July 2009
Location: RTP, NC, USA
Member
Filip Kis wrote on Tue, 27 April 2010 09:41
However I've found that i would greatly benefit if I would be able to extend

org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLCom pletionProposalComputer

since I'm basically dealing with content assisting of attribute values. But the usage of that class is discouraged (since it's internal). Is there any way around this, because I don't feel like reimplementing the whole XML parsing logic.
There was consideration made as to whether or not to make that class API when the new framework was built but we did not think there would be demand for it and in an effort to keep the public API small we opted to make it internal. If it is something you feel would be usefull to the community as a whole please open a Bugzilla enhancement request with votes and if there is enough demand for access to it we could work on making it API quality.

Filip Kis wrote on Tue, 27 April 2010 09:41
Also, I'm doing this for a JSP Tag library and it would be great if I could access the taglib declarations (to know the prefix of my taglib) and maybe some other information (that didn't come to my mind yet). So any tip on how I could access this information in my content assist class would be helpful.
All of the taglib code is also internal. You could take a look at the internal JSPTaglibCompletionProposalComputer to see how we generate suggestions based on taglibs. If the Taglib code is something you think would be useful API, you could open another enhancement request for that as well, noting which classes/methods would be useful to be API and why.

If you do open the enhancements please report their numbers back here for documentation purposes.

Blue Skies,

~Ian


Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
Previous Topic:Using generics in xml jsp
Next Topic:dojo and JavaScript validation?
Goto Forum:
  


Current Time: Thu Mar 28 23:40:33 GMT 2024

Powered by FUDForum. Page generated in 0.04774 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top