This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 259034 - Do not remove import "on save" if file does not compile
Summary: Do not remove import "on save" if file does not compile
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-27 15:51 UTC by jslaroch
Modified: 2016-04-27 15:51 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jslaroch 2016-04-27 15:51:34 UTC
In some situations removing imports if the class does not compile results in a long cycle of errors when using a combination of alt+enter and ctrl+shift+s to fix a compile error. Hitting ctrl+shift+s is a reflex when I have compilation errors because it triggers update and recompile of related modified classes.
However, with the current implementation you often end up fighting with the editor because it removes required imports because of the compile error (they do not look like they are used, you temporarily remove reference to them hitting alt+enter and selecting different fix, ...).
Yes you could selectively save other files but it makes the whole process more complicated.
Modifying the "on save" would make this feature more compatible with other IDE "automatic" features.