It's all about the answers!

Ask a question

How to use workitem view in my plugin?

Jia Jia Li (8057151192) | asked Dec 26 '11, 5:05 a.m.
Hi, I have create my own editor, and one button in the editor, the button function is when clicked, program run query for some work items. I can do this. Then my question is, I want to display the query work items result with RTC Client Work Item View.

I think I can call the VIEW and then setinput with my query result.

Who can tell me the RTC Client Work Item View details?

I know the VIEW id is "". I can run this view:
IViewPart viewPart = UIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("");

But how can I setinput for this view?


2 answers

permanent link
Jia Jia Li (8057151192) | answered Dec 29 '11, 9:57 p.m.
List<IWorkItemHandle> fNewWorkItems = new ArrayList<IWorkItemHandle>();
fNewWorkItems.add(client.findWorkItemById(203, IWorkItem.FULL_PROFILE, null));

WorkItemExplorer2 viewPart = (WorkItemExplorer2)UIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("");

((IShowsQuery)viewPart).showWorkItems(projectArea, "xxx", fNewWorkItems.toArray(new IWorkItemHandle));

permanent link
Jia Jia Li (8057151192) | answered Dec 29 '11, 9:59 p.m.
But the problem is the workitem view uses the default layout/columu.
But I want to customize the columu. Have not known how to set the layout....
Anyone can help?

Your answer

Register or to post your answer.