navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

Up and Running with Eclipse

Up and Running with Eclipse

with Charles Kelly

 


Eclipse is an essential tool for developers—it's not only an integrated development environment, but also an extensible platform for developing digital tools and applications. This course shows how to set up Eclipse to work with a variety of different languages, including Java, PHP, C/C++, and JavaScript. Author Charles Kelly explains how to create new projects and use tools such as the Package Explorer and the code completion feature. Author Charles Kelly also shows how to refactor code, use the Eclipse debugger, and extend Eclipse with bundles, Apache Maven, Window Builder, and eGit.
Topics include:
  • Downloading and installing Eclipse for Mac or Windows
  • Exploring the toolbar
  • Creating a new project
  • Changing views and perspectives
  • Using the editor
  • Working with JUnit and templates
  • Using Javadoc
  • Using the code completion features
  • Exploring syntax checking
  • Getting help with Eclipse
  • Extending Eclipse

show more

author
Charles Kelly
subject
Developer, Mobile Apps, Desktop Apps
software
Eclipse
level
Beginner
duration
1h 2m
released
Dec 10, 2012

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:00(music playing)
00:04Hello! My name is Charles Kelly.
00:06Eclipse is a platform for building and using digital tools.
00:10I'll begin by showing you how to download separate versions of Eclipse
00:13that support Java, PHP, C and C++ and JavaScript.
00:20The course proceeds by showing you how to create and run a Hello World program
00:23that is written in Java.
00:26Eclipse is organized into perspectives, editors and views.
00:29The course shows you how you can change in the default organization to suit
00:33your preferences and improve your productivity.
00:36Next, we create and debug a simple cryptography example that uses
00:41only addition and subtraction to demonstrate features of the Java-Editor.
00:46The final chapter explains how to extend Eclipse by using Update Sites
00:50to install new software into Eclipse.
00:53I hope that you enjoy this course. Let's begin.
Collapse this transcript
Using the exercise files
00:00The Exercise Files for this course are freely available to all members of lynda.com.
00:05The files contain Java source code.
00:07I'll use Eclipse to import this code into a general project,
00:11which I explain in the course, then copy and paste the code into a Java project,
00:16which I also explain in the course.
00:17I'm using this code to illustrate features of Eclipse, not to create a final project.
00:23It's not necessary that you use this code or any other code to complete the course.
00:28Let's get started.
Collapse this transcript
1. Getting Started with Eclipse
Downloading and installing Eclipse for Windows
00:00Eclipse is an open-source project and it is relatively easy to install.
00:04Eclipse does not impose restrictions upon how or where you install it on your computer.
00:09The first step is to use a Web browser and navigate to the Eclipse Foundation's
00:13home page, which is located at eclipse.org.
00:16After navigating to the download page, press the prominently displayed Download button
00:21and your browser will be directed to the download page,
00:25which displays many versions of Eclipse.
00:27I recommend that you select Eclipse Classic. The current version is 4.2.1.
00:33Select the version which is displayed at the time you navigate to this page.
00:38The next step is to select the operating system for your computer.
00:42In our case, we'll select the Windows 64 Bit operating system.
00:47You'll be directed to the Download page, which contains many mirrors.
00:51I recommend that you select the first mirror which is displayed,
00:55save the file to your computer.
00:56After you've downloaded Eclipse, you'll need to extract it into a folder on your computer.
01:02Select Eclipse, then select Extract All and then select a location.
01:08We've created a folder on our computer.
01:11The name of this folder is Eclipse01, choose the folder, give it
01:17any name that you like and extract Eclipse into that folder.
01:20After you've extracted Eclipse, navigate to the folder that you've chosen,
01:24in our case Eclipse01.
01:27If you choose, you may install multiple copies of Eclipse on your computer.
01:31If you do choose installed multiple copies, I recommend that you establish
01:34a separate workspace folder for each copy of Eclipse that you install.
01:38For example, create a new folder and name it workspace.
01:44Once you've installed Eclipse navigate to the Eclipse folder,
01:48you can open Eclipse by double-clicking on this icon.
01:51Also as an option if you like, you can create a shortcut; right-click to open
01:57a context menu and choose Create Shortcut, rename the shortcut.
02:02After you've created the shortcut, drag it to your desktop; you can now open Eclipse
02:07by double-clicking on the shortcut icon.
02:11Windows will display a security warning, uncheck this box and select Run,
02:17you'll see the splash screen for the JUNO version of Eclipse.
02:20It will take a moment to open.
02:23At this point, Eclipse is prompting you to select a workspace.
02:27What you'll do is browse to the workspace that you have just created.
02:32I recommend that you check this box and use this location as your
02:35default location for projects.
02:37You'll have the option once you're in Eclipse to change this selection.
02:41In the next movie, we'll explain how to navigate through the various
02:46features of Eclipse.
Collapse this transcript
Downloading and installing Eclipse for Mac
00:00Eclipse is an open-source project and it is relatively easy to install.
00:04Eclipse does not impose restrictions upon how or where you install it on your computer.
00:10Go to the Eclipse Download page, which is located at eclipse.org/downloads.
00:17Navigate to Eclipse Classic 4.2.1 and select the operating system that you want to use.
00:23Click on the Download button.
00:26After the download is completed, create a folder where you'd like
00:29to store Eclipse on your computer.
00:31I recommend that you open this folder and within the folder, create a workspace folder.
00:36Now, extract the contents of the zip file into the folder that you created.
00:45Go into the Eclipse folder and double-click on the Eclipse icon.
00:49Now browse to the workspace folder that you just created and associate it
00:54with this version of Eclipse.
00:57You can double-click on the Welcome tab and now you're ready to use Eclipse.
Collapse this transcript
Installing Eclipse for PHP development
00:00Eclipse is an open-source project and it is relatively easy to install.
00:04Eclipse does not impose restrictions upon how or where you install it on your computer.
00:09PHP is one of the languages supported by Eclipse.
00:12You have two options for working with PHP and Eclipse.
00:15You can download PHP development tools that are supported by Aptana or by Zend.
00:20I recommend that you use the Aptana Studio version of Eclipse when working with PHP.
00:24The URL for downloading the Aptana Studio version for Eclipse is www.aptana.com.
00:33For more information about this environment see Up and Running
00:37with Aptana Studio 3 with Joe Marini here in the lynda.com Online Training Library.
00:43If you would like to use the Zend version of the PHP tools, you can access these
00:47from the Eclipse Download page.
00:49Once you're on this page, select the link Download All-In-One package.
00:54You'll see the Zend Company download page, select the operating system
00:58from your computer and download the zip file.
01:01After the download is complete, extract the contents of the zip file
01:06into any folder that you choose.
01:08I recommend that any time you install a version of Eclipse, that you create
01:12a workspace folder that is associated with that particular version of Eclipse.
01:16Go into the eclipse-php folder; double-click on the icon for eclipse-php,
01:22you'll be prompted to associate a workspace with this version.
01:26Configuring PHP in the associated server is beyond the scope of this course.
01:31For more setup information, see Installing Apache, MySQL and PHP
01:37with David Gassner in the lynda.com Online Training Library.
Collapse this transcript
Installing Eclipse for C/C++ development
00:00Eclipse is an open-source project and it's relatively easy to install.
00:04Eclipse does not impose restrictions upon how or where you install it on your computer.
00:10The first step is to use a Web browser, and navigate to the Eclipse Foundation's
00:14download page, this is located at www.eclipse.org/downloads.
00:21Navigate to Eclipse IDE for C and C++ Developers, select an operating system,
00:29you'll be navigated to a download-mirror, select the download-mirror
00:33and begin your download.
00:34After your download is complete, extract the contents of the zip file into a folder.
00:40After the extraction is complete, go to the folder where you extracted Eclipse.
00:45I recommend that any time you install any version of Eclipse that you also
00:49install a workspace folder in that location.
00:53The workspace will hold the projects that you create within Eclipse.
00:57Open the eclipse folder, you'll see an Eclipse icon,
01:01double-click on the Eclipse icon and open the program.
01:04If you choose, you can create a shortcut to the program at this point.
01:07Here's where you associate the workspace folder that you've just created
01:11with a particular version of Eclipse.
01:13Click this box. Click OK.
01:16You can ignore this warning and you can ignore this one,
01:21double-click on Welcome and you'll see the C/C++ perspective for Eclipse.
01:26Configuring the C compiler for your platform is beyond the scope of this course.
01:31For more information, be sure to check out C and C++ Essential Training
01:36with Bill Weinman here in the lynda.com Online Training Library.
01:40That course provides a deep dive into C and C++ using the Eclipse environment.
01:45For the rest of this course, I'll be using Java to demonstrate
01:49the various features of Eclipse.
Collapse this transcript
Installing Eclipse for JavaScript development
00:00Eclipse is an open-source project and it is relatively easy to install.
00:04Eclipse does not impose restrictions upon how or where you install it on your computer.
00:10JavaScript is one of the languages supported by Eclipse.
00:13You have two options for working with JavaScript, you can download JavaScript
00:17development tools that are supported by Aptana or the Web development tools
00:21from the Eclipse Foundation.
00:23I recommend that you use the Aptana Studio version of Eclipse when working with JavaScript.
00:28If you want to use the Eclipse Foundation version of JavaScript,
00:32go to the download page and select Eclipse IDE for Java EE Developers,
00:38select your operating system and begin your download.
00:41After the download is complete, extract the zip file into any folder that you choose.
00:46I recommend that whenever you install a version of Eclipse,
00:50you create a workspace folder that's associated with that particular version of Eclipse.
00:55Go to the eclipse folder, open it, find the eclipse icon, double-click,
01:00run the program, browse to the workspace folder that you just created, check this box
01:04and say OK, double click on the Welcome tab and you're ready to start
01:10writing JavaScript code.
01:12Configuring a web server is beyond the scope of this course.
01:15For more information on setting this up, see Installing Apache, MySQL and PHP
01:21with David Gassner here in the lynda.com Online Training Library.
01:26If you need more information about JavaScript, see JavaScript Essential Training
01:30with Simon Allardice also here in the lynda.com Online Training Library.
Collapse this transcript
Working with the default perspective
00:00If you've downloaded Eclipse Classic 4.2, you'll see the following Welcome screen.
00:05You can close this anytime you want, and you can reopen it.
00:09It's often worthwhile if you are a new Eclipse user to browse through
00:13some of these sequences and topics that are available for you here.
00:17Right now, we'll close this view.
00:19The first thing that you'll see is called a Perspective.
00:22This particular default Perspective contains an Editor, a Package Explorer,
00:28in the lower view you'll see Problems, Javadoc, and Declarations.
00:33On the right hand side, you'll find an Outline view.
00:36I like to create extra space for the Editor window.
00:39What we'll do is minimize the Outline view and this will create extra space for the Editor.
00:46The arrangement of the Editor and the views is called a Perspective.
00:49You can create your own Perspective if you choose or reuse a Perspective
00:54that has been created by the Eclipse team.
00:57To open up a Perspective, use the menu sequence Window>Open Perspective
01:02and navigate to a particular Perspective.
01:05For illustration, let's open the Debug Perspective. We'll use this later in the course.
01:10Once you've opened a Perspective, you'll see that it's displayed
01:14in the toolbar for perspectives.
01:16If you wish to close a Perspective, you can right-click
01:19on a particular Perspective;
01:21this will open a context menu, and select Close.
01:24We come back to our original default Perspective.
01:27Once you have a Perspective, you'll notice that it's organized into folders.
01:32Each folder contains a group of views.
01:35You can add views to these folders.
01:37In order to add a view, what you'll do is you navigate to the Windows menu,
01:41select Show View.
01:43Now I want to display a Properties view, and I happen to know
01:48that it's located in the General folder.
01:50So what you can do is after you select Show View, select Other,
01:55open the General folder and navigate to the Properties view, double-click on the Properties view
02:01and it will be displayed in the folder.
02:03You can use the same sequence to add any view to any folder that you choose.
02:09Also an interesting property of Eclipse is that you can move views into
02:13different positions on the screen.
02:15For example, we can take our Properties view and move it here to this folder,
02:19just as easily we can move it back again.
02:22Now the Properties view does not contain information.
02:26Later, when we create a Java project, the Properties view will display the
02:30information about the project and the components within the project.
Collapse this transcript
Exploring the toolbar
00:00The Java Perspective, like most perspectives, contains a main menu and a toolbar.
00:05Most features within Java Perspective can be accessed from a menu, a toolbar icon,
00:10or a context-sensitive pop-up menu.
00:13The Source, Refactor, and Navigate menu items are specific to Java programming
00:18and we'll cover them in a future movie.
00:21The File menu contains Save and Save As, Import and Export items.
00:27These are replicated on the toolbar with icons for Save, Save All
00:32and there is also a Print icon.
00:34The Search menu item is useful for navigating among multiple projects, and among
00:39multiple pieces of source code within projects.
00:43Search also has a toolbar icon.
00:45The Project menu controls the display of projects and permits you to choose
00:50when source code within your projects is built.
00:54Building refers to preparing source code to run on computers.
00:57The toolbar contains many icons that apply only to Java programming.
01:02We'll consider some of these later in the course.
01:05These include Debug, Run, Run Last.
01:09Also you'll see Skip All Breakpoints, this refers to debugging;
01:13a New Java Package refers to creating items for Java programming; creating New Java Classes.
01:20Finally, you'll see these arrows.
01:22As we learn to edit source code, you'll have the ability to go through
01:28and jump to previous locations and jump forward, that's what these arrows are for.
01:33Right now, as you begin to learn Eclipse, you can skip learning about these,
01:38we'll cover the important ones later in the course.
01:42The Window menu item permits you to reorganize the display of perspectives,
01:47and the display of views within perspectives.
01:50As you may suspect, the Help menu provides access to information
01:55about using Eclipse and its components.
01:56It also provides the ability to search for new versions of Eclipse components
02:01by checking for updates.
02:03It will also help you to install new software into Eclipse.
02:07I'll illustrate using the Help menu in a future chapter.
02:10Eclipse permits you to change many features through Preferences.
02:14As you can see, there are a large number of preferences.
02:19For this example, I'll change the font size for displaying files within editors.
02:23As you'll see later throughout the course, Eclipse contains many editors.
02:28To change the font size, what we'll do is we'll expand Appearance, we'll
02:32select Colors and Fonts, we'll go to Basic and now we'll select Text Font and edit this.
02:40What we'll do is we'll select a particular Font, Calynda, and we'll select
02:46a 16 point Font Size.
02:49The next thing that we'll do is we'll add line numbers to Text Editors.
02:53To do this, what we'll do is we'll expand the Editors selection,
02:58we'll expand Text Editors and we'll select Show line numbers.
03:03When we're done, we'll select OK.
03:05These changes will appear anytime that you open a text file within Eclipse.
03:10Eclipse contains a large number of preferences.
03:13The ability to change even a few of these will help you to customize Eclipse
03:17to a style that works best for you.
Collapse this transcript
2. Working with Projects in Eclipse
Creating a new project
00:00Projects are the basic unit of work and organization within Eclipse.
00:04You can choose any name that you like for your projects.
00:07To create a project, navigate to the File menu, select New.
00:11This will bring up the New Project wizard.
00:13Select the type of project that you wish to create.
00:16In our case, we are going to use a General Project.
00:19Give the Project a name and select Finish.
00:22Once you have a project within Eclipse, you can populate it with text files,
00:26Java files, and other artifacts.
00:29For example, if you would like to include a text file within your project,
00:33again select New, this time we'll select File, we'll give it a File name,
00:39select Finish and now we'll type.
00:40Note that this file has file numbers.
00:44The reason for this is that in the previous movie, when we were examining Preferences,
00:48we chose to add file numbers.
00:51Also note the size of this font and the font that we are using.
00:55In the previous movie, we selected Calynda in a 16-point type.
01:00This file contains unsaved information and Eclipse tells us this by using
01:05a small asterisk (*) in the tab that has the filename.
01:09If we type Ctrl+S for Save, the file is saved and the asterisk (*) goes away.
01:15Let's create a second project.
01:16Again, it's New>Project>General>Next and let's give it new project name.
01:23There may be times when you will find it convenient to access files and folders
01:26from your computer's file system within Eclipse rather than switching back and forth
01:30between Eclipse and your computer's file explorer.
01:34To do this, we'll import files into a particular project.
01:38Open the context menu with the right-click, select Import, select File System,
01:44browse to the location where you would like to import files from, expand
01:49and select the files that you'd like to import into Eclipse, select Finish.
01:54Now, if we expand the Project, you will see the files that are available.
01:58In particular, if we double-click on this textfile, it's imported into Eclipse.
02:02There will be times when you'll need more space on your screen to
02:07work with a particular text file.
02:08You can do this by navigating to the tab, double-clicking.
02:12Once you've finished working with the information and you would like
02:16to change the Editor to its previous size, again, double click on the tab.
02:20As you proceed through the course, you'll find these features for using
02:24projects, editors, and files to be very useful.
02:27We'll use them in future movies within this course.
Collapse this transcript
Creating a Java project
00:00In this movie, we'll take a first look at a Java-Editor.
00:03Note that we've copied this file HelloWorld.java into the Exercise Files from Chapter 2.
00:09Eclipse requires that all Java files being a Java project.
00:13To create a Java project, we use the context menu, New and Java Project.
00:18Give the Project a name and we'll select all the defaults, select Finish and we have a Project.
00:25A Java requirement is that all Java-class files exist within a namespace.
00:32This namespace is encapsulated by a package.
00:35In order to create a package what we do is; we use the context menu,
00:40same New and Package, and we'll give this the name com.charleskelly.hello, select Finish.
00:46Now what we'll do is we'll take this HelloWorld.java file from our previous project,
00:51copy it, and paste it, into this package.
00:56If we expand the package, we see the HelloWorld.java file, we can double-click on it,
01:00and we can see the file.
01:02We are not going to do any programming right now, but what we'd like to do is see
01:06if we have a file that contains a valid Java class file, we can run that
01:12from within Eclipse.
01:13In order to do this, we select the context menu, select Run As,
01:19and run this as a Java Application.
01:20And as you'll see, HelloWorld is printed here in the Console view.
01:25Alternatively, what we could've done is used these buttons here: Debug, Run, etcetera.
01:33If we select Run, the same thing happens;
01:36HelloWorld is presented in the Console view.
01:39The idea of a HelloWorld program comes from the 1970s and the C language,
01:44when it's author Brian Kernighan established Hello World as a method of determining
01:49whether a valid file could be created, and whether that file could run
01:54on a particular computer.
01:56If you follow these steps and you see HelloWorld in your Console view,
02:00you'll know that your Eclipse version is properly configured and you can run Java programs.
Collapse this transcript
Customizing the code style
00:00Most software engineers have a preferred coding style.
00:03Braces placement is one element of coding style.
00:06I prefer that Braces align vertically within the code.
00:10You can change this with Preferences by creating a customized Formatter.
00:14Again, we'll use the Window menu item to select Preferences.
00:18However, Braces placement is specific to the Java Editor rather than being
00:23a feature of all text editors.
00:25Navigate to the Java item, expand it, expand Code Style, go to Formatter,
00:31press New and give a name to your Formatter, press OK.
00:35Eclipse provides many items that you can format;
00:38Braces is only one of these.
00:40Select the Braces tab.
00:42Notice the Empty interface and the alignment of brackets here.
00:47Look at Class or interface declaration and then this dropdown.
00:52Use the dropdown to change this to Next line and notice the change
00:56in the placement of braces.
00:57In this course, we'll select Next line for all of these dropdown items.
01:02If you'd like, you can experiment with changing options and these other items.
01:06For example, look at Control Statements, you can do the same thing with
01:11Control Statements that we just did with Braces.
01:13After you have finished choosing your options select OK.
01:17Press OK one more time.
01:19As with General preferences, you can change Java Preferences
01:23to customize Eclipse to your preferred styles and workflows.
Collapse this transcript
Using the Package Explorer and Navigator
00:00Modern operating systems have file explorers that filter the presentation of files and folders.
00:06Typically, the default presentation does not display certain hidden files.
00:10The Package Explorer that is currently displayed on the left-hand side
00:14of the Workspace is similar.
00:15It does not display the binary files created from Java source code
00:19and it does not display internal Eclipse files.
00:22The file navigator view is similar to an operating system file system explorer.
00:27We can open this view using the sequence Window>Show View>Other>Navigator.
00:34If we choose to open our previous project in the File Navigator instead
00:37of having it opened in the Package Explorer, we'll see two new folders,
00:42a .settings folder and a binary folder.
00:44We'll also see two new files a .classpath file and a .project file.
00:49If we expand the binary folder, we can navigate in the style
00:54through these folders that Java prepares for us and we'll notice there's
00:58a HelloWorld.class file.
01:00The .class file is a binary file that contains Java byte code and in the context
01:05of a Package Explorer, it's similar to a hidden file in a file explorer.
01:10Similarly, the .project file is not displayed in the Package Explorer,
01:15but we can see the contents of the files and it contains ordinary XML.
01:19Similarly, if we double click on the .classpath file, we can see the classpath entries.
01:25Although, you usually not need these when you are writing Java code,
01:29it's interesting to know how to find them if you do need them.
Collapse this transcript
Changing views and perspectives
00:00You can rearrange the views on the Desktop to accommodate your preferred workflow.
00:04Also, you can save an arrangement of views as a Perspective.
00:08For example, you can move the File Navigator that we just opened
00:12to a new position within the Workspace.
00:15To save a new arrangement of views as a Perspective, use the sequence
00:19Window>Save Perspective As and give the Perspective a name.
00:24You can return to your previous Perspective, that is the Java perspective,
00:28by clicking Java, OK.
00:31This reopens that default Perspective and contains the Outline view
00:35that we previously minimized.
Collapse this transcript
3. Building and Testing Software
Introducing the project
00:00In this movie, we'll explore a fun and interesting project
00:03that develops encryption tools.
00:05It sounds sophisticated, but the only mathematics that we'll use
00:08are addition and subtraction.
00:10This movie isn't about cryptography; it's about learning the software
00:13development tools within Eclipse.
00:15However, we'll cover just enough cryptography so that you'll have
00:19a basic understanding.
00:20The slide contains an illustration of a Caesar cipher where the key = 3.
00:25To encrypt your plain text which is the message that you want to protect,
00:29you shift each letter in the message three positions, so that an A becomes a D,
00:35a B becomes an E, a C becomes an F, etcetera.
00:38When the recipient receives a message, he or she works in the opposite direction,
00:42moving from the bottom row to the top row.
00:45While this may have been sufficient during the Roman Empire,
00:49most modern amateur cryptographers can break this code without using a computer.
00:53We'll explore cryptography using a one-time pad.
00:56If you have ever seen the Spy movie where the courier was carrying a briefcase
01:00that is handcuffed to his or her wrist, then you'll understand
01:03the theory behind a one-time pad.
01:05It is difficult to transfer the keys within a one-time pad.
01:09This is in contrast of public key cryptography that you've probably used,
01:14for example, when your browser accesses a Web site using the https protocol.
01:20In the exercises for this movie, you'll emulate the role of a software tester.
01:25The Exercise Files contain the encryption software. You will write the test code
01:30to ensure that the encryption works properly.
Collapse this transcript
Using the editor
00:00This movie shows advanced editing techniques within the Java Editor.
00:04The Exercise Files contain Java classes that provide encryption.
00:08You will use the Java Editor to create JUnit classes.
00:12In the HelloWorld exercise you created a Java class that contained a main method.
00:16A software engineer might never write a main method in his or her
00:20entire professional career.
00:22The reason is that most Java code runs within a container, for example,
00:27a Java Enterprise Edition Application Server or a Web Server.
00:31JUnit provides a container for running test classes, and Eclipse supports this container.
00:36You can write Java classes that will run inside any container, then test them using JUnit.
00:43Your first test for this chapter is to import the Exercise Files
00:47into the 1_Samples project that we created.
00:50Select Import, from the File System browse to the location where you store
00:56the Exercise Files, expand the folders and import everything for Chapter 3 (Ch03).
01:02Expand the Chapter 3 folder and notice that there are two projects;
01:06a CipherProject and a CipherTestProject.
01:09The first thing that you'll do is create two new Java projects.
01:15Select New>Java Project and give it a name, choose all the defaults and select Finish.
01:20Now create a CipherTestProject and again select Finish.
01:28Expand the CipherProject.
01:30Now expand the Source folder, copy everything in com and its subfolders
01:36and place them within the source (src) folder in the CipherProject.
01:41Notice, the source file now contains this small red X as a decorator
01:46and the Problems view indicates that there are five errors in the source files
01:51that you copied into this new project.
01:53Select the first error, double-click, and the cursor in the Java Editor
01:58will be positioned at the line where the error occurred.
02:01Note the red X decorators in this gutter and the red boxes here in this gutter.
02:07You can use these to navigate between errors.
02:11An interesting feature of the Java Editor is that it collapses lines of code
02:15that contain similar statements.
02:18If you hover over this X, the Import Statements will be displayed.
02:23If you click on the X, the source code is expanded.
02:27Note lines 10 and 11, these are where the errors occur.
02:30The cause for these errors is that Eclipse and Java can't find the libraries
02:36that contain Logger and LoggerFactory.
02:39If we look at the code that we imported into 1_samples, there is a jar file, slf4j.
02:44What we need to do is copy this file and paste it into the CipherProject.
02:51Now what we want to do is modify the Java class path.
02:54While this isn't a course in Java, it's sufficient to know that a class path
02:59is a group of files and needed to run any particular piece of Java code.
03:04We can modify the class path by modifying the properties
03:08of a particular project.
03:10Select Properties, go to Java Build Path, select Libraries, then select Add JARs.
03:17Expand the CipherProject and select the JAR file that we just copied into the project.
03:23Select OK, select OK one more time.
03:27Notice that the errors went away in the source file.
03:31There were no errors listed in the Problems view and there was no longer
03:36 an error decorator on the source folder.
03:39For professional software engineers, resolving library dependencies and class paths
03:44are among the most difficult problems to solve.
03:47Many features within sophisticated build systems are devoted
03:51to solving dependency problems.
03:52Software engineers have varying preferences about where to store classes,
03:57either within the project that contains the classes to be tested or within a separate project.
04:03If you use Apache Maven to organize your code, which we'll illustrate
04:07in the advanced chapter of this course, Maven will include the test within
04:11the same project as the codes under test.
04:13In this movie, we'll use a separate project, so that we can learn to associate
04:18external projects with a particular project.
Collapse this transcript
Using JUnit and templates
00:00To illustrate your role as a software tester, copy com and all its subfolders
00:05into the source folder of the CipherTestProject.
00:08Notice we have errors.
00:10As in the previous movie, it's similar to a build path problem and in particular
00:15Eclipse and Java don't know about test, and import statements for org.junit.
00:21The easiest way to correct this problem is to create a second test file
00:25New>JUnit Test, give it a name, select Finish and Eclipse tells you that JUnit 4
00:31is not on the build path, select Yes, we do want to add the JUnit for our library.
00:38This time instead of having to do it manually, using properties of the Java build path,
00:42Eclipse will do it for us.
00:45A temporary test case is created.
00:47We don't need this.
00:48So you can close this file and you can delete the default package.
00:53Expand the package, double-click on the OtpTest.java file, expand the Editor
00:59and we can take a quick look at what's going on in the Test Case.
01:03What we're doing is we're creating a simple message "The quick red fox,"
01:08we're converting that message into a byte string.
01:11We're encrypting it using subtraction, we are decrypting it using addition,
01:16we are testing if the decrypted string is equal to our original message
01:22and we're asserting that this is true.
01:23Also here's a feature of the Java Editor that's often very useful.
01:28This particular line of code, System.out.println, the decrypted string
01:33is commented it out.
01:34What you can do to add comments to one or more lines is Ctrl+/.
01:40Now the line is uncommented.
01:42If I want to add comments again, I simply use Ctrl+/.
01:48It's considered bad form to put print line statements within your test code, but for our examples
01:53it will be worthwhile.
01:54The first thing that we want to do is run this Java test code.
01:58To do this, right-click on the context menu, select Run As>a JUnit Test case,
02:04if you're prompted to save, select OK and notice that the JUnit view appears
02:10and we get a green bar.
02:11This indicates that there were no problems with our test code and that it ran successfully.
02:17If we close the JUnit Test case and return to our source code,
02:21let's intentionally insert an error into our test case.
02:25Take this assert statement that says assertTrue and change it to assertFalse,
02:31save the file, once more running as a JUnit Test case.
02:37This time the JUnit view indicates that there is an error by showing this red bar.
02:43If you're doing your own testing and you see that an error occurs,
02:47what you can do is double-click on the line in the JUnit view and again the cursor,
02:52in the Java editor will be positioned to where the error occurs.
02:56Once more, let's change this back to assertTrue and this time let's leave
03:01the print line statement in the code, save it and run it as a JUnit Test case.
03:07This time the Console view is opened and the message that we encrypted
03:12and then decrypted is presented in the decrypted form.
03:16The fact that we can read the quick red fox indicates that our code
03:20is probably working correctly.
03:22If we've written our test cases correctly, the green arrow shows
03:26that our code is correct.
Collapse this transcript
Refactoring code and using Javadoc
00:00In this movie, we'll illustrate a few more features of the Java editor.
00:04First, expand the editor, let's take a look at this variable sillyKey,
00:10you may not think the name is appropriate, the reason that the key is called sillyKey
00:14is that the sequence 0, 1, 2, 3 is very easy to guess.
00:18Search and replace in Java is referred to as refactoring; select a variable,
00:24choose Refactor>Rename and give it a new name for example myKey.
00:29Notice that I we're typing myKey is changing everywhere in the code.
00:36After we hit Enter, sillyKey is replaced with myKey everywhere in this source file.
00:42The pop ups that you may have noticed during this movie contain documentation
00:46in the form of Javadoc.
00:47When you hover the cursor over a method name or a variable name,
00:51the associated Javadoc appears.
00:53This applies both to the code that you write and to code that is written by other people.
00:58For example, if you hover the cursor over test message, the Javadoc appears,
01:03but it's not very informative.
01:05If you scroll down to the bottom of the source file and you look
01:08at the assertTrue method and hover here, you'll see that the Javadoc is more informative.
01:14In particular, you'll see that the parameters to this method are the condition
01:19 to be checked also the Javadoc explains what we can expect if the test passes
01:25or if the test fails.
01:27An interesting feature of the Java Editor is that it will help you write boiler code
01:30such as Getters and Setters, hashcode methods, equals methods and toString methods.
01:36You'll probably never need these methods within test cases,
01:40but we'll illustrate them here.
01:41First, let's start with Getters and Setters, position the cursor within
01:46the editor to where you'd like to Getters and Setters to appear.
01:49Access the context menu, select the Source method,
01:54then select Generate Getters and Setters, choose the Getters and Setters
01:58that you'd like to include, then select OK.
02:00The accessors, the Getters and Setters are positioned in the Java source code file.
02:05Now let's create a toString method.
02:07Again go to Source>Generate toString, pick what you would like to appear,
02:13select it, press OK.
02:15This form of toString is often useful within a debugger, when you don't have access
02:19to the internals of the class that you're using within the debugger.
02:23I've show you a few features of the Java Editor, there are many more.
02:28Hopefully, we have stimulated your interest and you'll explore these features.
02:32In an upcoming movie, we'll show you how to use the help system
02:36to find these new features.
Collapse this transcript
Introducing the Eclipse debugger
00:00In the previous movie, we corrected an error that we introduced.
00:03In this movie, we'll do the same thing using the debugger.
00:07The purpose is to learn how to set breakpoints in the debugger
00:10and how to review the value of variables in the debugger.
00:13Once again, we'll run the code as a JUnit Test case, we get an error message,
00:18and we'll navigate to the line that contains the error code.
00:21We'll move a few lines above where the error is, and we'll set a breakpoint.
00:26We can do this by double-clicking in the gutter to the left of the line number.
00:30After we double click, we'll see that there's a decorator, and it tells us
00:35that a line breakpoint has been set.
00:37For the purpose of this demonstration, we are going to set a second breakpoint.
00:41We don't need it, but I want to show you how to step through breakpoints.
00:46In order to use the debugger, we're going to use the Debug option instead of the Run option.
00:51In this case, we'll use the context menu, select Debug As and we'll select Debug it as
00:56a JUnit Test case.
00:58Here, Eclipse is asking us, if we want to change our Perspective, click the box
01:03to remember this decision, and say Yes.
01:06The first time that we open the debugger, this is what the Perspective will look like.
01:10I find it convenient to minimize the Outline view, and also let's take
01:16the JUnit view and include it in this Perspective.
01:19If you recall, we already included the JUnit view in the Java Perspective,
01:24now we're going to include it into the Debug Perspective.
01:27As before, it's Windows>Show View>Other, expand the Java tab and select the JUnit view.
01:34After we've done this, we're ready to step through our code.
01:38Notice right now, the cursor is positioned at line 25, this is where we
01:43set our first breakpoint.
01:44To step through our code, we'll use the icons in the toolbar at the top
01:49of the Debug Perspective.
01:51The icons that you will use most often are Step through, which is also available
01:56on the F5 key, Step Over on the F6 key, and Return.
02:01If you're not familiar with debugging, Step Into means that if you're using a method,
02:06step into the code within that method.
02:09The alternative is Step Over, which means if you're using a method,
02:14execute the entire method, and go to the line after the call to that method.
02:18So, what we'll do is we'll step over, and at this point, if we continue to step over
02:24the code, we're going to execute every iteration of this for statement.
02:30What we'll do is go to the next breakpoint, and we'll use this icon.
02:35Now you can see that we stepped through to the breakpoint,
02:39just a little bit before where the error occurs.
02:41At this point what we might want to do, if we are actually in a debugging session,
02:45is look at the values of certain variables.
02:48We can do this in the Variables view.
02:50For example, if we highlight the messageByte, we see the value for each item
02:56in this byte array.
02:57If now we go through, and we continue with the Resume button, what's going to happen,
03:02we'll complete the execution of this JUnit Test case.
03:06As before, with a Console print, the quick red fox, however the JUnit view
03:12shows that there's an error.
03:12What we can do here is while we're in the debugger, is we can step into the Editor
03:17and correct the error.
03:19Now this is easier than it would be in a normal debugging situation,
03:24since we introduced the error ourselves.
03:26We'll save the code and once again, we'll debug this as a JUnit Test case.
03:33We'll step through the breakpoints, one breakpoint, the next point, step over the code.
03:38The print line statement shows in the Console view, here we are completing
03:42the code, and we'll finish.
03:45If we look at the JUnit view now, we'll see the green bar, and we'll know
03:49that our test ran correctly.
03:50This is a quick and a simple introduction to debugging.
03:54The debugger has many more advanced features, but hopefully this is sufficient
03:57to give you a flavor of what debugging is like inside Eclipse.
Collapse this transcript
Using and customizing code completion
00:00In this movie, we'll see how to use code completion in the Java Editor
00:04and we'll also see the interaction between code completion and templates.
00:09The first thing that we'll do is we'll create a New Java Project,
00:16expand the Project, and create a Package.
00:18Now we'll create a Person Class within the Package.
00:29The first thing that we'll do is add fields to our Person Class.
00:33We see a red error decorator.
00:35It tells us that date cannot be resolved to a type.
00:38If we click on the error decorator, we have the option to Import 'Date'
00:42from either Java.util or Java.sql, select Java.util.
00:47We now get these warning messages.
00:49The value of the field person.fName is not used.
00:52Essentially, what it's telling us is that we don't have any accessors
00:56for Getters and Setters, and these are private fields.
00:59Let's expand the Editor, and before we create the Getters and Setters,
01:04let's create constructors for this class.
01:06The Java Editor will create the constructors for us automatically.
01:11Open the Context menu, go to Source and select Generate Constructor using Fields,
01:15deselect all the fields, so that we can create
01:21a no argument constructor.
01:22Now let's create our Getters and Setters.
01:25Again, open the context menu, go to Source, and select Generate Getters
01:31and Setters, Select All, OK.
01:35The next thing that we'll do is add a method to our Person Class.
01:39Let's use code completion to add a try catch block to this method.
01:43Type try, hit Ctrl+Space, you'll see the Javadoc for the proposed
01:50try catch block, select this.
01:52Let's use code completion again to insert an if then statement, type if,
01:58Ctrl+Space and select ifelse.
02:02As a condition, let's say if (null == this) and use code completion,
02:10and select dob (date of birth).
02:11So we are saying if the date of birth (dob) for this person is null,
02:15we're going to throw an exception.
02:16Now in the else block, let's add a GregorianCalendar and when we do this,
02:23we see more error decorators.
02:24We can add an Import statement here, and we can add another Import statement for calendar.
02:30The next thing that we'll do is extract the date from our calendar.
02:34We'll use code completion for one more ifelse block, and now we'll add an else statement.
02:41If we look at the code, what we are saying if this particular person was
02:45born before January 1, 1900, we are going to print out a message that says
02:50getting kind of old.
02:52Otherwise we'll print out a message that says still got plenty of time,
02:56that's the end of this class.
02:57Now what we'll do is create a JUnit Test class, select the same package,
03:03say New>JUnit Test case and give the test case a name, say OK.
03:12Let's create another try catch block and place this fail statement at the end
03:17of the catch and let's substitute the message Not yet implemented with whatever
03:22string is generated by the Exception, 'e.' and use code completion, type t
03:29and then select toString.
03:31Let's create a person object.
03:33We'll add a GregorianCalendar.
03:35We get the same error decorators that we received when we created the Person Class.
03:39We'll remove those.
03:46We'll use some more code completion, type per Ctrl+Space, select person.s
03:55then setDob, for our parameter, we'll use old Ctrl+Space period (.) getTime.
04:04Now we'll call the person's object evaluateAge method, save the test case,
04:10open the context menu Run As>JUnit Test.
04:15We see the green bar and we know that the test case ran successfully to completion.
04:19You've seen a few examples of code completion, and their interaction with templates.
04:25This is a very rich source of productivity improvements within Eclipse.
Collapse this transcript
Exploring syntax checking
00:00In order to illustrate syntax checking in the Java Editor, I've taken the code
00:04from our previous Person Class and I've renamed it PersonWithErrors.
00:08As you can see if you look at the right gutter, there are many error markers.
00:13What we can do is we'll correct these one at a time and we'll show
00:17how the syntax errors are illustrated and what we can do to correct them.
00:20The first error that the editor finds for us is right here on line 8.
00:25The pop up says Date cannot be resolved to a type.
00:29If I click here I'm given the option to use an Import statement.
00:34I'll create the Import statement using java.util and we see import
00:38java.util.Date is now included in our code.
00:42If I highlight our next error, I'll come down to this statement on line 23.
00:46String literal is not properly closed by a double quote (").
00:50I'll add a closing double quote and I'll save the file
00:55and we still have an error indicator. What's the problem?
00:58Well, if I highlight it one more time, Syntax error, insert ";"
01:03to complete BlockStatement.
01:05If I add a semicolon (;), the error decorator goes away.
01:09If I go down to line 26, GregorianCalendar cannot be resolved to a type.
01:15This requires another import statement.
01:17I'll import GregorianCalendar from java.util.
01:20On line 28, calendar cannot be resolved to a variable.
01:25If I double click, Import 'Calendar' from java.util, I see that we have one more error.
01:31If dob, date of birth, equals 0,
01:36Type mismatch: cannot convert from Date to boolean, Type mismatch: cannot convert integer to Date.
01:42So the syntax checking editor features within the error are telling us
01:47that there's a problem, but it can't resolve the problem for us.
01:51In particular, if you look carefully what's happening is we're using an
01:55assignment statement and attempting to assign the value of 0 to date of birth,
02:00when really what we want to say if date of birth is equal to 0.
02:05If I rephrase this is as if null is equal to date of birth,
02:10the error indicator goes away.
02:12As a point of reference, I think it's always a good idea when you're doing
02:17a test between a constant such as null and a variable to place the constant
02:22on the left-hand side of the conditional operator.
02:26In some languages such as scripting languages and functional programming
02:30languages, it's syntactically correct to include an assignment statement
02:35within an if statement, that's the reason that you always want to include
02:40the constant on the left-hand side of the operator to avoid problems
02:44in these types of languages.
02:46The final thing that we see if we look in the right-hand gutter is a blue indicator.
02:51It's neither an error nor a warning.
02:54It's telling us that we've included a TODO here.
02:57If I replace the TODO indicator with an error message from the exception,
03:03the blue box in the right-hand gutter goes away.
Collapse this transcript
4. Search and Help
Searching in Eclipse
00:00As the size of your software projects grow, it might become difficult
00:03to remember all the locations for variables, methods and classes.
00:07The Eclipse internal search system is helpful in this situation.
00:11Suppose that you know that the word key is contained somewhere in your workspace.
00:14You can use the search system to find it.
00:17In this case select Search, select File Search, type the word that you want to use,
00:21key, and select Search.
00:24The results of your search are presented in the Search view.
00:28We can expand this by double-clicking.
00:30Let's navigate down to the Security folder through cipher and into
00:34the OneTimeKeyCipher program.
00:37Select one of the instances of key that was found by the search and display this.
00:42Note, that this is a text-based search, not a search based upon
00:46the internal structure of the Java code.
00:48We can verify this by noting that search found instances of the word key
00:53that are located within comments.
00:55In contrast with text-based search, we can use the Show In feature
00:59of the context menu to find variables, methods or classes within the Package Explorer.
01:04The internal structure of the code is displayed using this method.
01:08Suppose that we are interested in the veritable oneTimeKey.
01:12We can highlight this, use the context menu, select Show In and show it
01:18within the Package Explorer.
01:20In this case, rather than being a text-based search, this is based
01:24on the internal structure of the Java code.
01:26The C decorator indicates that this is a class.
01:30The red decorators indicate something that is private.
01:33Here we can select the method, for example, the init method and the cursor
01:38is positioned at the init method within the Java Editor.
01:42As we'll see in subsequent movies, the search feature is one way to navigate
01:46into Java code and learn more about the structure of your own Java programs.
Collapse this transcript
Getting help within Eclipse
00:00The help system is a useful tool for learning more about Eclipse.
00:04Here we see the Package Explorer. Suppose that you want to learn more
00:09about the Package Explorer.
00:11One option is to use the internal Help system, select Help Contents.
00:16Here you'll see a basic introduction to the Help system.
00:19If you're new to Eclipse, you will probably want to start
00:22with the Workbench User Guide.
00:24The next thing that you like to do is probably use the Getting Started section
00:28of the Workbench User Guide, and note that there's a Basic tutorial.
00:32In our case we are interested in learning about the Package Explorer so we can
00:36use the Search function.
00:37You'll see that you received 81 matches.
00:41If you navigate to the first link, you'll receive basic information
00:46about the Package Explorer.
00:48The Help system is a great resource for learning about Eclipse.
00:51You can read the guides and tutorials to investigate fundamental information
00:56or you can use the search feature to find specific information.
Collapse this transcript
Using the community forums
00:00A great resource for learning about Eclipse is the community forums.
00:04In particular, I recommend the newcomer forums.
00:07You can access the forums by pointing your browser to eclipse.org/forums.
00:13In particular, I recommend the Newcomers forum.
00:17If you navigate down through the forums, you'll see one listed New forum members,
00:21READ THIS FIRST.
00:23Of course, I'm going to recommend that you read this forum posting.
00:27Many beginners, intermediate and advanced Eclipse users follow the Newcomer forum.
00:31If you post a question to this forum, you will probably receive a reply
00:34relatively quickly.
00:37Remember to be courteous and patient, the responders are Eclipse users just like you.
Collapse this transcript
5. Additional Tools
Extending Eclipse with bundles and plugins
00:00There are many opportunities to extend Eclipse;
00:03some of these are shown in the Eclipse Marketplace.
00:06The URL for the marketplace is marketplace.eclipse.org.
00:12Technically, when you extend Eclipse, you're bringing new bundles into Eclipse.
00:16Fortunately, you don't have to do this manually because Eclipse uses
00:21Update Sites to manage new bundles.
00:23Just a note on terminology:
00:25modern versions of Eclipse are composed of OSGi bundles.
00:28Older versions of Eclipse were composed of modules called plug-ins.
00:33In modern versions of Eclipse, the word plug-in refers to an OSGi bundle.
00:38In the following movies, I'll show you how to use update sites to extend Eclipse
00:43with Apache Maven and with WindowBuilder.
00:45Then I'll show you how to add support for git, a popular software
00:49version control system.
00:50I encourage you to look at the Marketplace to get a sense of what's available
00:54and to see if there are any features that you would like to incorporate
00:58into your versions of Eclipse.
Collapse this transcript
Extending Eclipse with Apache Maven
00:00This movie shows the Apache Maven software project management tool.
00:04The homepage for Maven is maven.apache.org.
00:09To learn more about Maven, navigate to User Center using the link
00:13in the documentation section of the home page.
00:15This page has download information, a five-minute test and a Getting Started tutorial.
00:21Note that the information on this page pertains to the command line version of Maven.
00:25You can also use the information for the user interface version of Maven
00:29that we'll see in Eclipse.
00:30Now we'll prepare to integrate Maven into Eclipse. Point your browser to this URL,
00:36look at this Update Site and copy it from your browser, return to Eclipse.
00:42We'll use the Help menu to integrate new software into Eclipse.
00:48Select Install New Software and we'll want to add an Update Site.
00:53Click the Add button, now paste that link here, select OK.
00:58Once this line appears, select the entire group for installation,
01:03press Next, press Next once more, accept the terms of the license agreement and press Finish.
01:09When prompted to restart Eclipse, select Yes.
01:13At this point, you can look at the integration information for Maven,
01:17close the Welcome screen and we're back to the Java Perspective.
01:21I'll use a Maven wizard to create a new Maven project.
01:25We'll take the default information which is a maven-archetype-quickstart.
01:32For the Group Id, use information that refers to yourself or your organization.
01:37For the Artifact Id, let's use MyFirstMaven, press Finish.
01:44Expand the project and double-click on the pom file, you'll see the information
01:48that we typed in the wizard.
01:50A pom file is really just an XML file.
01:53If you'd like to view the source for this XML, you can use the pom.xml tab.
01:58We can go back to the Overview.
02:00Notice the folders that have been created.
02:03Maven creates a source/maven/java folder and a source/test Java folder
02:09within one project.
02:10This is a different strategy and that which we used in the JUnit movie
02:15where we created separate projects for source code and for test code.
02:19Expand the src/main/java folder, expand the Package.
02:24You'll see App.java which was created by Maven.
02:27Double-click you'll see it's a variation of our Hello World program.
02:32If you try to expand the target folder in the Package Explorer, you'll see
02:36that it doesn't contain any information.
02:38Now select the project, choose Run As and Maven test.
02:44In the Console window, you'll see that we ran one test,
02:48there were 0 failures and 0 errors.
02:50If you expand the Target folder, you'll see there are reports now.
02:54If you double-click on the test, the JUnit view opens and you'll see that
02:59the test ran correctly.
03:01Once again select the project, use the context menu, select Run As>Install.
03:07Expand the Console and you'll see what Maven did for us.
03:12In particular, it ran the compiler and it created a JAR file.
03:17It placed the new JAR file into the target folder.
03:20The JAR file contains the binary byte code version of our app class.
03:25Maven is a powerful project management tool that is used by many professional
03:29software engineering teams.
03:31If you decide to work with teams that build Eclipse plug-ins
03:35or large systems built with Java, you'll probably encounter Maven.
Collapse this transcript
Extending Eclipse with WindowBuilder
00:00At some point you may decide to build your own digital tools based
00:03upon the Eclipse platform.
00:05A significant part of the effort for building tools is building the user interface.
00:09The main components within Eclipse user interfaces are SWT and JFace.
00:15You could choose to develop your UI using Java code to make calls to the SWT
00:19and JFace libraries or you could use a GUI builder such as Window Builder.
00:25Window Builder was originally a commercial proprietary project.
00:28Google purchased the company that developed WindowBuilder, then released it
00:32under an open-source free license.
00:35WindowBuilder is not preinstalled in the 4.2 version of Eclipse Classic
00:39that we're using in this movie.
00:41What we'll do is we'll use an Update Site to integrate WindowBuilder into
00:45this version of Eclipse.
00:47Point your browser to this page.
00:49It's the Update Site for WindowBuilder within Eclipse.
00:52Since we're using the 4.2 version of Juno, press this link.
00:57The page is blank, but the URL contains the Update Site, copy this information,
01:02return to Eclipse, use the Help menu, Install New Software,
01:08add an Update Site, press OK.
01:12Select the components that you'd like to install.
01:14If you want to, you can include the Swing Designer, we'll use SWT Designer
01:19and the WindowBuilder Engine.
01:21Select Next, select Next again, agree to the license terms, press Finish.
01:27When prompted to restart Eclipse, press Yes.
01:30Now the first thing that we'll do is create a WindowBuilder project.
01:36Name the project, expand the project, go to the source file and create a Package.
01:48Within the Package, we'll create a form using the GUI builder, expand SWT Designer,
01:54expand Forms and select FormPage, give the page a name and select Finish.
02:01Here you'll see the source code that was generated by WindowBuilder. Not too exciting.
02:06What we want to do is navigate to the Design tab.
02:10Here you see our empty FormPage, select Composite and paste a composite
02:16onto the empty FormPage, select a layout and place the layout within the composite, say Yes.
02:22Now select the component, select the Check box, place the Check box, rename it,
02:29use the context menu to Test Preview.
02:32As you can see, you can check and uncheck the button, close the preview.
02:36The interesting thing at this point is to look at the source code.
02:39Here you can see the source code that was generated for you.
02:43As you can probably guess, it's much easier to use the GUI to drag and drop
02:47than it is to write the source code to do the GUI development.
02:51WindowBuilder has an excellent form.
02:54Eric Clayberg, the original developer of WindowBuilder, is an active member in this forum.
02:59He and the other members of the forum will be happy to answer your questions.
Collapse this transcript
Extending Eclipse with EGit for source control
00:00Software development teams rely upon code repositories.
00:04I'll show you how to install the EGit package into Eclipse.
00:07This package provides a user interface within Eclipse for using git.
00:11To install it, I'll use the link on the Projects page and I'll copy this link.
00:16I'll return to Eclipse, go to the Help menu, choose Install New Software
00:23and then click Add, paste the location, click OK and now we'll add both packages,
00:30click Next, click Next again, accept the license agreement and click Finish.
00:35You'll be prompted to restart, select Yes. You may see warning dialogues
00:41as you go through the installation process.
00:43If git is not configured on your system, you can ignore these messages for now.
00:48After you restart Eclipse, you can say Window>Open Perspective>Other
00:55and choose Git Repository Exploring.
00:58This Perspective shows you some of the tools and options
01:01that are available within git.
01:03Configuring a git repository is beyond the scope of this course,
01:07but for more information about git, you can look at Git Essential Training
01:11with Kevin Skoglund here in lynda.com Online Training Library.
01:15I encourage you to explore the EGit documentation for more information as well,
01:19and if you're curious about other kinds of source control systems,
01:23see Fundamentals of Software Version Control with Michael Lehman here in the
01:27lynda.com Online Training Library.
Collapse this transcript
Conclusion
Goodbye
00:00I hope that you have enjoyed this overview of Eclipse integrated
00:03development environments.
00:05Eclipse supports many languages including Java, JavaScript, C and C++ and PHP.
00:11lynda.com has courses for each of these languages.
00:14Depending upon your language preferences, you can use
00:18Java Essential Training with David Gassner, JavaScript Essential Training with Simon Allardice,
00:24C/C++ Essential Training with Bill Weinman, or PHP with MySQL Essential Training with Kevin Skoglund.
00:30Eclipse supports development for Web servers, application servers, and mobile devices.
00:35lynda.com also has courses of these topics such as Installing Apache, MySQL
00:41and PHP with David Gassner, Up and Running with Aptana Studio 3 with Joe Marini,
00:47Titanium Mobile App Development Essential Training with Rafael Hernandez,
00:52Flash Builder 4 and Flex 4 Essential Training with David Gassner, ColdFusion Builder
00:57Essential Training within Daniel Short.
00:59Thanks very much for watching.
01:01This is Charles Kelly saying goodbye.
Collapse this transcript


Suggested courses to watch next:

Java Essential Training (7h 17m)
David Gassner


JavaScript Essential Training (5h 31m)
Simon Allardice


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 104,141 instructional videos.

get started learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 2,025 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked