/** Default constructor */ public AbstractPage() { if (CDTPropertyManager.getPagesCount() == 0) { cfgDescs = null; lastSelectedCfg = null; multiCfgs = null; } }
protected void cfgChanged(ICConfigurationDescription _cfgd) { CConfigurationStatus st = _cfgd.getConfigurationStatus(); if (errPane != null && errMessage != null) { if (st.isOK()) { errPane.setVisible(false); } else { errMessage.setText(st.getMessage()); errPane.setVisible(true); } } resd = getResDesc(_cfgd); if (excludeFromBuildCheck != null) { excludeFromBuildCheck.setEnabled(resd.canExclude(!resd.isExcluded())); excludeFromBuildCheck.setSelection(resd.isExcluded()); } int x = CDTPropertyManager.getPagesCount(); for (int i = 0; i < x; i++) { Object p = CDTPropertyManager.getPage(i); if (p == null || !(p instanceof AbstractPage)) continue; AbstractPage ap = (AbstractPage) p; if (ap.displayedConfig) ap.forEach(ICPropertyTab.UPDATE, getResDesc()); } }
@Override public void informPages(int code, Object data) { for (int i = 0; i < CDTPropertyManager.getPagesCount(); i++) { Object p = CDTPropertyManager.getPage(i); if (p == null || !(p instanceof AbstractPage)) continue; AbstractPage ap = (AbstractPage) p; ap.handleMessage(code, data); } }
@Override public void dispose() { // Dispose the tabs if (displayedConfig) forEach(ICPropertyTab.DISPOSE); // Dispose any loaded images for (Image img : loadedIcons.values()) img.dispose(); loadedIcons.clear(); if (!isNewOpening) handleResize(false); // save page size isNewOpening = true; // Remove this page from the property manager CDTPropertyManager.remove(this); // clear static variables if (CDTPropertyManager.getPagesCount() == 0) { resd = null; cfgDescs = null; } }