It's all about the answers!

Ask a question

How to find out Domain or DomainSubtreeRoot from Selection since DomainSelection is internal


John Reysa (8856) | asked Nov 02 '12, 12:52 p.m.
edited Nov 02 '12, 1:01 p.m.
I am extending Domain and have several different types of Domains.
The Team Areas appear as children in the navigator.  I am trying to contribute to the right click actions on a Team Area.  The action should be different depending on the Domain.  However, the selection is identical in both Domains since it's a Team Area.  It seems I could cast the selection as a DomainSelection and do a getOriginal to see the full tree of the selected object.  However DomainSelection is in an internal package (com.ibm.team.process.internal.rcp.ui).

Is there another way I should be doing this?

Comments
John Reysa commented Nov 05 '12, 2:45 p.m.

Thinking about this a little more, does RTC have anything that extends org.eclipse.ui.AbstractSourceProvider that sets a variable?
Then the value of that variable (set to the Domain name, for example) could be used by the handler or menu definition in the plugin.xml to determine whether to enable the menu option.  Is RTC doing something like this?

Be the first one to answer this question!


Register or to post your answer.