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 :) ).

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

---
Original message URL:
http://www.jetbrains.net/devnet/message/5250773#5250773

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


0
评论操作 固定链接

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

0
评论操作 固定链接

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.

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

---
Original message URL:
http://www.jetbrains.net/devnet/message/5250986#5250986

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


0

请先登录再写评论。