ActorCalendar actorCalendarView = new ActorCalendar();
try { IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("de.uhd.ifi.se.pcm.bppcm.ui.ActorCalendar"); if (view instanceof ActorCalendar) { actorCalendarView = (ActorCalendar) view; actorCalendarView.doStuff(); } } catch (PartInitException ex) { // showView() can throw an exception if view cannot be shown ex.printStackTrace(); }
this worked for me!