Issue with NavigationItem returned from a ChooseByNameContributor 关注
I have registered a gotoFileContributor extension implementing ChooseByNameContributor.
My first implementation of getItemsByName() was returning a custom implementation of NavigationItem that implemented both getPresentation() and navigate().
Unfortunately I got a ClassCastException because I discovered later that the GotoFileAction assumes that these NavigationItems are in fact PsiFiles.
The presentation aspect is not as demanding (no CCE) but it discardes totally the provided ItemPresentation. Apparently it just does a toString() to present it in the list if it isn't a PsiFile.
So my question is: is it a debt item not yet removed? Is it reasonable to expect that in a not too distant future the GotoFileAction should just call navigate() on the returned NavigationItem and that the ItemPresentation will be used to render each candidate?
Thanks
请先登录再写评论。
Hello Jacques,
Indeed, looks like the PsiFile dependency in this code is unnecessary. Please
file a JIRA issue (and a patch is also welcome :) ).
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I will take a look at what it takes to contribute a patch.
I did not find any detailled information about testing. The contribution page just says that we need to update/add functional tests but I could not find any description of IDEA test framework(s) and how to use/run them.
Is there something that I missed?
I am sorry, I really want to help here but I have barely enough time to learn the app and contribute a patch, let alone finding out what framework I should use and potentially doing it the wrong way. I believe this is an important part of drawing in your community.
At least you could quickly point people at some "prototypical" tests you want people to follow based on the part of the app they want to modify.
Also, is it possible to submit remote builds to your teamcity farm? We use teamcity at work and I would feel "naked" to do anything w/o a clean remote build first :-). This would also help you getting better patches.
Jacques
Hello Jacques,
There are so many areas of code in IntelliJ IDEA that there is hardly a way
for us to publish a list of prototypical tests for each one of them in advance.
Also, this particular piece of code is essentially UI code, and we don't
generally write any tests for UI code. So you're welcome to submit a patch
with no tests. :)
We plan to run builds of the community edition on teamcity.jetbrains.com
but it's not there yet.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"