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
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
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());
}