SelectInTarget

Hi,

just played around with the SelectInTarget Interface.

1. How do I have to configure the interface-class in plugin.xml? Just configuring the class as an action (extends AnAction) doesn't seem to be sufficient.

2. Is it possible to let getToolWindowId and getMinorViewId return null and getWeight 0? My action semantics is "Select in Windows Explorer", so no toolwindow is involved here.

Thanks
Frank Bruch

0
1 comment

Hello Frank,

FB> Hi,
FB>
FB> just played around with the SelectInTarget Interface.
FB>
FB> 1. How do I have to configure the interface-class in plugin.xml?
FB> Just configuring the class as an action (extends AnAction) doesn't
FB> seem to be sufficient.
FB>
FB> 2. Is it possible to let getToolWindowId and getMinorViewId return
FB> null and getWeight 0? My action semantics is "Select in Windows
FB> Explorer", so no toolwindow is involved here.

You can look into Images sources. But it very simple to use. You need to
add SelectInTarget using SelectInManager in your ProjectListener then project
is opened, and remove it, then project closed.

1.

You need ProjectComponent or ApplicationComponenet implement ProjectListener.

2.

I think yes for null, but you also must have correct toString implementation
(and watch this one http://www.jetbrains.net/jira/browse/IDEA-3537).
If Weight is o - then your target will be at top of targets.

Thanks!
--
Alexey Efimov, Java Developer
Tops BI


0

Please sign in to leave a comment.