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 – creating a tree viewer


As with the previous chapter, a new TimeZoneTreeView class will be created using the plugin.xml editor, as an E4 view. This will show time zones, organized hierarchically by region.

  1. Right-click on the com.packtpub.e4.clock.ui project and navigate to Plug-in Tools | Open Manifest if it's not open already.

  2. Open the Extensions tab and go to the org.eclipse.ui.views entry. Right-click on this, navigate to New | e4view, and fill in the following:

    1. ID: com.packtpub.e4.clock.ui.views.TimeZoneTreeView

    2. Name: Time Zone Tree View

    3. Class: com.packtpub.e4.clock.ui.views.TimeZoneTreeView

    4. Category: com.packtpub.e4.clock.ui

    5. Icon: icons/sample.gif

  3. An entry is created in the plugin.xml file that looks like:

    <e4view
      category="com.packtpub.e4.clock.ui"
      class="com.packtpub.e4.clock.ui.views.TimeZoneTreeView"
      icon="icons/sample.gif"
      id="com.packtpub.e4.clock.ui.views.TimeZoneTreeView"
      name="Time Zone Tree View"
      restorable="true">
    </e4view>
  4. On the...