Java's equivalent to php.net? - java

Where can I find useful resources to Java.
all Java functions and syntax explaining (like php.net)
mac widgets with all functions gathered (like php function reference)
Would be great if you had links to very good resources/tutorials to share.

you should start with the Javadoc

JavaDoc in CHM format for easily searching
http://www.allimant.org/javadoc/index.php
Javadoc is an invaluable reference as already said
I think you should just get Eclipse or your favorite IDE and add the Javadoc to the build path of the jar
EDIT:
Window\Preferences\Java\Installed JREs
Select the JRE
Press Edit
Javadoc URL: point to the URL
Shift + F2 should take you to the appropriate function definition
, and i must say it is very productive =]

Just use the auto-completion feature of your editor.
In Eclipse: Write "[name of your object].", Press [CRTL]+[SPACE] and then read the javadoc of the suggested functions/methods.

Java API Documentation explains all classes and methods.
Java2s.com has very good examples for Java

Related

Extension to generate Javadoc file in Visual Code

I want to create a documentation file of my code. I've added the Javadoc comment in every public method I have. If I use other IDE, probably there is a menu to generate it, but unfortunately I use Visual Code.
Is there a way to generate Javadoc file in Visual Code? I only find one extension, with 2 thousands downloads but its not working. The name is Javadoc-Generator
I have tried to run using javadoc command in terminal, but it is not recognized. Do I need to install additional file?
Well firstly thanks for the good question and now i'm going to try to help you with your problem. I searched for an plug in of Javadoc for Visual Studio which is Javadoc Tools with this plug in you can create coments just selecting where you want to make the comments, also you can export your comments and the best thing it's free. I tried this for one of my programmes and it works for me. Definitly i recommend you this, try it and i hope i helped you with your problem.
Selecting where i want to create the comments
Final result
For Javadoc-Generator. In the documentation state "This generator will use the Javadoc located in the JDK referenced in your JAVA_HOME." Make sure you have JAVA_HOME set in your Environment Variables.

What does Javadoc do in Eclipse?

When you start Eclipse up you have a few programs (not sure what to call them) at the bottom like Javadoc, Console, Declaration etc.
I want to know what Javadoc does because I don't really understand how it works.
I have searched online but it does not make much sense to me as I am a beginner.
Javadoc is a documentation tool which defines a standard format for such comments, and which can generate HTML files to view the documentation from a web broswer. You can generate JavaDoc in Eclipse or NetBeans IDE in order to read it via your browser.
Check the official documentation of Oracle: Java SE Overview
As others have written: javadoc is the standard way of putting documentation into your source code (for later processing).
That javadoc view within eclipse simply displays the javadoc of the element that you currently select within the Java editor.
So: just put some javadoc before your class and before some methods and experiment with what that view is showing you.
The JavaDoc is a tool to create a documentation. In combination with the Java annotations and Java Doc-Comments you can create your own documentation for your code.
Java Doc-Comments:
https://en.wikipedia.org/wiki/Javadoc
The Java-Doc Tool in Eclipse can create a good looking documentation like the normal Java utils doc. This -> https://docs.oracle.com/javase/7/docs/api/

Translate English to some other Language in RAD or Eclipse

I have written comments in English in my Java files but now my client wants it in Spanish, So is there any tool/Plugin available in RAD or ECLIPSE IDE to convert all the comments in other language. I am using google translator to convert comments manually.
I'm not aware of any plugin like that. First, I would make sure the client really really wants this. Doing an automatic translate of highly technical text will not give a very good quality. I question if they will be usable at all, do a test translate of a couple of comments first to get approval.
If they really want something that is usable someone with language and technical skill would have to manually translate everything, which would take time/money.
But, if I had to do it, I would take the idea from this answer to automatically launch a web browser from Eclipse, and use the URL to google translate, https://translate.google.se/#en/es/${selected_text}, should work.
If the codebase is large and the comments can be easily found, such as a javadoc, I would write some script to automatically handle this. Google translate has an API you can use. See REST API doc
Every now and then a developer has to work on a code base that is in a language that is unknown to him. In this case, he would need to copy variable, class, method names to Google Translate to see what they actually mean.
The Source Code Translation in Eclipse tries to help such developers, by providing a popup with the translated words, when hovering the mouse over them. The plugin is able to handle compound words or phrases that use camelCase or underscore "_" as separation methods.
For the plugin to work, a properties file containing the word to be translated, and the translation needs to be created and added from the Preferences section of the plugin.
Add this URL to your Eclipse Installation to reach this solution's update site.
https://github.com/Testehan/TranslationPluginInstall/raw/master
In External Tools Configurations
Location : ${system_path:cmd.exe}
Arguments : /C start "" "https://translate.google.com/#en/fr/${selected_text}"

adding links in javadoc to source files on google code

I work on an open source project that is hosted on google code. I'm using ant to create javadocs and I'd like to have links to the source files. I understand I can use the linksource flag to javadoc to include the source in the resulting html, but this isn't what I really want. What I'd prefer is to provide a link to the source file in google code's svn browser. I suppose I could do a simple filter prior to running javadoc, but it'd be even better if I could figure a way to do this right in javadoc. Ideally, I could have a property in my ant properties file like
base.src.url=http://code.google.com/p/myproject/source/browse/branches/1.2
and the javadoc command would add a line to each class's html file:
see source on google code
Any ideas?
The standard doclet offers no such option, as far as I know. So it looks you either have to
use an alternative doclet,
patch the standard doclet,
preprocess the Java files or
postprocess the produced HTML.
A feature request to include this in the standard doclet might also be a good idea.

Eclipse commands

What is the difference between Ctrl + Shift + R and Ctrl + Shift + T?
Do we have a blog with all eclipse tips/shortcuts?
Ctrl-Shift-R: Find a resource, which can include XML files, Ant scripts etc.
Ctrl-Shift-T: Find a type, regardless of the filename. (This can be handy if you're looking for a nested type, or basically if you don't want to see anything other than types...)
For Eclipse shortcuts, there are lots of Eclipse keyboard cheat sheets. From the search, I like this PDF, this shorter list, and this list with more explanations.
Ctrl+shift+R is for Open Resource, it
searches for all types of files in
your projects.
Ctrl+shift+T is for
Open Type, it looks for Java classes
and interfaces.
A great feature of the Open Type dialog is that you can search for say DataInputStream by typing DIS.
T : open a type (Java artifact)
R : open any file (any resource)
Ctrl-Shift-T will find Java types including those imported in JAR files without source (e.g. Java standard API)
Ctrl-Shift-R will only find Java types present as source code, but will also find other kinds of source files such as Text and XML.
To see all key bindings look under Window -> Preferences -> General -> Keys.
Also, Ctrl+Shift+L will show you which keyboard shortcuts are active right then.
Blatant advertising coming up:
If you like these two search options, you would love nWire. It is an Eclipse plugin for Java developers which provides, among other things, much stronger search. You get to search as you type for methods, fields, packages... practically everything you have in Java.
As for some more tips, I have written the following article in EclipseZone. I really suggest adding EclipseZone to your RSS feeds reading list. Lots of tips and good stuff there.

Categories

Resources