Book Image

Eclipse Plug-in Development Beginner's Guide - Second Edition

By : Alex Blewitt
Book Image

Eclipse Plug-in Development Beginner's Guide - Second Edition

By: Alex Blewitt

Overview of this book

Eclipse is used by everyone from indie devs to NASA engineers. Its popularity is underpinned by its impressive plug-in ecosystem, which allows it to be extended to meet the needs of whoever is using it. This book shows you how to take full advantage of the Eclipse IDE by building your own useful plug-ins from start to finish. Taking you through the complete process of plug-in development, from packaging to automated testing and deployment, this book is a direct route to quicker, cleaner Java development. It may be for beginners, but we're confident that you'll develop new skills quickly. Pretty soon you'll feel like an expert, in complete control of your IDE. Don't let Eclipse define you - extend it with the plug-ins you need today for smarter, happier, and more effective development.
Table of Contents (24 chapters)
Eclipse Plug-in Development Beginner's Guide Second Edition
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – modifying the platform


Once the location of interest has been found, it is necessary to modify the code to attempt a fix. For example, if the developer wanted to ensure that the window's title was all in upper case, it would be necessary to inject a title.toUpperCase() call. However, since the .class file is read-only, it is necessary to import the plug-in's source into the workspace to change the implementation.

  1. Using the Window | Show View | Other… menu or the Quick Access box, open the Plug-ins view from the Plug-in Development category. This will show a list of all plug-ins installed into the system.

  2. Type org.eclipse.swt to scroll down the list, and select both the org.eclipse.swt bundle and the org.eclipse.swt.* fragment that corresponds to the platform. For example, on macOS this will start with org.eclipse.swt.cocoa, while on Windows it will start with org.eclipse.swt.win32; and on Linux, org.eclipse.swt.gtk:

  3. Right-click on the selected items and choose Import As |...