It's all about the answers!

Ask a question

SCM: Disable Discard option in Eclipse

Kiran A (31134) | asked Jun 19 '18, 6:16 a.m.

Hello Team,

In RTC Eclipse client, how to disable Discard option? Or is there any other way to hide/handle Discard option in Eclipse client.

Any Solution...


One answer

permanent link
David Lafreniere (4.8k7) | answered Jun 19 '18, 4:01 p.m.
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.
Keep in mind that this 'support' is not really part of RTC, and is part of Eclipse itself. In you need to investigate more into this, try asking in and reading the Eclipse forums.

Kiran A commented Jun 21 '18, 6:49 a.m.

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.

David Lafreniere commented Jun 21 '18, 10:24 a.m.
I'm sorry that '' 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:

Ralph Schoon commented Jun 21 '18, 10:32 a.m. | edited Jun 21 '18, 10:41 a.m.

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.

for examples.

Your answer

Register or to post your answer.