Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344137

Summary: Changing an option on the 'Compiler > Errors/Warnings' always results in full build
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P4 CC: amj87.iitr, daniel_megert, deepakazad, markus.kell.r
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Deepak Azad CLA 2011-04-28 10:46:09 EDT
We can be smarter here

- If an option is changed from error to warning, we should simply convert the corresponding error markers to warning markers.
- Similarly for changing an option from warning to error
- If an option is changed from error/warning to ignore, the corresponding markers can simply be deleted

So the only case a build should happen is if an option is changed from ignore to error/warning.
Comment 1 Markus Keller CLA 2011-04-28 13:23:46 EDT
The build is triggered in org.eclipse.jdt.internal.ui.preferences.
OptionsConfigurationBlock.processChanges(IWorkbenchPreferenceContainer).

For workspace option changes, this becomes quite complicated, since their effect depends on whether we have project-specific settings or not.

Even for project-specific options, it's not trivial. Some of the options have dependencies on other options, and the added smartness needs to take this into account. I don't want to duplicate all these dependencies in the UI code. The only options we could consider are the Ignore/Warning/Error options.

> - If an option is changed from error/warning to ignore, the corresponding
> markers can simply be deleted

We have to check carefully whether that's really true for all options. Might not be the case for e.g. the SuppressWarnings options.

Furthermore, we would have to be sure that the compiler doesn't suppress any warnings when it encounters an error in the vicinity.
Comment 2 Dani Megert CLA 2011-04-28 13:34:02 EDT
Maybe this could be delegated to JDT Core?