Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Easy way to get API info
Easy way to get API info [message #449225] Wed, 19 January 2005 21:46 Go to next message
Bill Ewing is currently offline Bill EwingFriend
Messages: 49
Registered: July 2009
Member
Can anyone tell me how to quickly and easily set up Eclipse so I can see
doc'n on SWT API methods?

For example, I am currently working alot with gc.drawImage(). It has many
overloads, and I wonder if the one with just two int arg's is the one I
want.

(SWT people: seeing "int arg0, int arg1" is one step above useless. If it
were "int x, int y" that would be far better).

I would like to be able to select "drawImage" in my code and with one
click or keystroke, get taken into the doc'n on that method.

We've always had this in other API's, can someone describe how it works in
Eclipse?

TIA, Bill
Re: Easy way to get API info [message #449284 is a reply to message #449225] Thu, 20 January 2005 15:15 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Place the mouse in the method and either hit F2 and a dialog pops up with
the Javadoc or have the Javadoc view open and the doc will be displayed in
the view.

Also, during code assist (Ctrl+space), if you use the arrow keys to move
through the possible matches, the javaodoc for the selected item will appear
beside the code assist dialog.

However, you should be seeing int x, int y rather than int arg0, int arg1.
I experimented a bit with Eclipse. If I specify the swt jar as an external
jar in the Java Build Path, and do not specify the src or javadoc location,
I get the javadoc as I expected. As soon as I specify the source location,
I do not get the javadoc. This may be a bug in Eclipse. Is your project an
Eclipse plugin or a regular Java project? If it is a regular Java project,
how have you defined your Java build path?


"Bill Ewing" <ewing@irori.com> wrote in message
news:csmkff$q7t$1@www.eclipse.org...
> Can anyone tell me how to quickly and easily set up Eclipse so I can see
> doc'n on SWT API methods?
>
> For example, I am currently working alot with gc.drawImage(). It has many
> overloads, and I wonder if the one with just two int arg's is the one I
> want.
> (SWT people: seeing "int arg0, int arg1" is one step above useless. If it
> were "int x, int y" that would be far better).
>
> I would like to be able to select "drawImage" in my code and with one
> click or keystroke, get taken into the doc'n on that method.
>
> We've always had this in other API's, can someone describe how it works in
> Eclipse?
>
> TIA, Bill
>
Re: Easy way to get API info [message #449285 is a reply to message #449225] Thu, 20 January 2005 15:17 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Place the mouse in the method and either hit F2 and a dialog pops up with
the Javadoc or have the Javadoc view open and the doc will be displayed in
the view.

Also, during code assist (Ctrl+space), if you use the arrow keys to move
through the possible matches, the javaodoc for the selected item will appear
beside the code assist dialog.

However, you should be seeing int x, int y rather than int arg0, int arg1.
I experimented a bit with Eclipse. If I specify the swt jar as an external
jar in the Java Build Path, and do not specify the src or javadoc location,
I get the javadoc as I expected. As soon as I specify the source location,
I do not get the javadoc. This may be a bug in Eclipse. Is your project an
Eclipse plugin or a regular Java project? If it is a regular Java project,
how have you defined your Java build path?

"Bill Ewing" <ewing@irori.com> wrote in message
news:csmkff$q7t$1@www.eclipse.org...
> Can anyone tell me how to quickly and easily set up Eclipse so I can see
> doc'n on SWT API methods?
>
> For example, I am currently working alot with gc.drawImage(). It has many
> overloads, and I wonder if the one with just two int arg's is the one I
> want.
> (SWT people: seeing "int arg0, int arg1" is one step above useless. If it
> were "int x, int y" that would be far better).
>
> I would like to be able to select "drawImage" in my code and with one
> click or keystroke, get taken into the doc'n on that method.
>
> We've always had this in other API's, can someone describe how it works in
> Eclipse?
>
> TIA, Bill
>
Re: Easy way to get API info [message #449303 is a reply to message #449285] Thu, 20 January 2005 19:29 Go to previous messageGo to next message
Bill Ewing is currently offline Bill EwingFriend
Messages: 49
Registered: July 2009
Member
Hi Veronika. I briefly tried the F2 key, but it didn't show anything
beyond what code assist shows (for example, it tells me that there are two
int arg's, which I already knew).

The advice about the build path is something I will need to explore, but I
wanted to get back quickly and say thanks for the help.

(My comment to SWT/Eclipse developers is: why isn't this easy and
automatic? Yes, it's nice to have things flexible and reconfiguarable,
but imagine if this happened to you when you bought a car? You get a bag
full of parts, all ready for you to assemble, anyway you please, when all
you want to do is drive the car somewhere.)
Re: Easy way to get API info [message #449304 is a reply to message #449285] Thu, 20 January 2005 19:32 Go to previous messageGo to next message
Bill Ewing is currently offline Bill EwingFriend
Messages: 49
Registered: July 2009
Member
Veronika Irvine wrote:

> Place the mouse in the method and either hit F2 and a dialog pops up with
> the Javadoc or have the Javadoc view open and the doc will be displayed in
> the view.

> Also, during code assist (Ctrl+space), if you use the arrow keys to move
> through the possible matches, the javaodoc for the selected item will appear
> beside the code assist dialog.

> However, you should be seeing int x, int y rather than int arg0, int arg1.
> I experimented a bit with Eclipse. If I specify the swt jar as an external
> jar in the Java Build Path, and do not specify the src or javadoc location,
> I get the javadoc as I expected. As soon as I specify the source location,
> I do not get the javadoc. This may be a bug in Eclipse. Is your project an
> Eclipse plugin or a regular Java project? If it is a regular Java project,
> how have you defined your Java build path?

> "Bill Ewing" <ewing@irori.com> wrote in message
> news:csmkff$q7t$1@www.eclipse.org...
>> Can anyone tell me how to quickly and easily set up Eclipse so I can see
>> doc'n on SWT API methods?
>>
>> For example, I am currently working alot with gc.drawImage(). It has many
>> overloads, and I wonder if the one with just two int arg's is the one I
>> want.
>> (SWT people: seeing "int arg0, int arg1" is one step above useless. If it
>> were "int x, int y" that would be far better).
>>
>> I would like to be able to select "drawImage" in my code and with one
>> click or keystroke, get taken into the doc'n on that method.
>>
>> We've always had this in other API's, can someone describe how it works in
>> Eclipse?
>>
>> TIA, Bill
>>


Thanks again for the support.

My project is a regular, standalone app. It is not a plug in.

We created a new JFace/SWT project and have a JFace Application window.
Isn't it enough to tell the IDE that's what we're doing?
Re: Easy way to get API info [message #449307 is a reply to message #449303] Fri, 21 January 2005 00:56 Go to previous message
Maarten Bodewes is currently offline Maarten BodewesFriend
Messages: 44
Registered: July 2009
Member
Bill Ewing wrote:
> Hi Veronika. I briefly tried the F2 key, but it didn't show anything
> beyond what code assist shows (for example, it tells me that there are
> two int arg's, which I already knew).

Ehm, did you try and set the javadoc location for the classes you were
addressing? In .class (and therefore, .jar) files there is no
documentation, or names of parameters etc. Eclipse automatically fills
in the values it finds within the javadoc documentation.

Maarten
Previous Topic:swapping composites
Next Topic:TableViewer and ProgressBar
Goto Forum:
  


Current Time: Tue Apr 23 17:17:54 GMT 2024

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

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

Back to the top