Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Contextual Method- & Object- list & support during typing of codes?
Contextual Method- & Object- list & support during typing of codes? [message #1768330] Mon, 17 July 2017 14:57 Go to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
Isn't there any (individual) contextual method- & object- list, (individual level) information (including guidance with examples) & support available during typing of codes in Eclipse? One which is available is not comprehensive, and the information available is not supported by examples. Like I have attached a snapshot here and put my questions there?
I don't have the language of a Java programmer to explain myself -- like what I need.
But if anyone has used Adobe Flash that person will know what "Contextual Help & Reference" means.
index.php/fa/30020/0/

[Updated on: Mon, 17 July 2017 15:41]

Report message to a moderator

Re: Contextual Method- & Object- list & support during typing of codes? [message #1768333 is a reply to message #1768330] Mon, 17 July 2017 15:11 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Click on the "Javadoc" view tab, and if you're developing Java, install and use a full JDK.

For more than than, it would useful for you to explain what "Contextual Help & Reference" means. This isn't an Adobe Flash forum.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Contextual Method- & Object- list & support during typing of codes? [message #1768336 is a reply to message #1768333] Mon, 17 July 2017 15:47 Go to previous messageGo to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
Apparently, Eclipse has a Contextual Help and Reference window in a hyperlink markup format(snapshot attached)!

index.php/fa/30023/0/

If any of the links are clicked, Eclipse can access the internet and let me browse that page. The version is a bit dated though (a snapshot attached).

index.php/fa/30022/0/

BTW, how can I install a full JDK for viewing (in Javadoc?)? Is there a free version available?

[Updated on: Tue, 18 July 2017 03:44]

Report message to a moderator

Re: Contextual Method- & Object- list & support during typing of codes? [message #1768365 is a reply to message #1768336] Tue, 18 July 2017 03:18 Go to previous messageGo to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
Myself

BTW, how can I install a full JDK for viewing (in Javadoc?)? Is there a free version available?
Yes, found a link:
Java Platform Standard Edition Installation Guide
Appears to be a free version. Some questions remain:

  1. Will I be able to use the package from within Eclipse? From the earlier reply it seems I can.
  2. Will I be able to use Javadoc tab to use the information package?


[Updated on: Tue, 18 July 2017 06:06]

Report message to a moderator

Re: Contextual Method- & Object- list & support during typing of codes? [message #1768373 is a reply to message #1768365] Tue, 18 July 2017 07:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
1. Yes. https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-add_new_jre.htm
2. Yes, though keep in mind that the the Java doc tab is primarily aimed at showing Javadoc snippets dynamically generated from the current selection. You'll likely want to use a browser for browse generated Javadocs (which are HTML).


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Contextual Method- & Object- list & support during typing of codes? [message #1768380 is a reply to message #1768373] Tue, 18 July 2017 08:01 Go to previous messageGo to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
Thanks, Dr. Merks!
So is this the version I should download? :
Oracle JDK 1.8.0_60 for Linux x86, 1 files Oracle JDK 1.8.0_60 Oracle Standard Terms and Restrictions 153.8 MB Oct 05, 2015

[Updated on: Tue, 18 July 2017 08:02]

Report message to a moderator

Re: Contextual Method- & Object- list & support during typing of codes? [message #1768390 is a reply to message #1768380] Tue, 18 July 2017 09:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
At this time, this appears to be the latest release version of Java 8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Contextual Method- & Object- list & support during typing of codes? [message #1768396 is a reply to message #1768390] Tue, 18 July 2017 10:05 Go to previous message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
The problem, Dr. Merks, is that Oracle distributes only rpm or tar.gz version. I had downloaded the earlier version stated. Inside the zip file is the rpm version. Debian or Debian based Linux flavours use .apt extensions.
I will download the tar.gz version and see what form it contains internally.
Thank you for your guidance.
...
[Later]
Used the link
Installation of the 32-bit JDK on Linux Platforms

Quote:
This procedure installs the Java Development Kit (JDK) for 32-bit Linux, using an archive binary file (.tar.gz).

These instructions use the following file:

jdk-8uversion-linux-i586.tar.gz

Download the file.

Before the file can be downloaded, you must accept the license agreement. The archive binary can be installed by anyone (not only root users), in any location that you can write to. However, only the root user can install the JDK into the system location.

Change directory to the location where you would like the JDK to be installed, then move the .tar.gz archive binary to the current directory.

Unpack the tarball and install the JDK.

% tar zxvf jdk-8uversion-linux-i586.tar.gz

The Java Development Kit files are installed in a directory called jdk1.8.0_version in the current directory.

Delete the .tar.gz file if you want to save disk space.

...
[Still Later]
Yes, the Javadoc in Eclipse now shows the information on the objects! Need to invest time on it and learn more about it.

I have one query, Dr. Merks.
I take the code I have written:
import java.util.Arrays;
public class HW_import_java_util_Arrays {
	public static void main(String[] args) {
		System.out.println("Hello World!");
		System.out.println(Arrays.toString(args));
	    	}
	}

Let us analyse the code line:
System.out.println(Arrays.toString(args));

I progressively hold the mouse cursory on System. I get on Javadoc some relevant information:
java.lang.System

java.lang.System
The System class contains several useful class fields and methods. It cannot be instantiated.

Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined properties and environment variables; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.
I right click and find options Open Attached Javadoc Shift+F2
When I click on the option I find the html format in the Java perspective with information on System. [Snapshot attached]
index.php/fa/30031/0/
Then subsequently, I reach .out. :
The Javadoc says:
PrintStream java.lang.System.out

PrintStream java.lang.System.out
out
public static final PrintStream out
The "standard" output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output destination specified by the host environment or user.
For simple stand-alone Java applications, a typical way to write a line of output data is:
System.out.println(data)
See the println methods in class PrintStream.

Then as I reach .println( , I find:
void java.io.PrintStream.println(String x)

void java.io.PrintStream.println(String x)
println
public void println(String x)
Prints a String and then terminate the line. This method behaves as though it invokes print(String) and then println().
Parameters:
x - The String to be printed.

Next, I move into (Arrays. It says:
java.util.Arrays

java.util.Arrays
This class contains various methods for manipulating arrays (such as sorting and searching). This class also contains a static factory that allows arrays to be viewed as lists.
The methods in this class all throw a NullPointerException if the specified array reference is null, except where noted.
The documentation for the methods contained in this class includes briefs description of the implementations. Such descriptions should be regarded as implementation notes, rather than parts of the specification. Implementors should feel free to substitute other algorithms, so long as the specification itself is adhered to. (For example, the algorithm used by sort(Object[]) does not have to be a mergesort, but it does have to be stable.)
This class is a member of the Java Collections Framework.

I further move right to toString(. It says:String java.util.Arrays.toString(Object...

String java.util.Arrays.toString(Object[] a)
toString
public static String toString(Object[] a)
Returns a string representation of the contents of the specified array. If the array contains other arrays as elements, they are converted to strings by the Object.toString() method inherited from Object, which describes their identities rather than their contents.
The value returned by this method is equal to the value that would be returned by Arrays.asList(a).toString(), unless a is null, in which case "null" is returned.
Parameters:
a - the array whose string representation to return
Returns:
a string representation of a

Finally, I reach (args), for which there is no information on the javadoc, save this:String...

String[] HW_import_java_util_Arrays.main(String[]).args

The information is not intuitive to the mind immediately, Sir!

Moved to a Separate Thread
How do I link these separate informations on the APIs available in the Javadoc or Java API index?
There are no explicit examples on how to link and use them in a meaningful way within a program.


Let me now approach the problem from the other side. Suppose that I have these four APIs within the http://docs.oracle.com/javase/8/docs/api/index.html

  1. PrintStream java.lang.System.out
  2. void java.io.PrintStream.println(String x)
  3. java.util.Arrays
  4. String java.util.Arrays.toString(Object[] a)


What I mean is that, if I come across these above four API definitions/descriptions independently, I wouldn't be in a position to know that they could be weaved together into a meaningful form:
System.out.println(Arrays.toString(args)); unless I have specific examples.

This is what I need to know:
How to be able to weave together terms from the list: http://docs.oracle.com/javase/8/docs/api/index.html into code lines that work in a meaningful way?
Made into a separate thread for your attention and suggestion: How to combine separate APIs in meaningful ways?

[Updated on: Wed, 19 July 2017 16:00]

Report message to a moderator

Previous Topic:Eclipse Oxygen runs ghostcode
Next Topic:Eclipse crashes on start but no log
Goto Forum:
  


Current Time: Fri Mar 29 06:57:29 GMT 2024

Powered by FUDForum. Page generated in 0.05442 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top