It's all about the answers!

Ask a question

Adding menu item to a changeset


Mike Johnson (28624221) | asked Dec 07 '09, 12:55 p.m.
I'd like to extend the RTC Eclipse client by adding a couple of menu items to a changeset in the "Pending Changes" view. (For example, I'd like to add a "Submit to our code review tool" menu item...)

I haven't seen anything in the SDK that discusses extending the menus. Can anyone point me to that? For my specific example, it would be how to extend the menu item, and then how to know which specific changeset was selected. I think I can follow the rest of the SDK docs (and forum posts) to do what I need to do from that point.

Thanks in advance,
Mike Johnson

6 answers



permanent link
Jean-Michel Lemieux (2.5k11) | answered Dec 07 '09, 7:51 p.m.
JAZZ DEVELOPER
The best trick is to find an action which works on a change set already, the ui code for the pending changes view is in "com.ibm.team.filesystem...ui.ide". If you open the plugin.xml file you'll see the menu contributions. Find an action that seems familiar, usually the classnames are close to that the actual UI menus show, etc, Deliver, Accept, Suspend, etc...

The menu contributions use the basic Eclipse contribution mechanisms.

Cheers,
Jean-Michel

permanent link
Mike Johnson (28624221) | answered Dec 08 '09, 2:05 p.m.
The best trick is to find an action which works on a change set already, the ui code for the pending changes view is in "com.ibm.team.filesystem...ui.ide".

Jean-Michel,

Thanks. Where would I find the code you refer to? I don't see that in the RTC SDK. (I downloaded the 2.0.0.1 SDK.) Of course I'm getting the "directory names too long" problem when searching for it...

Thanks,
Mike

permanent link
Mike Johnson (28624221) | answered Dec 08 '09, 2:37 p.m.
Where would I find the code you refer to?

OK, never mind -- I found it. It's in the RTC source code itself:

source

rtc
eclipse
plugins
com.ibm.team.filesystem.feature.ide.source_2.0.1.I200909091559-7L-79_MdLT9PkY0jrqaAZ_WBEAK
src
com.ibm.team.filesystem.ide.ui_2.0.1.I200909031824


In this directory there's another zip file called com.ibm.team.filesystem.uisrc.zip. In there I found, for example, DeliverAction.java.

This is the first type of Eclipse (or RTC) plug-in I've written. Do you have a page that's "RTC Client Plug-Ins for Dummies?" I realize I probably need to know something about Eclipse plug-ins before I deal with the RTC-specific part. Is there a good page for that? And then once I do that, is the "RTC 2.0 Development Environment Setup" at https://jazz.net/wiki/bin/view/Main/RTCSDK20_DevelopmentEnvironmentSetup sufficient to get me up and running? I don't really see anything there specifically about RTC client plug-ins, just stuff running against the "plain Java libraries."

Thanks in advance,
Mike Johnson

permanent link
Mike Johnson (28624221) | answered Dec 08 '09, 3:55 p.m.
OK, another question about the following statement:
If you open the plugin.xml file you'll see the menu contributions.


Here's what I see in the plugin.xml. In fact, it appears all of the plugin.xml files contain this (they're all 186 bytes long):
<xml>

<eclipse>
<plugin>

<extension>
<location>
</extension>

</plugin>

permanent link
Jean-Michel Lemieux (2.5k11) | answered Dec 08 '09, 8:19 p.m.
JAZZ DEVELOPER
Yeah, if you've never done any plug-in development, there are a couple of concepts to learn first that would help. I've recorded some videos on how to setup the SDK and search for code.

https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample

If you follow the videos, at some point I open the "Plug-ins" view, in this view you can actually open the plugin.xml files and see the real contents. The file you are looking at is just a placeholder (eg, skeleton) for the source attachements themselves.

Cheers,
Jean-Michel

permanent link
Robin Bobbitt (59679) | answered Mar 08 '10, 5:59 p.m.
Is it possible to add additional decorators and labels to files in the pending changes view? I want to contribute a new action on files in this view, and when this action is taken I'd like to decorate the file icon and add a label similar to the "Locked by me in xyz" text we see today when we lock a file in this view. Can I do this? Is there an example I should look at? Thanks!

Your answer


Register or to post your answer.