How to add javadocs in netbeans - netbeans

I'm trying to add Javadocs to Netbeans 7.2. But I can't, because it errored with No documentation found on Javadoc intex search tab; clicking shift + F1.
I tried the following suggestion:
tools > java flatforms > javadoc(tab) > add ZIP/folder
and finally click close Java flatform manager. My docs name is "jdk-7u6-apidocs.zip".

Goto Tools --> Java PlatformsHere you can see your java platforms added. Select one and on right side goto Javadoc tab and select your zip file

Related

Eclipse f3 not opening declaration

I have Eclipse (Mars) web development tools installed on a MacBook Air. Recently, hitting f3 stopped opening the declaration.
The key mapping in Eclipse (Mars) - web development tools:
In another Eclipse install (Luna) - Android development tools, where the f3 function is working, the key mapping is:
What is wrong with the Mars version? What do I need to add to get it to work in the Java editor?
I have seen this post, but I don't have the exact same issue. Nothing happens when I hit f3.
Additionally
Other short cut keys work.
Opening the declaration with the context menu does work.
But there is no key short cut listed in the context menu.
Did this key mapping change with Mars? In my Luna verion, the context menu has the key map listed:
I've the same issue. You can use "Ctrl + Left mouse click" instead.
Make sure your function lock key is not pressed. I apparently hit mine and didn't notice given that F3 is the only function key I use.
Seems stupid but this literally happened to me and the other suggestion didn't help.
In eclipse mars goto:
window
preferences
General
Keys to open the key mapping view.
type 'open declaration' in the filter text.
copy one of the commands that are already there Copy Command
Enter 'F3' in the Binding.
In the drop down menu of the combo box of 'When' select Editing
Then whatever Language You Are Using
Source
Apply
and press Ok
I had the same issue after installing Apache Directory Studio.
Go to Window->Preferences, General->Keys. Filter for F3 and you'll see all the different ways that F3 is bound. I got it to work again by disabling F3 in the LDAP windows (i.e. deleting the binding).
Some suggestions to try:
1) Try creating a new workspace, and check if F3 works
2) Try switching to a different perspective
3) Try downloading a different eclipse release, maybe the java developers release, check that F3 works, then install whatever you need for web development.
Good luck :)
Right Click on the project -> Properties -> Project Facets -> Click on the Configuration Link -> Click on Apply Button -> Click on OK button.
The above steps should set your project as a Java project.
Looking at the comparison of the preferences that work vs what does not work, the issue is clear.
Go to: Window/preferences/General/Keys to open the key mapping view.
Type 'Open declaration' in the search box
Enter 'F3' in the Binding textbox.
If you are editing for C++, Java any language, you need to have a specific F3 binding for that language!
Example for Java source code select 'Editing Java Source' in the 'When' dropbox.
Apply and press Ok
Even I faced the same issue in windows,I was using cucumber and was unable to navigate using F3. I solved by doing the following:
Click on Help in Eclipse >
Eclipse MarketPlace
type "Natural" in search and press enter
Install "Natural 0.9" plugin
Restart Eclipse
This should work, if not working even after that, uninstall cucumber plugin in Eclipse Marketplace
You will be able to navigate from Gherkins, even after this if you are finding issues do the following:
Go to Window ->Preferences, General->Keys > Click on "Restore Defaults"
I had a similar problem today - Unable to open Declarations in Java Editor using F3 or CTRL+Left Click.
Solution :
STEP1: Selected any java file in Eclipse Explorer.
STEP2: Clicked the - sign at the top of the Eclipse explorer. This compressed view of all modules in Eclipse.
STEP3: Right click on the empty space on the Eclipse Java Explorer and chose Refresh Option (F5) .
STPE4 : Happily the navigate options like F3, F2 , CTRL + Right Click all started working.
Solution :
1. Download and install this eclipse
eclipse-jee-2019-12-R-win32-x86_64
F3 shortcut key is worked for java file and Testng.xml.
i am able see package name and class name and also it navigate methods.

org.eclipse.swt.*; The import org.eclipse cannot be resolved

