It's all about the answers!

Ask a question

Fetching Selected Work Item Number Programmatically in eclipse using rtc API

Rajagopal Subhash (1226) | asked Jan 18 '15, 1:31 a.m.
 Hi Guys,
                I am querying work items and I am able to display the query results in the work items view (in eclipse). Now if user double click on a work item then the selected work item will be opened in the work item editor.
            Can any one please tell me the way to access the selected work item programmatically. I want to display that work item number in one text box. 

Accepted answer

permanent link
Ralph Schoon (63.2k33646) | answered Jan 19 '15, 2:06 a.m.
This is basically an Eclipse extension question. shows an example for a context menu. This works also for actions and the like. There is a lot of Eclipse extension material around that you can search for. You can also search the RTC SDK for examples. They all use selections.
Rajagopal Subhash selected this answer as the correct answer

One other answer

permanent link
sam detweiler (12.5k6195201) | answered Jan 18 '15, 6:15 a.m.
what data is in the list view?  I assume its ID, ID = Number.. so you are done..

otherwise you can get a workitem object from its ID by using

workItemCommon.findWorkItemById(id, profile, monitor)

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.