Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] Can u open a view on click of a button?

Just put something like this in the selectionListener of a button.

IViewPart tableView = null;
try {
			IWorkbenchPage page = getActivePage();
			tableView = page.findView(view_id);
			if (tableView == null) {
				// showView will give focus to the created view, we don't want
				// that so we save the active part
				IWorkbenchPart part = page.getActivePart();
				tableView = page.showView(view);
				// and return the focus to it
				page.activate(part);
			}
} catch (PartInitException e) {
	e.printStackTrace();
}

Regards,
Leen Toelen


On 10/19/05, Ramakrishna RangaRao <rkrangar@xxxxxxx> wrote:
>  Hi All,
>
>     Is it possible to open a view on click of a button in eclipse?
>
>  -Ranga
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pde-dev
>
>
>


Back to the top