jcpalmer
|
Posted: May 15, 2009 17:25 by jcpalmer
|
|
When source jars are added to either Netbeans platforms or Netbeans Libraries, they allow for control-click access to the source of that platforms/libraries Class or Method. If you do not know what I am talking about, hold down the control key and hover your mouse over something like "String" in some source, making sure the Java src.zip from the JDK is added to your platform . It turns blue & underlined. Click. They also enhance code completion, by including the in-line javadoc from the source. The plug-in is a platform, and it does not provide a user interface to add source jars/folders, but when you add android.jar as a Netbeans library & add the library to your project, it works. This would probably be a good enhancement for the plug-in. The trick anyway is getting the source, since it is not part of the SDK. Eclipse must not support instant access to JDK source (poor bastards), or you would think it would be there. To get Android source goto: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=summary On the page there is a section called tags, with a line for each significant milestone. Find the milestone you want and click it's "tag" link. From there click the "tree" link, and a "snapshot" link will be added just below. Clicking that will have your browser prompting your for where to save a tar.gz file. From there I will leave it up to you how to get into Jar or folder form (I used my mac to unpack it). |
Android Source Code Integration
Replies: 1 - Last Post: February 08, 2011 22:11
by: Forage
by: Forage
showing 1 - 2 of 2
Forage
|
Posted: February 08, 2011 22:11 by Forage
|
|
It has been a while since you started this discussion, but would you mind elaborating on the part of adding the android.jar file with its sources as a library? I gave it a go, but Netbeans doesn't seem to pick up on the sources. Steps taken: - Create a new library - add just the android.jar file on the classpath tab - add the zip file containing the sources [1] on the sources tab - add the newly created library to the project libraries (context menu - add library) The project libraries now list the new library as well as the platform. Have both containing the android.jar file might be the cause of the problem but I can't seem to find a way to remove the platform. What did I overlook to have Netbeans pick up on the sources? [1] http://mobilebytes.wordpress.com/2010/06/30/classes-source-for-eclipse/ |
Replies: 1 - Last Post: February 08, 2011 22:11
by: Forage
by: Forage






