Skip to main content



      Home
Home » Newcomers » Newcomers » Unnecessary imports
Unnecessary imports [message #98186] Mon, 29 August 2005 07:08 Go to next message
Eclipse UserFriend
Originally posted by: fredrik144.home.se

Hi

After I installed Eclipse it complained about classes that
I had import but not used in the code. But now, it doesn't
complain anymore, so I need check this manually.

Is there any adjustment in Eclipse, which you can set to make
Eclipse complaining for unnecessary packages?
Re: Unnecessary imports [message #98200 is a reply to message #98186] Mon, 29 August 2005 07:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Fredrik wrote:

> Hi
>
> After I installed Eclipse it complained about classes that
> I had import but not used in the code. But now, it doesn't
> complain anymore, so I need check this manually.
>
> Is there any adjustment in Eclipse, which you can set to make
> Eclipse complaining for unnecessary packages?

Go to the Java > Compiler > Errors/Warnings preference page and there
look at the 'Unnecessary code' section.

Dani

>
>
>
Re: Unnecessary imports [message #98214 is a reply to message #98186] Mon, 29 August 2005 07:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: plankton.softwitch.net

If you don't have special purpose. Do not use unnecessary pacakages. At
any time, by pressing Ctrl + Shift + O, you can organize importing
without any annoying.

Fredrik wrote:
> Hi
>
> After I installed Eclipse it complained about classes that
> I had import but not used in the code. But now, it doesn't
> complain anymore, so I need check this manually.
>
> Is there any adjustment in Eclipse, which you can set to make
> Eclipse complaining for unnecessary packages?
>
>
>
Re: Unnecessary imports [message #98229 is a reply to message #98200] Mon, 29 August 2005 08:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fredrik144.home.se

I looked at the 'Unnecessary code' section in Java > Compiler >
Errors/Warnings. I set a warning for the use of unnecessary imports
but my unnecessary imports are still not hightlighted by the editor.
When I first started using Eclipse they were highlighted without
any compalation of code.

Since I'm compiling my code with Ant from the command window, I'm using
Eclipse just as an editor, not for compiling. And I want my unnecessary
imports highlighted by the editor, as it did when I started using Eclipse.
Maybe I've unconsciously switched any setting in Eclipse which have
disabled the highlighting of unnecessary imports by the editor?
Re: Unnecessary imports [message #98259 is a reply to message #98229] Mon, 29 August 2005 10:08 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Fredrik wrote:

> I looked at the 'Unnecessary code' section in Java > Compiler >
> Errors/Warnings. I set a warning for the use of unnecessary imports
> but my unnecessary imports are still not hightlighted by the editor.
> When I first started using Eclipse they were highlighted without any
> compalation of code.

Problems might be:
- your build class path is not setup correctly
- you changed the rendering of errors and warnings (General > Editors >
Text Editors > Annotations)
- you disabled to report problems as you type (Java > Editor)

Dani

>
> Since I'm compiling my code with Ant from the command window, I'm
> using Eclipse just as an editor, not for compiling. And I want my
> unnecessary
> imports highlighted by the editor, as it did when I started using
> Eclipse.
> Maybe I've unconsciously switched any setting in Eclipse which have
> disabled the highlighting of unnecessary imports by the editor?
>
Previous Topic:class interaction documentation
Next Topic:changing non-modifiable access restrictions
Goto Forum:
  


Current Time: Sat May 10 15:50:29 EDT 2025

Powered by FUDForum. Page generated in 0.11707 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top