Bug 21022

Summary: warning on imports while typing and warning on unused imports is on
Product: [Eclipse Project] JDT Reporter: Genady Beryozkin <eclipse>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Genady Beryozkin CLA 2002-06-26 14:24:34 EDT
the title says it all:
go to java compiler settings, set "unused imports" to "warn".
now if the file is not well formed syntactically (i.e, when editing)
all imports have a lightbulb next to them suggesting to remove them.

happens with eclipse 2 GM1.
Comment 1 Philipe Mulet CLA 2002-09-13 05:06:52 EDT
Due to syntax recovery, in presence of syntax errors, we may not rebuild 
sections of source containing references through some imports.

e.g.

import java.io.*;
class X {
  { IOException e;



note that the following would still work fine:
import java.io.*;
class X {
  IOException e;

in spite of the missing closing curly brace.
Comment 2 Philipe Mulet CLA 2002-09-13 06:28:41 EDT
Fixed, no unused import report is made if any syntax errors was reported.
Comment 3 David Audel CLA 2002-09-19 07:34:24 EDT
Verified.