LocalWorkspaceChangesView - selecting TreeItem in the pending changes view
Hello to the forum members,
I am selecting a certain TreeItem in the pending changes view: First I get the TreeViewer from LocalWorkspaceChangesView using getActiveViewer(). Then I get the Tree control using TreeViewer.getTree() and after I locate the required TreeItem I call Tree.setSelection(TreeItem).
The problem: When I right-click on the selected TreeItem, I cannot see "Check-in" option if the item is unresolved. If I right-click on the item again, "Check-in" appears. I tried to see if the related command (com.ibm.team.filesystem.ide.ui.command.checkin, if I understand correctly) has some condition for the menu display, I did not find one. So, my current proposed solution is to use java.awt.Robot to generate mouse-click on the selected item.
I'm quite sure there is a more elegant solution to this issue. I will be grateful if you could share it with me.
Many thanks in advance,
Gidi
I am selecting a certain TreeItem in the pending changes view: First I get the TreeViewer from LocalWorkspaceChangesView using getActiveViewer(). Then I get the Tree control using TreeViewer.getTree() and after I locate the required TreeItem I call Tree.setSelection(TreeItem).
The problem: When I right-click on the selected TreeItem, I cannot see "Check-in" option if the item is unresolved. If I right-click on the item again, "Check-in" appears. I tried to see if the related command (com.ibm.team.filesystem.ide.ui.command.checkin, if I understand correctly) has some condition for the menu display, I did not find one. So, my current proposed solution is to use java.awt.Robot to generate mouse-click on the selected item.
I'm quite sure there is a more elegant solution to this issue. I will be grateful if you could share it with me.
Many thanks in advance,
Gidi
Comments
Gidi Gal
Oct 30 '16, 12:20 p.m.Gidi Gal
Oct 31 '16, 2:12 p.m.Gidi Gal
Nov 01 '16, 10:37 a.m.