Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 246239 - [preferences] 'Restore Defaults' on Java > Compiler page does not see changed default JRE
Summary: [preferences] 'Restore Defaults' on Java > Compiler page does not see changed...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P5 minor (vote)
Target Milestone: 4.5 M5   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 121057
Blocks:
  Show dependency tree
 
Reported: 2008-09-04 11:54 EDT by Markus Keller CLA
Modified: 2014-12-19 07:57 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-09-04 11:54:03 EDT
HEAD (and 3.4.2) after bug 243712

The 'Restore Defaults' button on the Java > Compiler preference page does not see a changed or added default JRE (i.e. change it on the 'Installed JREs' page and then go to Compiler and click the restore button without leaving the dialog).

The problem is that there's no "working copy" for VM installs, see bug 121057.
Comment 1 Markus Keller CLA 2008-09-04 12:08:00 EDT
If the fix for bug 121057 is to update JavaRuntime.getDefaultVMInstall() immediately, then the fix for this bug could be to override performDefaults() in ComplianceConfigurationBlock to:

	public void performDefaults() {
		setDefaultCompilerComplianceValues();
		super.performDefaults();
	}

(and remove setDefaultCompilerComplianceValues(); in the constructor).
Comment 2 Markus Keller CLA 2008-09-05 05:31:16 EDT
> (and remove setDefaultCompilerComplianceValues(); in the constructor).

Should actually leave it there as well, since the default is also used to initialize the page in case there are no existing settings.
Comment 3 Dani Megert CLA 2014-12-19 07:57:09 EST
This works if one hits 'Apply' when leaving the 'Installed JREs' page.