Skip to main content



      Home
Home » Newcomers » Newcomers » The old SWT Javadoc question
The old SWT Javadoc question [message #70041] Thu, 26 May 2005 18:03 Go to next message
Eclipse UserFriend
It is with apologies and great reluctance we post this question. Our
research shows that it has been asked many, many times.

The Problem:
When developing Java in Eclipse, we click on the name of class, press F1
and see a popup menu. Most of the menu items are almost useless, except
the last one: "Show Javadoc for classname." We click on this and see some
terrific documentation. This works for classes made by Sun.

This does not work for SWT classes.

This question is typically answered with: "See the SWT FAQ entry:
http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform -swt-home/faq.html#wherecanIgetJavadoc"

Unfortunately, this is like someone saying "here, you can have this fish"
when the question is "how do I catch fish?"

It did help us to understand that the javadoc for SWT (and other eclipse
stuff) is located in this file (after you install eclipse):

<eclipseRoot>/plugins/org.eclipse.platform.doc.isv_3.0.0/doc.zip

But that seems to be the end of the explanation.

Upon further digging we find Bugzilla bug reports 29230 and 52894. These
seem to indicate that the high-powered folks behind eclipse months ago
were acknowledging that the lack of eclipse installing its own
documentation is a problem. More troubling still was that no one seems to
have a solution.

But reading those bug reports gave us enough clues and we developed this
procedure:

1. Unzip doc.zip into a folder. On our windows PC's we chose
c:\eclipse_docs so we wouldn't have to do this again if we deleted our
eclipse home folder, c:\eclipse, which we've done dozens of times as we
tried and discarded various plugins.

2. In your eclipse project, look in the Package Explorer and find this
line:

ECLIPSE_HOME/plugins/ ... /swt.jar

3. Right click on the above line. Select Properties.

4. Click on Javadoc location.

5. Click on Browse, navigate to C:/eclipse_doc/reference/api/

6. Now, go back to some of your source code, click on an SWT class, press
F1. Voila, you see "Show Javadoc for classname."

We clicked on another thing, pressed F1, and it didn't work. It was a
JFace class! So, we performed the above procedure on jace.jar and fixed
that. The bugzilla reports vaguely indicated that users would have to go
and discover a number of things, and we figure after the above two fixes
we still have some discovery to do.

In the same Properties windows is "Java Source attachment." Cool, this
gives us hope that when we step into an sdk class we might see its source
code. Anyone know how to fix that?

So, if all of the above is explained fully and completely somewhere, could
someone please tell us?

Right now we are looking at doing this for every computer and every
project.

If anyone creates a utility app to fix this, we will probably buy it.
Any takers?
Re: The old SWT Javadoc question [message #70160 is a reply to message #70041] Thu, 26 May 2005 19:56 Go to previous messageGo to next message
Eclipse UserFriend
> This does not work for SWT classes.

You can't be serious right?
I just press F2 and see javadoc for any SWT or whatever class I want.
And if I press F3 I see the sourcecode. It's the simplest thing ever.
It's always worked.

How did you set up your environment? I mean how is SWT referenced?
/adam
Re: The old SWT Javadoc question [message #70999 is a reply to message #70160] Fri, 27 May 2005 16:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi Adam. Thank you for taking the time to reply.

We are completely serious.

Like you, we are quite incredulous that such an excellent technology would
be like this. We sincerely hope to find out we're doing something dumb or
overlooked some instructions.

When we press F2 we get nothing useful as explained in our first post. F3
is useless too, except it leads you to a screen where you can browse for
the source. With time, we'll figure out how to get it, where to put it,
etc.

You asked: how did we installed eclipse? On several PC's many times we've
downloaded it (eclipse-SDK-3.0.1-win32.zip or eclipse-SDK-3.0.2-win32.zip)
and simply unzipped it into c:\eclipse. Running eclipse.exe runs it just
fine.

Are you saying you simply downloaded and unzipped Eclipse and the F2 and
F3 keys work? That's the Eclipse we wish we had.
Re: The old SWT Javadoc question [message #71019 is a reply to message #70999] Fri, 27 May 2005 16:59 Go to previous messageGo to next message
Eclipse UserFriend
Bill Ewing wrote:
> Hi Adam. Thank you for taking the time to reply.
>
> We are completely serious.

ok, here it is, step by step, swt development 101

1. start eclipse (i'm doing this in 3.0.2 but 3.0.1 will be the same)
2. create a java project, name it 'foo' or whatever
3. right-click, import. a dialog opens
4. select external plugins and fragments, press next
5. select next
6. left-hand side pane, select org.eclipse.swt
7. press the 'add -->' button
8. press press the 'Required plug-in -->' button.
9. now there should be 2 in the right-hand side pane
10. press finish
11. in your 'foo' project, open properties, select 'java build path'
12. select the 'projects' tab
13. there's only one thing to select: 'org.eclipse.swt' - select the
checkbox and press OK
14. now, create a class in your project
import org.eclipse.swt.widgets.Button;
public class A {
Button b;
}

15. place the caret in the 'Button' symbol
16. press F2 - you see javadoc for Button
17. press F3 - you see source of Button

hope this helps, I really do
/adam
Re: The old SWT Javadoc question [message #71079 is a reply to message #71019] Fri, 27 May 2005 17:55 Go to previous message
Eclipse UserFriend
Adam Kiezun wrote:

> Bill Ewing wrote:
>> Hi Adam. Thank you for taking the time to reply.
>>
>> We are completely serious.

> ok, here it is, step by step, swt development 101

> 1. start eclipse (i'm doing this in 3.0.2 but 3.0.1 will be the same)
> 2. create a java project, name it 'foo' or whatever
> 3. right-click, import. a dialog opens
> 4. select external plugins and fragments, press next
> 5. select next
> 6. left-hand side pane, select org.eclipse.swt
> 7. press the 'add -->' button
> 8. press press the 'Required plug-in -->' button.
> 9. now there should be 2 in the right-hand side pane
> 10. press finish
> 11. in your 'foo' project, open properties, select 'java build path'
> 12. select the 'projects' tab
> 13. there's only one thing to select: 'org.eclipse.swt' - select the
> checkbox and press OK
> 14. now, create a class in your project
> import org.eclipse.swt.widgets.Button;
> public class A {
> Button b;
> }

> 15. place the caret in the 'Button' symbol
> 16. press F2 - you see javadoc for Button
> 17. press F3 - you see source of Button

> hope this helps, I really do
> /adam

Adam, thanks much for the response. We carefully followed your
directions-- they were quite well written, thank you for taking the time,
and we appreciate that no one owes us an answer.

Net result: no change.

When we hover the mouse over Button we see a blue box that say this:
"org.eclipse.widgets.Button
Press F2 for focus"

When we press F2, the box gets bigger and "Press F2 for focus" goes away.


Similar nothingness with F3 except it does say "Source not found" and
gives you an "Attach Source" button.

All I can say is that the thing we did figure out in the first post is the
best thing we've gotten along these lines, and it uses F1.

BTW, does your F1 key work?

Again, thank you Adam, we will keep your instructions in the hopes that
they will work for us, assuming we don't go back to IntelliJ or JBuilder.

And in case you're wondering, we've built a dozen or so eclipse test apps
and one fairly large one with dozens of classes. We're using watch
expressions, setting breakpoints, writing lots of JFace gui with trees and
tables, using Refactor like crazy and in general doing what developers do.
We enjoy getting javadoc for all classes made by Sun and we did
absolutely nothing to set it up other than merely do a standard install of
a 1.4.x SDK. We just wonder why this isn't automatically there for SWT
and JFace.

And, although your instructions did not work for us, we wonder why we see
nothing like them ANYWHERE. At this point, we would be happy if they
worked even if that means doing it for each and every project.
Previous Topic:Ant problemos
Next Topic:Eclipse 3.1M7: Plugin org.eclipse.contribution.junit was unable to load class ... error
Goto Forum:
  


Current Time: Tue May 06 15:55:56 EDT 2025

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

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

Back to the top