Preface

The first version of Eclipse was released in the November of 2001. Since then, it has come a long way in terms of enhancements and number of users. Due to the many improvements it has undergone, over time Eclipse has become popular and received a great deal of praise. Nowadays, Eclipse is arguably the most widely used integrated development environment (IDE) for developing Java applications. It is free and open source, and is shipped with plugins for performing lots of software-development-related activities. In addition, more plugins can be easily downloaded and installed according to your personal needs and preferences. Another plus is that, since Eclipse is written mostly in Java, it is cross-platform.

If you have been using Java without the help of an IDE, you must have realized by now that Java can be rough and unnerving at times. Most of the time, the compiler (javac) does not display helpful error messages. Even something as simple as an omitted semicolon may cause it to display a lengthy list of error messages. Inside an IDE, this sort of problem can be spotted before you try to run the program. An IDE can even suggest solutions before you start scratching your head. Undoubtedly, using a full-fledged IDE provides a range of benefits. For instance, an IDE provides autocompletion of your code, it helps you to format your code properly, and some of them come with nifty plugins for testing, debugging, and keeping track of the changes that you make to your code.

However, despite all the benefits involved in using an IDE, let's be upfront; learning how to use one of these high-end development tools is no bed of roses. IDEs have a steep learning curve, which means that mastering such a tool usually takes time and effort. To make matters worse, sometimes, many developers try to learn a new programming language and an IDE in tandem.

This book will help you to overcome Eclipse's steep learning curve. After reading this book, you will be grounded in performing many development activities using Eclipse.

What this book covers

In this book, we cover Eclipse Juno that is, at of the time of this writing, the latest stable version of the IDE (it was released in June 2012). The book starts off by showing how to perform the most basic activities related to implementing Java applications (such as creating and organizing Java projects, refactoring, and setting launch configurations), working up to more sophisticated topics as testing, web development, GUI programming, and extending Eclipse's editors to suit your needs.

This book takes a hands-on approach, diving straight into using Eclipse without getting you bogged down in technical details. Here are some of the topics covered in this book:

  • Effectively using Eclipse to write Java code
  • Integrating JUnit 4 into Eclipse, develop, and run JUnit-based test methods
  • Managing your project using the version control system Git/EGit
  • Developing GUI applications using SWT
  • Advanced GUI development with examples
  • Using Eclipse WTP plugin to develop and deploy web-based Java applications
  • Extending Eclipse by developing new editors, views, and contributing to existing elements of the IDE

Chapter 1, Introduction, covers how to get started with Eclipse. It goes from how to get Eclipse up and running to a brief overview of the new and noteworthy features of Eclipse Juno.

Chapter 2, Java Development, covers basic Java development using Eclipse. To beginners, Eclipse can be quite intimidating. The main window contains lots of smaller windows and some of the smaller windows have a bunch of buttons and drop-down menus. This chapter is all about getting to know the main features of Eclipse for developing Java programs. We will go through all the steps to get you going from creating Java projects, detailing the Eclipse views used for Java development, Java code generation, to building and running Java projects, which involves setting up launch configurations. Also, we cover some refactorings, so that you will be able to improve your Java code – as you tackle more complicated projects will you see that refactoring is a very important aspect of Java development.

Chapter 3, Unit Testing with JUnit and Debugging, introduces JUnit, the most widely used framework for implementing unit tests in Java. You will learn how to set JUnit up so that it can be used in conjunction with Eclipse. In addition, this chapter describes the creation of test methods using JUnit's annotations. As you will see, annotations can also be used to inform JUnit when to skip a particular test method and whether or not a given method is expected to throw an exception. The chapter wraps up with an introduction on how to use Eclipse's debugger to pinpoint tough to find problems in your code.

Chapter 4, Version Control Systems, explains using Eclipse in conjunction with version control systems. When working on a complex software project (or one that involves more than one person), you need to use a tool that manages and tracks different version of the software project in question. This book covers CVS, SVN, and Git, and how to use it inside Eclipse through native and external plugins. After reading this chapter, you will be able to use them inside Eclipse to support collaborative development.

Chapter 5, SWT, covers graphical user interface (GUI) development with the Standard Widget Toolkit (SWT). This chapter introduces the most basic widgets as, for example, buttons, labels, and combos. In a way, this chapter lays the foundation for Chapter 6, More SWT.

Chapter 6, More SWT, builds on top of the previous chapter, showing how to make more appealing GUIs by introducing advanced widgets as, for example, toolbars and tables. This chapter also features a full-blown example.

Chapter 7, Web Development Using Eclipse WTP, is concerned with using Eclipse to develop basic web applications. Throughout this chapter we show how Eclipse, along with a set of plugins called Web Tools Platform (WTP), can be used to support the development of web applications that are based on two basic web technologies, namely, servlets and JavaServer Pages (JSP).

Chapter 8, Eclipse Development, covers a more advanced topic: extending Eclipse. You will learn how Eclipse's architecture is organized. Further, by reading this chapter, you will see how extension points can be harnessed in order to create your own plugin, editor, or even extend a particular view.

Chapter 9, Eclipse Rich Client Platform, shows how you can leverage what you have learned in the previous chapter to develop your own rich client application using the Eclipse Rich Client Platform. By creating a sample application, you will learn how to add views, menus, and panels, as well as make them interact with each other. We will also cover how to brand and package your application, allowing you to build a fully functional, cross-platform application using the Eclipse platform.

Appendix, Keyboard Shortcuts, contains all keyboard shortcuts presented throughout the book, plus other useful ones that can greatly improve your productivity with Eclipse.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset