private void showOrHideProblemView() { boolean showProblems = PreferenceStoreHelper.getInstancePreferenceStore() .getBoolean(IPreferenceConstants.I_PARSER_POPUP_ERRORS); if (showProblems) { if (TLAMarkerHelper.currentSpecHasProblems()) { // This used to be in Activator. However, // at startup there might not be an // activePage which results in a // NullPointerException. Thus, have the // ProblemView check the parse status when // UI startup complete. ProblemView view = (ProblemView) UIHelper.getActivePage().findView(ProblemView.ID); // show if (view != null) { // already shown, hide UIHelper.hideView(ProblemView.ID); } // not shown, show UIHelper.openViewNoFocus(ProblemView.ID); } else { // hide UIHelper.hideView(ProblemView.ID); } } }