I found no easy way to show a file opened in Eclipse (or listed in the project navigator) in Windows explore, while it is easy to be achieved in Visual Studio, see below image, you can right click on the file and choose Open Containing Folder which will open the containing folder.
Do you know there is an easy way? which is better than navigating to that file directly (cumbersome).
Here it goes, am using Eclipse Juno Service Release 1
'Show in' is only available in the 'Package Explorer' view which comes with the Java perspective. For the more generic 'Project Explorer' or 'Navigator' views (former recommended) you should use StartExplorer plugin instead.
With this plugin (as opposed to built in 'Shown in') you can also define a keyboard shortcut through Window --> Preferences --> General --> Keys. The default shortcut for StartExplorer's "Show in File Manager" feature is Ctrl + Alt + E.
Related
How do I configure IntelliJ to access offline documentation (for both Java and Android if possible) without leaving my IDE? I'm using IntelliJ IDEA 13.1. My Android application is building and running fine so my installation seems to be correct. I've examined the relevant SO posts:
How to view JDK external documentation in IntelliJ IDEA?
JDK documentation in IntelliJ IDEA on Mac OS X)
IntelliJ and the android java docs
But either the paths they recommend are not on my machine (the posts are rather dated) or else too vague. Interestingly my /Library/Java/JavaVirtualMachines folder seems to be empty whether I use Finder or Terminal. My Documentation paths tab under the File | Project Structure menu item is empty.
I should add that I'm attempting to use the Shift+F1 keyboard command when I have a keyword highlighted. That's what is recommended, but nothing happens. Below are pics of my current documentation paths in the Project Structure dialog. All done according to recommendations as far as I can see, but maybe someone can spot something.
I think configuring the path to src.zip should be enough, IntelliJ will retrieve the Javadoc from the source files. In Modules Settings, in the SDKs panel choose your current SDK, go to the Sourcepath tab and make sure there's an entry for src.zip.
On OSX it's located under
/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/src.zip
or
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/src.zip
depending on which SDK you have and how you installed it.
For the Android doc, I guess you can do the same if they provide a zip containing all the source files.
Command + ; open Project Structure
on left panel select SDKs
in Sourcepath tab click +, select your src.zip
is there any way to have Java Swing help/docs appear in Eclipse when floating over a Swing item. It would save a lot of time bringing up a Google search.
First download the corresponding docs for your jre, I have 7 so I would get this one. (You can alternatively use the online method but this way is faster and you can use it offline)
Open Eclipse and go to Window > Preferences > Java > Installed JREs. You can then select the jre you are using and click edit.
Select all the .jar items from JRE system libraries then click Javadoc Location..., Tick Javadoc in archive and then locate the .zip you downloaded, set it to Archive path and set the Path within archive textbox to docs/api.
You can then check to see if this is set up properly by clicking Validate. It should print a similar message like the one above. (Location is likely valid..)
Hover over a keyword and it should popup the docs, you can press F2 to 'focus' on the information. You can also use Shift + F2 to open it in a new tab.
I have a Java Project in Eclipse, and a Java Dynamic Web Project in Eclipse. In the former, all the jar files are shown individually under the top-level project folder. In the latter, the jar files are under a Libraries folder and the navigation is more convenient.
Is it possible to organize them in the same way in the Java Project also? If so, how?
Update: It is the Project Explorer View. For the Java Project, I see: "my_project_name" with the arrow expanded to point downwards, then I see: "package_icon src/main/java" and below that "package_icon src/main/resources" and then 20 jar files one below the other: "jar_icon activation-1.1.jar", ...
For the Java Dynamic Web Project I see: "my_project_name" as above, then I see: "JAX-WS Web Services" (unexpanded), then "Deployment Descriptor" (unexpanded), then "Java Resources" which I have expandeded, so I see the components of it below, of which the first is: "package_icon src/main/java", then below it, "package_icon src/main/resources", then below it "libraries_icon Libraries" instead of 20 jars! I have the option of expanding Libraries if I really need to see the 20 jars.
The only option I found to make things prettier in Eclipse Kepler is to:
In the Project Explorer window there is a down arrow in the upper right corner. Select that and then Customize View.
Select 'Libraries from external' and then OK.
Kind of cheesy...
EDIT: Of course I had to go and do some more digging...and it looks like I'll have to try this and see how it works.
Similar to M Miller's answer (but for Juno), click Show 'Referenced Libraries' Node in the dropdown of the Package Explorer window:
I'm using:
Eclipse IDE for Java Developers
Version: Juno Release
Build id: 20120614-1722
I noticed this "feature" on Eclipse Juno (latest version), when you have a jar file added to the build path it is not shown as a single file on the project.
Try removing one of the jars from the build path to see if it shows up again.
I couldn't find how to turn it off though.
BTW... the project layout for your "Java Project" is more akin to a "Maven Project", which is a bit more powerful.
You should change into the Package Explorer by Window > show View. It will display all the referenced libraries in a Referenced Libraries folder.
I have recently got a new computer and I have put Eclipse Helios on there. Before, on my old computer, when I used the control-assist (Ctrl + Space) and highlighted the suggested methods, the Javadoc for that method used to appear at the side of the control assist pop up window with the method description and parameters etc...
However, on my new computer this Javadoc doesn't appear and only the method suggestions appear - but even the arguments for the methods aren't named (they're just called arg0, arg1 and so on). The only thing I can think of that is different on the new install is ZoneAlarm but as far as I can see I have allowed eclipse through the firewall; unless it's something to do with Java itself.
This feature is really useful to me so any advice on how to resolve this issue would be greatly appreciated. Thanks in advance.
Eclipse is using a JRE instead of a JDK as the default Java.
Download and install a JDK.
In Eclipse Preferences, Java -> Installed JRE's. Use "Add" or "Search" to locate and add the JDK just installed.
Move the check mark indicating the default Java to the newly found JDK.
Allow the workspace to rebuild.
You need to press F3 on the Class or Method name you want to see javadoc for. Then in the editor it's source will open or if you don't have source attached, you'll have screen with bytecode saying that no sources attached. Then you need to open package view, by default it's on the left side. On the top of it there is an icon with two arrows, if it's not pressed, press it. It will show source you've opened in the package view, then you need to find jar file containing your source by scrolling up if you already don't stand on it.
Now press right mouse button on that jar, you'll see properties window. Select javadoc, then you need to select location of the javadoc. You can provide a URL to an online javadoc. The URL you will be pointing to must provide a page named 'index.html' or similar or Eclipse won't allow you to use that URL. Also you can download javadoc locally and then select the location of that javadoc archive. If you need the javadoc for java SE libraries, you can find it in your jdk installation directory in src.zip folder. Hope it'll help.
Did you specify the javadoc location of your library?
Window -> Preferences -> Java -> Installed JREs -> Select your JRE -> Edit -> Select .jar file(s) (rt.jar) -> Javadoc Location
I am trying to follow instructions in Eclipse to create my first Hello World SWT application. I have problems on the first step. In the instructions the following is written:
Open your Web browser to
http://eclipse.org/downloads/,
navigate to the Eclipse Platform
project section, select the latest
release build, and find the SWT Binary
and Source download.
Well I am smart enough to "open my Web browser to http://eclipse.org/downloads/". This I can do. But I am not smart enough to "navigate to the Eclipse Platform project section, select the latest release build, and find the SWT Binary and Source download".
Can anybody help me to find this "Eclipse Platform project section"? Should I click on "Projects"? If it is the case, what should I click next?
Thank you in advance.
Go here, http://archive.eclipse.org/eclipse/downloads/drops/R-2.1-200303272130/index.php and scroll all the way to the bottom to see SWT Binary and Source
Which may be a bit outdated, so go to http://www.eclipse.org/swt/ and under Development section, select your operating system.
From http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/samples/org.eclipse.swt.examples/doc-html/swt_manual_setup.html :
Adding SWT to your workspace
Download SWT for standalone applications. A standalone version of SWT is available on the same download page as the Eclipse SDK. Look for the section titled SWT Binary and Source. Do not extract the archive file, just save it to disk.
Select Import... from the File menu.
Select Existing Projects into Workspace and click on the Next button.
Select Select archive file: and use the Browse button to locate the SWT standalone archive you have previously downloaded.
Click on the Finish button.
This worked for me under Ubuntu on my netbook; I've been fighting for a few days to configure Eclipse and I'm getting closer to done.