Java/C2/Programming-features-Eclipse/English-timed
From Script | Spoken-Tutorial
Revision as of 11:24, 9 March 2017 by Pratik kamble (Talk | contribs)
Time | Narration |
00:02 | Welcome to the tutorial on Programming Features of Eclipse. |
00:07 | In this tutorial, we will learn about |
00:10 | the 'user friendly' programming features of Eclipse. |
00:15 | For this tutorial, we are using Ubuntu 11.0, JDK 1.6, and Eclipse 3.7.0. |
00:23 | To follow this tutorial, you must have |
00:26 | Eclipse installed on your system and |
00:28 | you must know how to write a simple java program in Eclipse. |
00:32 | If not, for relevant tutorial, please visit our website as shown. |
00:40 | Eclipse IDE supports many user friendly features such as: |
00:44 | * Auto completion Syntax highlighting |
00:46 | * Error dialog box and |
00:48 | * Shortcut keys.We will look into each of these features in detail. |
00:59 | I have created a class named 'Features' and added the main method. |
01:05 | we will first look at Auto completion feature in Eclipse. |
01:10 | Inside the main method, type an opening brace and hit Enter. |
01:17 | We can see that it automatically sets the corresponding closing brace and also positions the cursor with an indentation. |
01:25 | It also completes every feature that works in pairs. |
01:29 | For example, parentheses. Type open parentheses. |
01:35 | We can see that we only have to type the open parenthesis and eclipse automatically adds the closing parenthesis. |
01:42 | Also note that if we are accustomed to type the closing parenthesis also, then it takes care of it by not adding the extra closing parenthesis. |
01:52 | I’m now typing the closing parenthesis and note that only the cursor moves to the right and the extra parenthesis is not added. |
02:02 | It works in similar fashion with double quotes also. |
02:06 | Type opening quotes and it automatically closes the quotes. |
02:12 | If we are accustomed to type the closing quotes also, it takes care of it by not adding the extra quote. |
02:19 | I know typing the quote and notice that the cursor moves to the right with the extra quote is not added. |
02:27 | Auto-completion is a very versatile feature and helps a lot in maintaining the structure of the code |
02:32 | and also prevents typing errors like- missing closing braces, missing closing parentheses and missing closing quotes. |
02:44 | The next programming feature we will look at is suggestion. |
02:48 | Remove all that we just typed. |
02:54 | We will type the output statement to print the word “hello”. System dot. |
03:07 | Notice that Eclipse displays a drop-down list. |
03:11 | The list contains suggestions like err, in, out, console all sought of possible completion. |
03:19 | Scroll down to out and press Enter. Again, type a dot (.). |
03:28 | Now Eclipse will provide suggestions from the out module. |
03:33 | Scroll down to println() and press Enter. Now inside the parentheses, in quotes, type Hello. |
03:57 | The next feature we will be looking at is the Syntax highlighting feature. |
04:02 | Note that the keywords public class, public static void are all in a different color. |
04:09 | Also note that the word Hello is in blue color indicating that this is a string. |
04:16 | This 'syntax highlighting' feature helps us to differentiate between key words and different parts of the code. |
04:27 | Eclipse also helps the programmer to find out errors. |
04:31 | In a program, an error is denoted by a red cross symbol on the left margin. |
04:36 | In this program, we can see there is an error and mouse hover on the error. |
04:46 | We can see that the error says: semi colon (;) missing and the solution to resolve the error is also shown. |
04:57 | If we proceed to the run without fixing the error, right click, select Run as, Java Application. |
05:12 | We have an Error Dialog Box indicating that there is an error, asking should we proceed or not. |
05:17 | For now, let us proceed. We notice that there is output indicating that there is an error and |
05:35 | when we go to problem console, all the problems with possible solutions are listed. |
05:43 | So Let us resolve the error by adding a semicolon. Ctrl, S to save. |
05:53 | The next programmer friendly feature of eclipse is the 'shortcut-keys'. |
06:01 | The common shortcut-keys in any program are Ctrl+S for saving and Ctrl+O for opening. |
06:07 | Eclipse has shortcut keys for many such commonly used functions. |
06:12 | Control, F11 is the shortcut for running the code. |
06:16 | Let us try it now. Hold Ctrl and press F11 and we see that the code is run and the output Hello has been printed. |
06:27 | The shortcut keys for other options can be found by looking at the menu. Click Run. |
06:33 | And Notice that on the right end of the option, there is a shortcut given. |
06:40 | So the shortcut key for Debug is F11. |
06:45 | This is just a small but most commonly used list of the programming features of Eclipse. We shall look at more features in subsequent tutorials. |
06:56 | This brings us to the end of this tutorial. In this tutorial, we have learnt how to use programming features of Eclipse such as: |
07:04 | Auto completion Syntax highlighting |
07:06 | Error dialog box and Shortcut keys. |
07:10 | As an assignment for this tutorial: |
07:12 | Write a simple program with a class that prints “Hello”. |
07:17 | In the process, apply all the programming features of Eclipse, |
07:22 | observe the functions. |
07:25 | To know more about the Spoken Tutorial project, |
07:28 | watch the video available at the following link. |
07:30 | It summarizes the project. |
07:33 | If you do not have good bandwidth, you can download and watch it. |
07:37 | The Spoken Tutorial Team: |
07:39 | Conducts workshops using spoken tutorials. |
07:42 | Gives certificates for those who pass an online test. |
07:45 | For more details, please write to contact AT spoken HYPHEN tutorial DOT org. |
07:52 | Spoken Tutorial project is a part of the Talk to a Teacher project. |
07:56 | It is supported by the National Mission on Education through ICT, MHRD, Government of India. |
08:02 | More information on this mission is available at the following link spoken HYPHEN tutorial DOT org SLASH NMEICT HYPHEN Intro. |
08:07 | This tutorial has been contributed by TalentSprint. Thanks for joining. |
Contributors and Content Editors
Gaurav, PoojaMoolya, Pratik kamble, Priyacst, Sandhya.np14, Sneha, Vasudeva ahitanal