Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Where is source and JavaDoc for SWT & JFace
Where is source and JavaDoc for SWT & JFace [message #458093] Sat, 09 July 2005 22:29 Go to next message
Bill Ewing is currently offline Bill EwingFriend
Messages: 49
Registered: July 2009
Member
Could someone explain how/where to find the JavaDoc and source for SWT and
JFace?

Once we find it, we expect that we'll be able to right click on their jars
and set the JavaDoc location. We used to do that with eclipse 3.0.x once
we figured out where it was buried in under the plugins folder, which is
now restructured. We couldn't find mention of this in "New and
Noteworthy," which is a long list of cool stuff (but would sure benefit
from a table of contents at the beginning).

Bottom line, what we want to do is this:

1. In source editor, click on a SWT or JFace class name.
2. Hit F1.
3. See a list that includes "Show Javadoc for classname"

BTW, the above has always worked for us with every class from Sun. We
simply install their JDK (1.4 or 5.0) and it simply works in Eclipse. No
wonder NetBeans people are asking questions like this.

Eclipse team: would it be asking too much for that to also work
straightaway for SWT and JFace?
Re: Where is source and JavaDoc for SWT & JFace [message #458095 is a reply to message #458093] Sun, 10 July 2005 01:21 Go to previous messageGo to next message
SK is currently offline SKFriend
Messages: 31
Registered: July 2009
Member
http://download.eclipse.org/eclipse/downloads/drops/R-3.1-20 0506271435/download.php?dropFile=eclipse-sourceBuild-srcIncl uded-3.1.zip


"Bill" <ewing@irori.com> wrote in message
news:8a9abaad0d398150be712c6199ebd048$1@www.eclipse.org...
> Could someone explain how/where to find the JavaDoc and source for SWT and
> JFace?
>
> Once we find it, we expect that we'll be able to right click on their jars
> and set the JavaDoc location. We used to do that with eclipse 3.0.x once
> we figured out where it was buried in under the plugins folder, which is
> now restructured. We couldn't find mention of this in "New and
> Noteworthy," which is a long list of cool stuff (but would sure benefit
> from a table of contents at the beginning).
>
> Bottom line, what we want to do is this:
>
> 1. In source editor, click on a SWT or JFace class name.
> 2. Hit F1.
> 3. See a list that includes "Show Javadoc for classname"
>
> BTW, the above has always worked for us with every class from Sun. We
> simply install their JDK (1.4 or 5.0) and it simply works in Eclipse. No
> wonder NetBeans people are asking questions like this.
>
> Eclipse team: would it be asking too much for that to also work
> straightaway for SWT and JFace?
>
>
Re: Where is source and JavaDoc for SWT & JFace [message #458096 is a reply to message #458093] Sun, 10 July 2005 01:25 Go to previous messageGo to next message
Billy Biggs is currently offline Billy BiggsFriend
Messages: 94
Registered: July 2009
Member
Bill wrote:
> Could someone explain how/where to find the JavaDoc and source for SWT
> and JFace?
>
> Once we find it, we expect that we'll be able to right click on their
> jars and set the JavaDoc location. We used to do that with eclipse
> 3.0.x once we figured out where it was buried in under the plugins
> folder, which is now restructured.

You should not need to manually attach a source location. If I were
to guess, I bet you are writing a Java project, and then adding the SWT
and JFace jar files as external jar dependencies. Am I correct?

For writing a standalone SWT application, I recommend importing SWT
into your workspace, either from the standalone SWT .zip file (which you
can now import using the "Existing Projects into Workspace" wizard) or
using the "External Plug-ins and Fragments" wizard. Either method will
give you code assist with documentation, and the Javadoc will appear
correctly in the Javadoc view.

If you really don't want to have SWT and JFace imported in your
workspace, you can also create a Plug-In project, but just write a Java
application within it. This will let Eclipse's plug-in architecture
take care of finding the jar and source, all you need to do is make your
plug-in depend on SWT and JFace.

> Bottom line, what we want to do is this:
>
> 1. In source editor, click on a SWT or JFace class name.
> 2. Hit F1.
> 3. See a list that includes "Show Javadoc for classname"

This feature of the Help view is really interesting, I have not seen
it before. The Javadoc for SWT is included in the API reference in the
Help > Help Conents window, but I do not know where it is stored, nor
how to hook it up. Clearly, if there is a way we can ship the Javadoc
with the standalone SWT download such that it "just works", I'd be very
much in favour of that.

I filed the following two bugs:

http://bugs.eclipse.org/bugs/show_bug.cgi?id=103261
http://bugs.eclipse.org/bugs/show_bug.cgi?id=103262

Hope this helps,
-Billy
Re: Where is source and JavaDoc for SWT & JFace [message #458620 is a reply to message #458096] Sat, 16 July 2005 22:45 Go to previous message
Bill is currently offline BillFriend
Messages: 8
Registered: July 2009
Junior Member
Billy Biggs wrote:

> Bill wrote:
>> Could someone explain how/where to find the JavaDoc and source for SWT
>> and JFace?
>>
>> Once we find it, we expect that we'll be able to right click on their
>> jars and set the JavaDoc location. We used to do that with eclipse
>> 3.0.x once we figured out where it was buried in under the plugins
>> folder, which is now restructured.

> You should not need to manually attach a source location. If I were
> to guess, I bet you are writing a Java project, and then adding the SWT
> and JFace jar files as external jar dependencies. Am I correct?

> For writing a standalone SWT application, I recommend importing SWT
> into your workspace, either from the standalone SWT .zip file (which you
> can now import using the "Existing Projects into Workspace" wizard) or
> using the "External Plug-ins and Fragments" wizard. Either method will
> give you code assist with documentation, and the Javadoc will appear
> correctly in the Javadoc view.

> If you really don't want to have SWT and JFace imported in your
> workspace, you can also create a Plug-In project, but just write a Java
> application within it. This will let Eclipse's plug-in architecture
> take care of finding the jar and source, all you need to do is make your
> plug-in depend on SWT and JFace.

>> Bottom line, what we want to do is this:
>>
>> 1. In source editor, click on a SWT or JFace class name.
>> 2. Hit F1.
>> 3. See a list that includes "Show Javadoc for classname"

> This feature of the Help view is really interesting, I have not seen
> it before. The Javadoc for SWT is included in the API reference in the
> Help > Help Conents window, but I do not know where it is stored, nor
> how to hook it up. Clearly, if there is a way we can ship the Javadoc
> with the standalone SWT download such that it "just works", I'd be very
> much in favour of that.

> I filed the following two bugs:

> http://bugs.eclipse.org/bugs/show_bug.cgi?id=103261
> http://bugs.eclipse.org/bugs/show_bug.cgi?id=103262

> Hope this helps,
> -Billy

Thank you very much, Billy, for the energy and thoughtfulness of your
reply. We will study your response.

We are using the excellent GUI designer available at SWT-Designer.com.
Thus, it kicks things off for us, but we do want to use the F1 key as
described above.

What we figured out is shown below.

Sadly, I am left wondering:
* why I, a newbie, can't find answers to questions like this in the FAQ
and numerous eclipse books we've purchased

* are other developers actually happy not having this (F1 key feature)?

* why does this had to be so hard to figure out and has to done over and
over for each and every project -- something no other IDE maker in the
world wouldn't dream of not doing this for you?

I can't believe any of the above are true, since everything about eclipse
is so excellent.

---------------------------

Our procedure (based on installing eclispe into c:\eclipse):

1. Create folder: c:\eclipse_doc. Making this independent from c:\eclipse
avoids having to redo these steps if the main eclipse folder is ever
deleted which we've done plenty of times to fix problems (that might be
our own fault).

2. Unzip the following file into the above folder.
c:\eclipse\plugins\org.eclipse.platform.doc.isv_3.1.0\doc.zi p

3. In the Package Explorer window, find the SWT and JFace library jar
files. Starting with Eclipse 3.1, swt.jar has been renamed to the file
highlighted in the screenshot below. JFace, which is not machine
dependent, is the file right shown below it.
==(screenshots can't be shown here, sorry)==

4. For each of the above jar files:
· Right click, select Properties.
· Select Java Build Path.
· Click on Browse.
· Navigate to C:/eclipse_doc/reference/api/
· Click on OK.
==(screenshots can't be shown here, sorry)==

5. Click on Validate. Success looks like the following.
==(screenshots can't be shown here, sorry)==

6. Now do the real test. In the source editor, click on an SWT control
class name such as Combo (you can simply declare one or make one visually
using the designer). Press F1. A window should appear with Javadoc for
'org.eclipse.swt.widgets.Combo'
==(screenshots can't be shown here, sorry)==

7. Don't forget to do the same for the JFace library as well. Test this
with a JFace class such as ApplicationWindow.
Previous Topic:SWT and JMF
Next Topic:MVC question
Goto Forum:
  


Current Time: Thu Oct 22 21:24:46 GMT 2020

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

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

Back to the top