Problems with hyperlinking service [message #511422] |
Mon, 01 February 2010 15:11 |
Margus Freudenthal Messages: 12 Registered: February 2010 |
Junior Member |
|
|
Hi,
I am trying to create an IDE for my language using IMP. In general everything works fine and is a joy to use. However, I cannot get the hyperlinking service to work. I added the hyperlinking service (as I understand, I do not need to do anything here) and reference resolving service. When I hover the mouse over a token, the reference resolver's getLinkTarget() method is called. I return an AST node for a definition of that identifier. When I hold down ctrl, the token becomes underlined, just like in JDT. However, when I click on the underlined link, nothing happens.
What can be the problem? I use a custom ANTLR-based parser and I have implemented my own ParseController and SourceLocator. Other services (outlining, folding, tooltips, content completion, syntax colouring) work fine, so I assume that these services should be correct.
Can you point me to some directions? The documentation doesn't say much about reference resolving and linking except that they do exist and give examples based on LEG. Are there some common errors that people typically make?
Margus
|
|
|
Re: Problems with hyperlinking service [message #516716 is a reply to message #511422] |
Wed, 24 February 2010 21:30 |
Robert M. Fuhrer Messages: 294 Registered: July 2009 |
Senior Member |
|
|
On 2/1/10 10:11 AM, Margus Freudenthal wrote:
> Hi,
>
> I am trying to create an IDE for my language using IMP. In general
> everything works fine and is a joy to use. However, I cannot get the
> hyperlinking service to work. I added the hyperlinking service (as I
> understand, I do not need to do anything here) and reference resolving
> service. When I hover the mouse over a token, the reference resolver's
> getLinkTarget() method is called. I return an AST node for a definition
> of that identifier. When I hold down ctrl, the token becomes underlined,
> just like in JDT. However, when I click on the underlined link, nothing
> happens.
>
> What can be the problem? I use a custom ANTLR-based parser and I have
> implemented my own ParseController and SourceLocator. Other services
> (outlining, folding, tooltips, content completion, syntax colouring)
> work fine, so I assume that these services should be correct.
The SourceLocator has to understand whatever type of object the reference
resolver produces. Perhaps that's the problem?
--
Cheers,
-- Bob
--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center
IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
|
|
|
|
Re: Problems with hyperlinking service [message #577374 is a reply to message #516716] |
Thu, 25 February 2010 11:42 |
Margus Freudenthal Messages: 12 Registered: February 2010 |
Junior Member |
|
|
Quote:
> The SourceLocator has to understand whatever type of object the reference resolver produces. Perhaps that's the problem?
The problem was indeed in source locator. It turned out that the method getPath(entity) returned path relative to the project and the linking service could not find the file where the target file belonged.
Thanks for the help,
--
Margus
Margus
|
|
|
Powered by
FUDForum. Page generated in 0.03003 seconds