hover issue with MTJ [message #30630] |
Thu, 28 May 2009 14:52  |
Eclipse User |
|
|
|
My Java Eclipse environment supports "hover" for my local classes as well
as system classes (like java.lang.System).
The same setup, with MTJ (0.9.1) fails when I attempt to hover over
something like java.microedition.lcdui.Display. The message is: "Note:
This element neither has attached source nor attached javadoc and hence no
javadoc could be found.
Attempts to view local classes that I have defined still work.
Window > Preferences > Java ME > Device Management
Installed SDK: Sun Java(TM) Wireless Toolkit 2.5.2_01 for CLDC
edit: Sun Java... DefaultColorPhone
select Library Pane:
FILE PATH APIs Javadoc
cldcapi11.jar /usr/local/WTK2.5.2 CLDC-1.1 (no javadoc listed...)
...etc for all other Wireless Toolkit jars...
I am running:
Debian Linux Lenny
Eclipse JEE - eclipse-jee-ganymede-SR2-linux-gtk.tar.gz
Sun Wireless Toolkit -
sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh
MTJ - dsdp-mtj-SDK-incubation-0.9.1.zip
It looks like the javadocs are in the Sun Wireless toolkit under
/usr/local/WTK2.5.2/docs/api. Do I just need to add these to the jars
and could I have some more detail on how to do that?
Thanks...gmc
|
|
|
|
|
Re: hover issue with MTJ [message #30772 is a reply to message #30701] |
Fri, 29 May 2009 09:56   |
Eclipse User |
|
|
|
Diego,
It seems like the problem I'm having has to do with importing the device
SDKs into the MTJ environment. I've been trying to do many experiments.
I'll take you through the scenarios.
I've been trying different Eclipse bundles: Eclipse Classic, Eclipse JEE,
Eclipse for Java, and Motodev Studio for JavaME 2.0. I have the Sun JDK
1.6u13 installed. To this, I add the MTJ SDK 0.9.1 (except in the case of
the Motodev Studio, since MTJ is bundled there). All of these installs
are into a clean eclipse directory.
I then remove my home workspace directory and start Eclipse (or Motodev
studio) fresh and reconfigure the minimum amount options that I need. To
reproduce it I then do this: (on Debian Linux - Lenny):
1) Import Device SDK
Window > Preferences > Java ME > Device Management > Import ...
- I was using Sun Java(TM) Wireless Toolkit 2.5.2 primarily
- I also tried MOTODEV SDK for Java ME 2.0
-- select a default phone
2) Create a Jave ME MIDlet project
- create a Java ME MIDlet
--add the following line to the class: "String str = "string"
- I try to hover over "String". This doesn't work.
3) I then go back to the device editor and add the path for the
javadoc location for the jar which contains java.lang. In the case of the
Sun WTK2.5.2, this is: - midpapi21.jar
- add file:/usr/local/WTK2.5/docs/api/midp/ as the javadoc location.
-- hit validate: "Location is likely valid."
-- hit OK - does launch the MIDP javadoc page in my browser.
- save; back to base eclipse perspective
- Try to hover over "String".
-- Hover Message: "Note: This element neither has attached source nor
attached javadoc and hence no javadoc could be found."
4) I attempt to File > Restart. Just in case. The eclipse window
closes. The "save progress window" flashes up for a second. Then I get a
log file in my home directory (hs_err_pid3266.log), and Eclipse does not
restart.
5) Re-launch Eclipse.
- Hover still gives same "no javadoc note" above.
- device editor: Libraries: javadoc entry is still there, looks ok.
Other notes:
1) If I create a basic "Java project" and "Java main class". Hovering in
that project works for String. I know these are setup differently than
the Java ME environment, but I just wanted to be sure it worked there.
2) I did see the hover work correctly on JEE, with WTK2.5.2 AND
Motodev SDK once before a restart. After restart (and error log file) it
no longer worked. I have not been able to reproduce that "success". It
was definitely showing the an object from "javax.microedition...", so I
know can work! This may be an initialization sequence issue, but that is
only a guess.
3) The commonality with the generation of the error log files, seems
to be the MTJ import of the device SDK (maybe?). I've used 4 different
eclipse platforms and can generate these failures on all of them.
Without the MTJ, no failures and the hover works OK in the base Jave
environment.
Next Steps:
a) What environment would be best to use to match what you guys are
developing on? (Eclipse Classic, Eclipse for Java, JEE, ??)?
b) Which device SDK would you prefer I load? I'm not fussy. (not yet at
least!)
c) Since the Motodev Studio is a bundle and has the problem, maybe this is
a good place to start?
Thanks...gmc
|
|
|
|
|
|
Re: hover issue with MTJ [message #573588 is a reply to message #30666] |
Thu, 28 May 2009 18:56  |
Eclipse User |
|
|
|
Diego,
Thanks for your response. I didn't know about the help file you
referenced, so I took the time to go through it before responding.
I attempted to enable the hover over a String type. I added
file:/usr/local/WTK2.5.2/docs/api/midp/ to the midpapi21.jar as the
Javadoc entry. The Validate button says it is likely to be valid, and it
does open up in the browser properly. So I pointed to the correct file.
I then saved everything and did a "restart" from the File menu. The
restart does not happen and I'm left with an error log file in my home
directory.
If I then take out the Javadoc reference. Save and attempt to
restart, it restarts again without a problem, and no new error log files.
It is repeatable.
Where to we go from here?
...gerry
|
|
|
Re: hover issue with MTJ [message #573658 is a reply to message #30701] |
Fri, 29 May 2009 09:56  |
Eclipse User |
|
|
|
Diego,
It seems like the problem I'm having has to do with importing the device
SDKs into the MTJ environment. I've been trying to do many experiments.
I'll take you through the scenarios.
I've been trying different Eclipse bundles: Eclipse Classic, Eclipse JEE,
Eclipse for Java, and Motodev Studio for JavaME 2.0. I have the Sun JDK
1.6u13 installed. To this, I add the MTJ SDK 0.9.1 (except in the case of
the Motodev Studio, since MTJ is bundled there). All of these installs
are into a clean eclipse directory.
I then remove my home workspace directory and start Eclipse (or Motodev
studio) fresh and reconfigure the minimum amount options that I need. To
reproduce it I then do this: (on Debian Linux - Lenny):
1) Import Device SDK
Window > Preferences > Java ME > Device Management > Import ...
- I was using Sun Java(TM) Wireless Toolkit 2.5.2 primarily
- I also tried MOTODEV SDK for Java ME 2.0
-- select a default phone
2) Create a Jave ME MIDlet project
- create a Java ME MIDlet
--add the following line to the class: "String str = "string"
- I try to hover over "String". This doesn't work.
3) I then go back to the device editor and add the path for the
javadoc location for the jar which contains java.lang. In the case of the
Sun WTK2.5.2, this is: - midpapi21.jar
- add file:/usr/local/WTK2.5/docs/api/midp/ as the javadoc location.
-- hit validate: "Location is likely valid."
-- hit OK - does launch the MIDP javadoc page in my browser.
- save; back to base eclipse perspective
- Try to hover over "String".
-- Hover Message: "Note: This element neither has attached source nor
attached javadoc and hence no javadoc could be found."
4) I attempt to File > Restart. Just in case. The eclipse window
closes. The "save progress window" flashes up for a second. Then I get a
log file in my home directory (hs_err_pid3266.log), and Eclipse does not
restart.
5) Re-launch Eclipse.
- Hover still gives same "no javadoc note" above.
- device editor: Libraries: javadoc entry is still there, looks ok.
Other notes:
1) If I create a basic "Java project" and "Java main class". Hovering in
that project works for String. I know these are setup differently than
the Java ME environment, but I just wanted to be sure it worked there.
2) I did see the hover work correctly on JEE, with WTK2.5.2 AND
Motodev SDK once before a restart. After restart (and error log file) it
no longer worked. I have not been able to reproduce that "success". It
was definitely showing the an object from "javax.microedition...", so I
know can work! This may be an initialization sequence issue, but that is
only a guess.
3) The commonality with the generation of the error log files, seems
to be the MTJ import of the device SDK (maybe?). I've used 4 different
eclipse platforms and can generate these failures on all of them.
Without the MTJ, no failures and the hover works OK in the base Jave
environment.
Next Steps:
a) What environment would be best to use to match what you guys are
developing on? (Eclipse Classic, Eclipse for Java, JEE, ??)?
b) Which device SDK would you prefer I load? I'm not fussy. (not yet at
least!)
c) Since the Motodev Studio is a bundle and has the problem, maybe this is
a good place to start?
Thanks...gmc
|
|
|
Re: hover issue with MTJ [message #573805 is a reply to message #30772] |
Sun, 31 May 2009 20:22  |
Eclipse User |
|
|
|
Diego,
Perhaps what I'm describing is working as "normal"? Here is (finally)
an explanation for the hover working "sometimes". That was a testing
error.
It seems that for all classes in java.io, java.lang, and java.io hover
does NOT work. I was (almost) always testing "String".
If I try to hover over javax.microedition.*, I get hover data. So
Alert, Image, Textbox, List, etc work.
|
|
|
|
Powered by
FUDForum. Page generated in 0.31998 seconds