Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can multiple instances of the same view be made to appear at the same time?

appear INSTANCES time view
0
10 Posted

Can multiple instances of the same view be made to appear at the same time?

0
10

Yes. See IWorkbenchPage.showView(String primaryId, String secondaryId, int mode). The element in the plugin.xml must also specify allowMultiple=”true”. Be sure to use a different secondaryId for each instance, otherwise showView will find any existing view with the same primaryId and secondaryId rather than showing a new one. To pass instance-specific data to the view, you will need to cast the resulting IViewPart down to the concrete view class and call your own setData method. Note that views with a secondaryId will not match placeholders specifying just the primaryId. In a perspective factory, placeholders can be added for multi-instance views using the format primaryId + ‘:’ + secondaryId, where ‘*’ wildcards are supported.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123