Bug 21022 - warning on imports while typing and warning on unused imports is on
Summary: warning on imports while typing and warning on unused imports is on
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-26 14:24 EDT by Genady Beryozkin CLA
Modified: 2002-09-19 07:34 EDT (History)
0 users

See Also:


Attachments

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