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

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

Credits

About the Author

Acknowledgement

About the Reviewers

www.PacktPub.com

Preface

Creating Your First Plug-in

Getting started

Time for action – setting up the Eclipse SDK environment

Creating your first plug-in

Time for action – creating a plug-in

Running plug-ins

Time for action – launching Eclipse from within Eclipse

Debugging a plug-in

Time for action – debugging a plug-in

Time for action – updating code in debugger

Debugging with step filters

Time for action – setting up step filtering

Using different breakpoint types

Time for action – breaking at method entry and exit

Using conditional breakpoints

Time for action – setting a conditional breakpoint

Using exceptional breakpoints

Time for action – catching exceptions

Time for action – using watch variables and expressions

Summary

Creating Views with SWT

Creating views and widgets

Time for action – creating a view

Time for action – drawing a custom view

Time for action – drawing a second hand

Time for action – animating the second hand

Time for action – running on the UI thread

Time for action – creating a reusable widget

Time for action – using layouts

Managing resources

Time for action – getting colorful

Time for action – finding the leak

Time for action – plugging the leak

Interacting with the user

Time for action – getting in focus

Time for action – responding to input

Using other SWT widgets

Time for action – adding items to the tray

Time for action – responding to the user

Time for action – modal and other effects

Time for action – groups and tab folders

Summary

Creating JFace Viewers

Why JFace?

Creating TreeViewers

Time for action – creating a TreeViewer

Time for action – using Images in JFace

Time for action – styling label providers

Sorting and filtering

Time for action – sorting items in a viewer

Time for action – filtering items in a viewer

Interaction and properties

Time for action – adding a double-click listener

Time for action – showing properties

Tabular data

Time for action – viewing time zones in tables

Time for action – syncing selection

Summary

Interacting with the User

Creating actions, commands, and handlers

Time for action – adding context menus

Time for action – creating commands and handlers

Time for action – binding commands to keys

Time for action – changing contexts

Time for action – enabling and disabling the menu's items

Time for action – reusing expressions

Time for action – contributing commands to pop-up menus

Jobs and progress

Time for action – running operations in the background

Time for action – reporting progress

Time for action – dealing with cancellation

Time for action – using subtasks and subprogress monitors

Time for action – using null progress monitors and submonitors

Time for action – setting job properties

Reporting errors

Time for action – showing errors

Summary

Storing Preferences and Settings

Storing preferences

Time for action – persisting a value

Time for action – creating a preference page

Time for action – creating warning and error messages

Time for action – choosing from a list

Time for action – using a grid

Time for action – placing the preferences page

Time for action – using other field editors

Time for action – adding keywords

Time for action: using IEclipsePreferences

Using IMemento and DialogSettings

Time for action – adding a memento for the Time Zone View

Time for action – using DialogSettings

Summary

Working with Resources

Using the workspace and resources

Time for action – creating an editor

Time for action – writing the markup parser

Time for action – building the builder

Time for action – iterating through resources

Time for action – creating resources

Time for action – implementing incremental builds

Time for action – handling deletion

Using natures

Time for action – creating a nature

Using markers

Time for action – error markers if the file is empty

Time for action – registering a marker type

Summary

Understanding the Eclipse 4 Model

Working with the Eclipse 4 model

Time for action – installing E4 tooling

Time for action – creating an E4 application

Time for action – creating a part

Time for action – styling the UI with CSS

Using services and contexts

Time for action – adding logging

Time for action – getting the window

Time for action – obtaining the selection

Time for action – dealing with events

Time for action – calculating values on demand

Time for action – using preferences

Time for action – interacting with the UI

Using Commands, Handlers, and MenuItems

Time for action – wiring a menu to a command with a handler

Time for action – passing command parameters

Time for action – creating a direct menu and keybindings

Time for action – creating a pop-up menu and a view menu

Creating custom injectable classes

Time for action – creating a simple service

Time for action – injecting subtypes

Summary

Creating Features, Update Sites, Applications, and Products

Grouping plug-ins with features

Time for action – creating a feature

Time for action – exporting a feature

Time for action – installing a feature

Time for action – categorizing the update site

Time for action – depending on other features

Time for action – branding features

Building applications and products

Time for action – creating a headless application

Time for action – creating a product

Summary

Automated Testing of Plug-ins

Using JUnit for automated testing

Time for action – writing a simple JUnit test case

Time for action – writing a plug-in test

Using SWTBot for user interface testing

Time for action – writing an SWTBot test

Time for action – working with menus

Working with SWTBot

Time for action – hiding the welcome screen

Time for action – avoiding SWTBot runtime errors

Working with views

Time for action – showing views

Time for action – interrogating views

Interacting with the UI

Time for action – getting values from the UI

Time for action – waiting for a condition

Summary

Automated Builds with Tycho

Using Maven to build Eclipse plug-ins with Tycho

Time for action – installing Maven

Time for action – building with Tycho

Building features and update sites with Tycho

Time for action – creating a parent project

Time for action – building a feature

Time for action – building an update site

Time for action – building a product

Testing and releasing

Time for action – running automated tests

Time for action – changing the version numbers

Signing update sites

Time for action – creating a self-signed certificate

Time for action – signing the plug-ins

Time for action – serving an update site

Summary

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Index