Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » code assistant / imports / documentation
code assistant / imports / documentation [message #47480] Tue, 03 June 2003 15:48 Go to next message
Marcel  tör is currently offline Marcel törFriend
Messages: 73
Registered: July 2009
Member
Hi all

I'm new to eclipse. So far I've been using JBuilder for years.

Is there a way to tell the code assistant (popup with methods) to mark
deprecated methods?
A compiler warning tells me that one of the methods I'm trying to use is
deprected. In JBuilder I had a context menu that allowed me to immediately
open the JavaDoc documentation for the particular class (look up deprecation
hint). How do I do that with eclipse?
Do you know of a plugin that converts
import java.util.List;
import java.util.DateFormat;
style import statements to
import java.util.*;
?

Thanks for your help
Marcel
Re: code assistant / imports / documentation [message #47540 is a reply to message #47480] Tue, 03 June 2003 16:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: faust.acm.org

1st issue: Go to Window->preferences->compiler->problems tab. Change "usage
of deprecated API" option.

2nd issue: Organize imports under Source menu is your friend (Ctrl-Shift-O).
Would you like an unorganize imports option? ;)


Randy

"Marcel St
Re: code assistant / imports / documentation [message #47698 is a reply to message #47540] Tue, 03 June 2003 17:39 Go to previous messageGo to next message
Marcel  tör is currently offline Marcel törFriend
Messages: 73
Registered: July 2009
Member
Thanks for the reply. You didn't really answer my questions, though... ;-)

Randy Faust wrote:
> 1st issue: Go to Window->preferences->compiler->problems tab. Change
> "usage of deprecated API" option.

I don't wanna get rid of the deprecated warning - I want to improve my cody
by replacing the deprected method. eclipse is supposed to help me find the
right method.

> 2nd issue: Organize imports under Source menu is your friend
> (Ctrl-Shift-O). Would you like an unorganize imports option? ;)


I know that option. It's not about beeing organized/sorted or not. I want to
have as little import statements as possible. This can be achieved through
massive use of .* imports.

>> Hi all
>>
>> I'm new to eclipse. So far I've been using JBuilder for years.
>>
>> Is there a way to tell the code assistant (popup with methods) to
>> mark deprecated methods?
>> A compiler warning tells me that one of the methods I'm trying to
>> use is deprected. In JBuilder I had a context menu that allowed me
>> to immediately open the JavaDoc documentation for the particular
>> class (look up deprecation hint). How do I do that with eclipse?
>> Do you know of a plugin that converts
>> import java.util.List;
>> import java.util.DateFormat;
>> style import statements to
>> import java.util.*;
>> ?

Marcel
Re: code assistant / imports / documentation [message #47728 is a reply to message #47698] Tue, 03 June 2003 18:09 Go to previous messageGo to next message
Buddha Buddy is currently offline Buddha BuddyFriend
Messages: 47
Registered: July 2009
Member
Well, if you use Ctrl+Space for auto completion, deprecated methods have
a yellow warning sign by them. If you then highlight the method in your
code and press F1, you can select "Javadoc for <method>" to see the javadoc.

"massive use of .* imports" is generally considered a poor practice by
most programmers (see section titled "Import on demand is pure,
unadulterated EVIL" at http://www.javadude.com/tools/importifier/ for
some reasons), so if you want that functionality, you will probably have
to write the plugin yourself.

Marcel Stör wrote:
> Thanks for the reply. You didn't really answer my questions, though... ;-)
>
> Randy Faust wrote:
>
>>1st issue: Go to Window->preferences->compiler->problems tab. Change
>>"usage of deprecated API" option.
>
>
> I don't wanna get rid of the deprecated warning - I want to improve my cody
> by replacing the deprected method. eclipse is supposed to help me find the
> right method.
>
>
>>2nd issue: Organize imports under Source menu is your friend
>>(Ctrl-Shift-O). Would you like an unorganize imports option? ;)
>
>
>
> I know that option. It's not about beeing organized/sorted or not. I want to
> have as little import statements as possible. This can be achieved through
> massive use of .* imports.
>
>
>>>Hi all
>>>
>>>I'm new to eclipse. So far I've been using JBuilder for years.
>>>
>>>Is there a way to tell the code assistant (popup with methods) to
>>>mark deprecated methods?
>>>A compiler warning tells me that one of the methods I'm trying to
>>>use is deprected. In JBuilder I had a context menu that allowed me
>>>to immediately open the JavaDoc documentation for the particular
>>>class (look up deprecation hint). How do I do that with eclipse?
>>>Do you know of a plugin that converts
>>>import java.util.List;
>>>import java.util.DateFormat;
>>>style import statements to
>>>import java.util.*;
>>>?
>>
>
> Marcel
>
Re: code assistant / imports / documentation [message #47760 is a reply to message #47480] Tue, 03 June 2003 18:06 Go to previous messageGo to next message
Jeff Hunter is currently offline Jeff HunterFriend
Messages: 73
Registered: July 2009
Member
Marcel Stör wrote:
> Hi all
>
> I'm new to eclipse. So far I've been using JBuilder for years.
>
> Is there a way to tell the code assistant (popup with methods) to mark
> deprecated methods?

Deprecated methods are marked with an exclamation mark icon in the Code
Assist popup.

> A compiler warning tells me that one of the methods I'm trying to use is
> deprected. In JBuilder I had a context menu that allowed me to immediately
> open the JavaDoc documentation for the particular class (look up deprecation
> hint). How do I do that with eclipse?

Click on the class name and press Shift-F2 (Open External Javadoc).

> Do you know of a plugin that converts
> import java.util.List;
> import java.util.DateFormat;
> style import statements to
> import java.util.*;

Window > Preferences > Java > Organize Imports > "Number of imports
needed for .*".

Hope this helps,

Jeff
Re: code assistant / imports / documentation [message #47849 is a reply to message #47480] Tue, 03 June 2003 20:50 Go to previous messageGo to next message
Johan Compagner is currently offline Johan CompagnerFriend
Messages: 148
Registered: July 2009
Senior Member
> Do you know of a plugin that converts
> import java.util.List;
> import java.util.DateFormat;
> style import statements to
> import java.util.*;
> ?


why would you do that?

first you don't have to be bothered by the imports
because you can use the outline of eclipse that shields
the imports very nicely.

second * imports are very bad things.
You can make code with it that suddenly don't compile anymore
when upgrading to a newer JDK, this should be avoided.

johan
Re: code assistant / imports / documentation [message #48268 is a reply to message #47849] Wed, 04 June 2003 06:10 Go to previous messageGo to next message
Marcel  tör is currently offline Marcel törFriend
Messages: 73
Registered: July 2009
Member
Johan Compagner wrote:
>> Do you know of a plugin that converts
>> import java.util.List;
>> import java.util.DateFormat;
>> style import statements to
>> import java.util.*;
>> ?
>
>
> why would you do that?

Because I hate list of dozens of import statements!

> first you don't have to be bothered by the imports
> because you can use the outline of eclipse that shields
> the imports very nicely.

That sounds real nice! How can I set this up?

> second * imports are very bad things.
> You can make code with it that suddenly don't compile anymore
> when upgrading to a newer JDK, this should be avoided.

Yeah, I'm fully aware of that!

Marcel
Re: code assistant / imports / documentation [message #48471 is a reply to message #47698] Wed, 04 June 2003 09:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: faust.acm.org

I see. So you want a refactoring for replacing deprecated methods. And you'd
like obvious candidates to be offered as replacement suggestions or happen
automatically or something along those lines. Enter a bug report with an
enhancement request.


Randy

"Marcel St
Re: code assistant / imports / documentation [message #49035 is a reply to message #48268] Wed, 04 June 2003 17:28 Go to previous messageGo to next message
Martin Kersten is currently offline Martin KerstenFriend
Messages: 306
Registered: July 2009
Senior Member
> > first you don't have to be bothered by the imports
> > because you can use the outline of eclipse that shields
> > the imports very nicely.
>
> That sounds real nice! How can I set this up?

Using the Outliner to navigate your source will
make you 'jump' over import statements. There is
also a button in the toolbar which let you 'show the
source of the selected element only' (Tooltip).
So using the outliner makes you 'ignore/hide' the
import part (Its still there but you wont see it that
often).

Currently there is no way to colapse the import
part of a source, but as far as I learned, this is
part of the feature list of Eclipse 3.0 currently in
development.


Hope it was understandable ;)

Martin (Kersten)
Re: code assistant / imports / documentation [message #49182 is a reply to message #48471] Wed, 04 June 2003 20:58 Go to previous messageGo to next message
Martin Möbius is currently offline Martin MöbiusFriend
Messages: 90
Registered: July 2009
Member
AmWed, 4 Jun 2003 11:32:13 +0200, "Randy Faust" <faust@acm.org> wrote:

>I see. So you want a refactoring for replacing deprecated methods. And you'd
>like obvious candidates to be offered as replacement suggestions or happen
>automatically or something along those lines. Enter a bug report with an
>enhancement request.

How should that work? Replacements are often poorly documented.
But sth. like a migration tool with replace all calls of method abc()
for type XYZ with a call efg(), or similar, could be helpful in those
situations.

martin
Re: code assistant / imports / documentation [message #49447 is a reply to message #49182] Wed, 04 June 2003 23:10 Go to previous message
Eclipse UserFriend
Originally posted by: faust.acm.org

Agreed, it might be a dubious enhancement. But I can imagine something like
a migration tool which could take advantage of the new refactoring
particpants story to do a refactor rename based on a set of migration rules.


Randy

"Martin M
Previous Topic:Checkstyle plugins
Next Topic:Updating The Outline View
Goto Forum:
  


Current Time: Sun Jun 30 09:52:37 GMT 2024

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

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

Back to the top