Bug 344137 - Changing an option on the 'Compiler > Errors/Warnings' always results in full build
Summary: Changing an option on the 'Compiler > Errors/Warnings' always results in full...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-28 10:46 EDT by Deepak Azad CLA
Modified: 2011-04-29 00:42 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?