Adding context menu to Stream and Snapshot
Hi,
I would like to add a context menu to stream and snapshot.
I know how to create such for workitem using:
<extension point="org.eclipse.ui.popupMenus">
<objectContribution objectClass="com.ibm.team.workitem.common.model.IWorkItemHandle"
What is the objectClass of Stream and Snapshot?
Thanks,
Moti
|
Accepted answer
Moti,
please find a detailed description in Ralphs blog or simply look at my code in our joint project. I just added it to the component today ;-) If this is helpful, please mark the answer as accepted. Best, Arne Moti Wertheimer selected this answer as the correct answer
|
2 other answers
Thanks all for the help.
I found that a Snapshot is com.ibm.team.filesystem.ui.wrapper.TeamPlaceWrapper
In order to find it out I used this code. when right clicking an element I see the class name in the context menu...
in plugin.xml
<objectContribution objectClass="com.ibm.team.filesystem.ui.wrapper.AbstractWrapper"
id="com.ibm.team.workitem.mystuff.popup.createImpoerantStream">
<action class="com.ibm.team.errata.ui.MyPopupAction"
...
in MyPopupAction.java:
public class MyPopupActionimplements IObjectActionDelegate {
...
@Override
public void selectionChanged(IAction action, ISelection selection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
com.ibm.team.filesystem.ui.wrapper.AbstractWrapper wrapper = (AbstractWrapper) structuredSelection.getFirstElement();
action.setText(wrapper.getClass().getName());
}
|
Ralph Schoon (63.6k●3●36●46)
| answered May 21 '14, 10:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Moti,
please have a look at https://rsjazz.wordpress.com/2014/02/21/adding-context-menus-for-jazz-objects-to-the-rtc-eclipse-client/ which explains some of the objects and how to find out others, you don't know yet. Comments
Ralph Schoon
commented May 21 '14, 10:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
For snapshots it is com.ibm.team.filesystem.ui.wrapper.SnapshotWrapper there are several other wrappers
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.