Some questions on Find Usage

Hi guys,

Is it possible to customize Usage Pane with a custom group? Is API available for 7.x.x - 8.x.x  releases?
Also, is it possible to have additional options in Find Usages dialog box like that IDEA has?
Can the search scope be create programmatically without user intervention?

Thanks in advance,
Serhiy

3 comments
Comment actions Permalink

Hello serhiy,

Is it possible to customize Usage Pane with a custom group? Is API
available for 7.x.x - 8.x.x  releases?


There's an interface called UsageGroupingRuleProvider for that. If I remember
correctly it's there since IDEA 8.

Also, is it possible to have additional options in Find Usages dialog
box like that IDEA has?


You can't add additional options to existing dialogs like "find usages of
a class" or "find usages of a method", but you can provide a customized dialog
for your own language or element type.

Can the search scope be create programmatically without user
intervention?



Yes.

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


0
Comment actions Permalink

Thanks for the answers, Dmitry.

Talking about the customization of the  Find Usage dialog, you mean implementing of the FindUsagesProvider interface?
As an alternative, is it possible to override Find Usages action in the context menu? I would like the invoke of Find Usages is able to trigger my own action for the files associated with my language. If it is possible could you point out an exampe of code?

Thanks,
Serhiy

0
Comment actions Permalink

Hello serhiy,

Thanks for the answers, Dmitry.

Talking about the customization of the  Find Usage dialog, you mean
implementing of the FindUsagesProvider interface?

As an alternative, is it possible to override Find Usages action in
the context menu? I would like the invoke of Find Usages is able to
trigger my own action for the files associated with my language. If it
is possible could you point out an exampe of code?


There's a different interface called FindUsagesHandler, which gives you complete
control over the UI of the Find Usages operation. You can find examples of
its usage in the CE source.

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


0

Please sign in to leave a comment.