Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to remove unecessary "import" statements? Opposite of ctrl+shift+O ?
How to remove unecessary "import" statements? Opposite of ctrl+shift+O ? [message #648949] Sun, 16 January 2011 07:54 Go to next message
Ben Stover
Messages: 104
Registered: January 2010
Senior Member
As you know the developer can add required "import" statements into java source code
by pressing ctrl+shift+ O

Is there an opposite hotkey for removal of unnecessary "Import" statements?

Ben
Re: How to remove unecessary "import" statements? Opposite of ctrl+shift+O ? [message #648958 is a reply to message #648949] Sun, 16 January 2011 11:39 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak Azad
Messages: 545
Registered: July 2009
Senior Member
On 1/16/2011 6:24 PM, Ben wrote:
> As you know the developer can add required "import" statements into java
> source code
> by pressing ctrl+shift+ O
>
> Is there an opposite hotkey for removal of unnecessary "Import" statements?
>
> Ben
Organize Imports (Ctrl+Shift+O) does both.
Re: How to remove unecessary "import" statements? Opposite of ctrl+shift+O ? [message #649034 is a reply to message #648958] Mon, 17 January 2011 06:06 Go to previous message
Mauro Molinari is currently offline Mauro Molinari
Messages: 278
Registered: July 2009
Senior Member
Il 16/01/2011 17:39, Deepak Azad ha scritto:
> Organize Imports (Ctrl+Shift+O) does both.

Otherwise he can use Source | Clean up and set it up to remove
unnecessary imports. This can be set as a save action too: Window |
Preferences | Java | Editor | Save Actions.

Mauro.
Previous Topic:ASTRequestor to remove MethodDeclaration nodes
Next Topic:Newbie question on creating Web Service
Goto Forum:
  


Current Time: Sun Aug 31 00:36:27 EDT 2014

Powered by FUDForum. Page generated in 0.01700 seconds