Eclipse StatusManager do not show detail

て烟熏妆下的殇ゞ 提交于 2019-12-05 10:38:09

Default details area of status dialog does not display exception stack trace.

If you have your own Eclipse product then you can customize details and support areas of the status dialog using org.eclipse.ui.statusHandlers extension point. You will need to extend WorkbenchErrorHandler and override configureStatusDialog(...) method:

void configureStatusDialog(WorkbenchStatusDialogManager statusDialog) {
    statusDialog.enableDefaultSupportArea(true);
    statusDialog.setDetailsAreaProvider(new CustomStatusAreaProvider());
}

class CustomStatusAreaProvider extends AbstractStatusAreaProvider {
    Control createSupportArea(Composite parent, StatusAdapter statusAdapter) {
        //Create and return details area
    }
}



By passing the exception to Status instead of null you make the stack trace available for details dialog of error log view.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!