I am trying to write a small program that requires the import statement import org.eclipse.swt.*;. (I'm practicing with THIS tutorial).
However, Eclipse won't compile the program and is giving me the error "The import org.eclipse cannot be resolved"
Google hasn't been such a a great friend at finding the answer this time.
This is because you haven't added the SWT library to your buildpath. Follow the steps of the tutorial:
Download SWT library. For 3.1.2 version of eclipse, SWT library is available at
http://archive.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/index.php
Look for the section titled SWT Binary and Source.
From main menu tool bar, select "File" followed by "Import". Doing so will bring up the "Import wizard" dialog.
Now select "Existing Projects into Workspace" and click on "Next" button.
Click on "Select archive file" followed by "Browse" button. Now locate the SWT archive that you downloaded in step 1.
Click the Finish button to finish importing the SWT project into your workspace.
Create new java project from File > New Java Project.
Right-click on the project and select the Properties command to open the Properties dialog.
Select the Java Build Path followed by Projects tab and click the Add button.
Select the org.eclipse.swt project and click OK to finish adding the SWT libraries to your project's classpath
Create a Maven project and add org.eclipse.swt dependency in pom.xml:
<!-- https://mvnrepository.com/artifact/org.eclipse.swt.org.eclipse.swt.win32.win32.x86_64.4.3.swt/org.eclipse.swt.win32.win32.x86_64 -->
<dependency>
<groupId>org.eclipse.swt.org.eclipse.swt.win32.win32.x86_64.4.3.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
<version>4.3</version>
</dependency>
You can find the 64bit version of the SWT library by changing the download url to this:
http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.3-201306052000/swt-4.3-win32-win32-x86_64.zip
I had the same issue, was using wrong settings in the target file.
If you are working with a target-definition make sure to use the right platform/architecture settings, see

Hadoop Documentation for Eclipse

I recently installed Hadoop and am able to run simple programs.
However I would like to view documentation for Hadoop classes within Javadoc browser in Eclipse.
Please let me know how to enable that (I am a little novice with Eclipse IDE).
Thanks.
A couple of suggestions:
If you're using maven for your dependency management, you should be able to expand out the list of Maven dependencies in your Eclipse project, right click the hadoop-core-x.x.x.jar and select Maven -> Download Javadocs
Otherwise you'll need to source the Javadocs from the $HADOOP_HOME/docs/api folder and associated with your hadoop-core-x.x.x.jar in Eclipse. In Eclipse, right click your Java project and select Build Path -> Configure Build Path. Now click the Libraries tab and locate the entry for hadoop-core-x.x.x.jar. Expand the entry to show options for Source, Javadoc etc locations and click the Javadoc location entry. Now click the Edit button to the right and enter the location as the path $HADOOP_HOME/docs/api in the Javadoc URL text box (mine is file:/opt/hadoop/hadoop-1.0.2/docs/api/)
Either way now you should be able to hover over Hadoop classes in Eclipse and the Javadoc will popup. You can also show the Javadoc window that will populate for the class you are currently viewing, or just open an internal browser window and point it at the $HADOOP_HOME/docs/api/index.html file
Another easy solution for those who want to stay updated is to edit the Javadocs path like Chris said:
"In Eclipse, right click your Java project and select Build Path -> Configure Build Path. Now click the Libraries tab and locate the entry for hadoop-core-x.x.x.jar. Expand the entry to show options for Source, Javadoc etc locations and click the Javadoc location entry. Now click the Edit button to the right and enter the location as the path"
but instead of linking it directly to the api you have stored on your hard disk, link it to http://hadoop.apache.org/docs/stable/api/

Open directory containing a source file via Eclipse

In Visual Studio, or MyEclipse, you have a button which is able to locate a source file on disk, and open the containing directory in Windows explorer.
This is useful, for example, to browse images, or to use an other tool when a conflict occurs in CVS or SVN.
What would be the way to do it in Eclipse with a free plugin, or without any plugin ?
I found it :
"In eclipse, it is common requirement to open the folder containing source file but there is no direct method to do that like in Visual studio of Microsoft."
http://shivasoft.in/blog/others/tips/locate-source-file-on-local-disc-in-eclipse-external-tool/
An actual plugin can be found at http://blog.samsonis.me/2009/02/open-explorer-plugin-for-eclipse/
And version 1.5 can be found here http://blog.samsonis.me/2011/08/openexplorer-eclipse-plugin-1-5-0/
One that I've since upgraded to & find more useful
http://basti1302.github.io/startexplorer/
I always do this:
right click on file/folder, show in..., system explorer. Done.
I guess we don't need a plugin to do that, or I am misunderstanding the question?? I am using Luna 4.4.2 on Windows 7.
On Mac you can follow this steps to add it without a plug-in:
Click the disclosure icon to the right of the External Tools icon:
Select External Tools Configuration:
The External Tools Configuration window will appear. Select Programs and then click New Launch Configuration:
This will create a new launch configuration. Enter a name of the configuration in the name field:
In the Location field enter the path to the Open Finder, "/usr/bin/open" without quotes:
In the Arguments field enter the following argument, "${container_loc}" with quotes:
Click Apply. It should look like the following:
Switch to the build tab and deselect Build before launch:
Switch to the Common tab and select the External Tools checkbox in Favorites. Click Apply again and close out of the window.
You are done. Now to use:
Select a file or folder in Eclipse Package Explorer.
Click the disclosure icon to the right of the External Tools icon:
Select the Open Containing Folder from the drop down menu:
You're file or folder should open in Finder.
PRO TIP: After you use the external tool once you can click the External Tools icon again and it will run the last used external tool. In other words, you won't need to select it from the pop up menu each time.
You can also look up the source directory by right clicking on the project, going to properties, and looking at "Location: ... "

HttpClient javadoc jar (for netbeans 7)

I am looking to add the javadoc (jar) for HttpClient to my IDE (Netbeans). Has anyone actually seen the jar file? or is there another way to add javadocs to Netbeans (or Eclipse).
To do this, the best way is to add a new library in the IDE and attach the Javadoc to this library. You can try the following steps to do this:
In the NetBeans IDE, go to "Tools > Libraries".
In the Library Manager, click at New Library and enter the data requested if the library don't exists
Select the library you want to add the Javadoc, and choose the Javadoc tab.
Click "Add ZIP/Folder" and browse to where your project Javadoc is located.
Specify the Javadoc ZIP or folder and click "Add ZIP/Folder".
Click "OK" to close the Library Manager.
More details can be found at this NetBeans Wiki page.
Regards