SCM: Disable Discard option in Eclipse
One answer
There is no official / out-of-the-box way to remove the "Discard" context menu action from the RTC clients.
I would say you can request an RFE or create an Enhancement work item, but personally I don't think that this would raise in priority over all the existing RFEs/Enhancements.
Also, why would you want to remove such a basic operation?
To really answer your question though, there are "hacky" ways to remove context menu actions in Eclipse as shown in the links below, but this won't work for the RTC Visual Studio client.
- https://rsjazz.wordpress.com/2014/03/24/hiding-ui-contributions-in-the-rtc-eclipse-client/
- https://rsjazz.wordpress.com/2014/02/21/adding-context-menus-for-jazz-objects-to-the-rtc-eclipse-client/
Comments
Hello David,
Thank you for the reply.
Actual problem is, without knowing, the users discarding the Changesets and its quite difficult to get back the discard Changesets again. To avoid this confusion we want to disable the Discard option. And I got through the link which you have shared but regarding Disabling option I didn't get any idea.
I'm sorry that 'https://rsjazz.wordpress.com/2014/03/24/hiding-ui-contributions-in-the-rtc-eclipse-client/' is not clear for you. Since this is an Eclipse feature, you could try searching through Eclipse sites/articles/help to see if they explain it in more detail.
As of RTC 6.0.4 we have added an Operation History view which makes it extremely trivial to recover discarded change sets. You can easily rollback your workspace or individual component to 'any' state in the past (such as a state right before you discarded a change set). Or if you don't want to roll-back, it still makes it easy to find discarded change sets, and open them in the Change Explorer or Change Summary views, and either accept them, or create a patch off them, etc.
For more information on the Operation History view, see:
In addition it would be possible to write preconditions/advisors for checkin and deliver that prevent checkin and delivery if your rules are not met. In which case you can keep the menus and just add your new entry.
See https://rsjazz.wordpress.com/2013/09/30/delivering-change-sets-and-baselines-to-a-stream-using-the-plain-java-client-libraries/
and https://jazz.net/library/article/89651
for examples.