2010-11-08 50 views
0

我想從代碼中打開設計報告透視圖(也許當我雙擊一個報告,應該打開透視圖)在一個rcp eclipse應用程序中,我不知道從哪裏開始。 任何人都可以幫助我,告訴從哪裏開始,第一步是什麼。設計報告透視 - eclipse rcp

非常感謝你

回答

1
String perspId = "some.perspective.id"; 
IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); 
IPerspectiveRegistry reg = PlatformUI.getWorkbench().getPerspectiveRegistry(); 
w.getActivePage().setPerspective(reg.findPerspectiveWithId(perspId));