private void updateReleaseOptionStatus() { if (fComplierReleaseCheck != null && !fComplierReleaseCheck.isDisposed()) { String compliance= getStoredValue(PREF_COMPLIANCE); // get actual value IVMInstall install= null; if (fProject != null) { // project specific settings: only test if a 50 JRE is installed
private void validateComplianceStatus() { if (fJRE50InfoText != null && !fJRE50InfoText.isDisposed()) { boolean isVisible= false; String compliance= getStoredValue(PREF_COMPLIANCE); // get actual value IVMInstall install= null; if (fProject != null) { // project specific settings: only test if a 50 JRE is installed
private void validateJRE50Status() { if (fJRE50InfoText != null && !fJRE50InfoText.isDisposed()) { boolean isVisible= false; String compliance= getStoredValue(PREF_COMPLIANCE); // get actual value IVMInstall install= null; if (fProject != null) { // project specific settings: only test if a 50 JRE is installed try { install= JavaRuntime.getVMInstall(JavaCore.create(fProject)); } catch (CoreException e) { JavaPlugin.log(e); } } else { install= JavaRuntime.getDefaultVMInstall(); } if (install instanceof IVMInstall2) { String compilerCompliance= JavaModelUtil.getCompilerCompliance((IVMInstall2) install, compliance); if (JavaModelUtil.isVersionLessThan(compilerCompliance, compliance)) { // Discourage using compiler with version less than compliance String[] args= { getVersionLabel(compliance), getVersionLabel(compilerCompliance) }; if (fProject == null) { fJRE50InfoText.setText(Messages.format(PreferencesMessages.ComplianceConfigurationBlock_jrecompliance_info, args)); } else { fJRE50InfoText.setText(Messages.format(PreferencesMessages.ComplianceConfigurationBlock_jrecompliance_info_project, args)); } isVisible= true; } } fJRE50InfoText.setVisible(isVisible); } }
boolean isVisible= false; Image image= JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); String compliance= getStoredValue(PREF_COMPLIANCE); // get actual value IVMInstall install= null; if (fProject != null) { // project specific settings: only test if a 50 JRE is installed