Book Image

Eclipse 4 Plug-in Development by Example : Beginner's Guide

By : Dr Alex Blewitt
Book Image

Eclipse 4 Plug-in Development by Example : Beginner's Guide

By: Dr Alex Blewitt

Overview of this book

<p>As a highly extensible platform, Eclipse is used by everyone from independent software developers to NASA. Key to this is Eclipse’s plug-in ecosystem, which allows applications to be developed in a modular architecture and extended through its use of plug-ins and features.<br /><br />"Eclipse 4 Plug-in Development by Example Beginner's Guide" takes the reader through the full journey of plug-in development, starting with an introduction to Eclipse plug-ins, continued through packaging and culminating in automated testing and deployment. The example code provides simple snippets which can be developed and extended to get you going quickly.</p> <p>This book covers basics of plug-in development, creating user interfaces with both SWT and JFace, and interacting with the user and execution of long-running tasks in the background.</p> <p>Example-based tasks such as creating and working with preferences and advanced tasks such as well as working with Eclipse’s files and resources. A specific chapter on the differences between Eclipse 3.x and Eclipse 4.x presents a detailed view of the changes needed by applications and plug-ins upgrading to the new model. Finally, the book concludes on how to package plug-ins into update sites, and build and test them automatically.</p>
Table of Contents (19 chapters)
Eclipse 4 Plug-in Development by Example Beginner's Guide
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating a view


The Eclipse UI consists of multiple views, which are the rectangular areas that display content such as the Outline, Console, or Package Explorer. In Eclipse 3.x, views are created by adding an extension point to an existing plug-in, or by using a template. A clock.ui plug-in will be created to host the clock widgets and views.

  1. Open the plug-in wizard by navigating to File | New | Other | Plug-in Project. Enter the details as follows:

    • Project name: com.packtpub.e4.clock.ui

    • Select the checkbox for Use default location

    • Select the checkbox for Create a Java project

    • Target Eclipse Version: 3.5 or greater

  2. Click on Next again, and fill in the plug-in properties:

    • ID: com.packtpub.e4.clock.ui

    • Version: 1.0.0.qualifier

    • Name: Clock

    • Vendor: PacktPub

    • Select the checkbox for Generate an Activator

    • Activator: com.packtpub.e4.clock.ui.Activator

    • Select the checkbox for This plug-in will make contributions to the UI

    • Rich client application: No

  3. Click on Next to choose...