Question About TargetElementEvaluator

I have been working on implmenting a TargetElementEvaluator in my custom language plugin, the problem I am using it to solve is one of aliasing. In lua you can have the following


function foo() end


local foo = foo


foo()


What this means is that foo will resolve to "local foo" and not the function foo.

I was using the TargetElementEvaluator to follow the chain of references and assignments until it reached the correct defintion.

This works for "go to defintion", however it does not work for quickdocumentation.

I guess my questions are:

1) Am I using TargetElementEvaluator correctly?

2) Should it work for documentation as well?


Thanks in advance,

Jon

1 comment
Comment actions Permalink

Hello Jon,

You should be able to implement all of the chain following logic as part
of the reference resolve process, without using TargetElementEvaluator. In
any case, TargetElementEvaluator is used only with a number of specific UI
actions, and it won't be called when resolving a reference as part of some
larger action.

I have been working on implmenting a TargetElementEvaluator in my
custom language plugin, the problem I am using it to solve is one of
aliasing. In lua you can have the following

function foo() end

local foo = foo

foo()

What this means is that foo will resolve to "local foo" and not the
function foo.

I was using the TargetElementEvaluator to follow the chain of
references and assignments until it reached the correct defintion.

This works for "go to defintion", however it does not work for
quickdocumentation.

I guess my questions are:

1) Am I using TargetElementEvaluator correctly?

2) Should it work for documentation as well?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


1

Please sign in to leave a comment.