Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Extends the javascript code completion(How to extends the javascript content assist)
Extends the javascript code completion [message #1695429] Thu, 14 May 2015 15:10 Go to next message
Arian Fornaris is currently offline Arian FornarisFriend
Messages: 8
Registered: February 2014
Junior Member
Hello, I am implementing tools for the phaser game engine, I need to extend the javascript code assistant to show some strings that I get from some non-javascript files (phaser manifiests etc...)

For example, in a string partition, I would like to show all the names of the assets of the engine:

"pac[complete with "manSprite"]

Can you give me any tip? I am trying to implement it implementing the IJavaCompletionProposalComputer but I do not find any documentation about it. I need at least to get the current token, I need the AST of the javascript to know where the string token starts and ends.

Thanks in advance
Arian
Re: Extends the javascript code completion [message #1695434 is a reply to message #1695429] Thu, 14 May 2015 16:04 Go to previous message
Arian Fornaris is currently offline Arian FornarisFriend
Messages: 8
Registered: February 2014
Junior Member
I answer myself. Yes, it is working to me if I implements IJavaCompletionProposalComputer. In the method computeCompletionProposals() I cast the context to JavaContentAssistInvocationContext and then from this object I get all the information of the token.
Previous Topic:Web Service Client
Next Topic:XPath View - show text value
Goto Forum:
  


Current Time: Wed Apr 25 12:47:30 GMT 2018

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

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