是否可以取消在@PostConstruct
階段創建視圖?我有:如何取消在Eclipse RCP e4中創建視圖?
@PostConstruct
public void createPartControl(Composite parent) {
try {
// do something where an exception is thrown
} catch (Exception e) {
// I want to cancel construction, close the view and show an error dialog
}
}
而不是試圖取消很多意見只是把錯誤信息放在視圖中而不是普通的內容。 –