java - show a view part from another using a button -
i want open viewpart button in viewpart of button.. using eclipse rcp , rcp viewparts.
my code:
button btnpush = new button(container, swt.none); btnpush.addselectionlistener(new selectionadapter() { @override public void widgetselected(selectionevent e) { // want display view here } });
get workbench page. in view part can use
iworkbenchpage page = getsite().getpage();
elsewhere use:
iworkbenchpage page = platformui.getworkbench().getactiveworkbenchwindow().getactivepage();
show , activate view:
page.showview("view id");
Comments
Post a Comment