ChooseByNameContributor and current Module
in ChooseByNameContributor#getNames(Project project, boolean b) the following code
sometimes
a) returns
b) or crashes with StackOverflow
Is there a better way to determine the current module?
Thanks,
Yann
请先登录再写评论。
Hello Yann,
YC> in ChooseByNameContributor#getNames(Project project, boolean b) the
YC> following code
YC>
YC>
YC>
YC> sometimes
YC>
YC> a) returns
YC> b) or crashes with StackOverflow
YC> Is there a better way to determine the current module?
Why do you need that? The choose by name lists work on project level, not
module level, so there is not clear which module should be "current" for
them.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Hi,
I need to find out the module of the current file, i.e. the editor where GoToSymbol was invoked.
It works the first time, but not on subsequent invocations (typing again, so IDEA queries again).
Helped myself by caching the module on first run and ignoring it later on.
Cheers,
Yann
Yann Cebron wrote:
It sounds like a better idea would be to query the editor manager for the
currently open editor(s) and use their modules.