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

Develop skills to build powerful plug-ins with Eclipse IDE through examples

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

By Example
Dr Alex Blewitt

3 customer reviews
Develop skills to build powerful plug-ins with Eclipse IDE through examples
$39.99
$49.99
RRP $39.99
RRP $49.99
eBook
Print + eBook

Instantly access this course right now and get the skills you need in 2017

With unlimited access to a constantly growing library of over 4,000 eBooks and Videos, a subscription to Mapt gives you everything you need to learn new skills. Cancel anytime.

Preview in Mapt

Book Details

ISBN 139781783980697
Paperback458 pages

Book Description

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

Chapter 1: Creating Your First Plug-in
Getting started
Time for action – setting up the Eclipse environment
Time for action – creating a plug-in
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 the debugger
Time for action – setting up step filtering
Time for action – breaking at method entry and exit
Time for action – setting a conditional breakpoint
Time for action – catching exceptions
Time for action – inspecting and watching variables
Summary
Chapter 2: 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 seconds 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
Chapter 3: Creating JFace Viewers
Why JFace?
Creating TreeViewers
Time for action – creating a tree viewer
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
Time for action – adding a double-click listener
Tabular data
Time for action – viewing time zones in tables
Selection
Time for action – propagating selection
Time for action – responding to selection changes
Summary
Chapter 4: Interacting with the User
Creating menus, commands, and handlers
Time for action – installing the E4 tools
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 menus items
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 sub-progress monitors
Time for action – using null progress monitors and sub monitors
Time for action – setting job properties
Reporting errors
Time for action – showing errors
Summary
Chapter 5: Working with Preferences
Eclipse Preferences
Time for action – persisting a value
Time for action – injecting preferences
Time for action – injecting individual preferences
Time for action – responding to preference changes
Preference pages
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 – aligning field editors with a grid
Time for action – placing the preferences page
Time for action: using other field editors
Time for action – searching for preferences
Summary
Chapter 6: 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 file is empty
Time for action – registering a marker type
Summary
Chapter 7: Creating Eclipse 4 Applications
Time for action – installing E4 tooling
Time for action – creating an E4 application
Time for action – creating a part
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 – interacting with the UI
Using commands, handlers, and menu items
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
Chapter 8: Migrating to Eclipse 4.x
Why Eclipse 4.x?
Time for action – creating a migration component
Time for action – updating to e4view
Time for action – upgrading the actions
Time for action – creating toolbars
Time for action – adding the view menu
Time for action – adding the pop-up
Migrating to Eclipse 4.x patterns
Time for action – creating a model fragment
Time for action – migrating the commands and handlers
Time for action – creating the view menu
Time for action – defining the pop-up view in the fragment
Summary
Chapter 9: Styling Eclipse 4 Applications
Styling Eclipse with CSS
Time for action – styling the UI with CSS
Time for action – using custom CSS classes
Using the Eclipse spies
Time for action – using the CSS Spy
Time for action – integrating the spy into a product
Styling a custom widget
Time for action – adding the clock
Time for action – using a CSS property
Time for action – going to the dark side
Time for action – adding themes
Time for action – switching between themes
Summary
Chapter 10: 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
Target platforms
Time for action – creating a target definition
Time for action – switching to a specific version
Summary
Chapter 11: Automated Testing of Plug-ins
Using JUnit for automated testing
Time for action – adding dependencies to the target platform
Time for action – writing a simple JUnit 4 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
Chapter 12: 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
Time for action – using the target platform
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
Chapter 13: Contributing to Eclipse
Open source contributions
Time for action – installing the sources
Time for action – debugging the platform
Time for action – modifying the platform
Time for action – checking out from EGit and Git
Time for action – configuring the SWT project
Contributing to Eclipse
Time for action – creating an account at Eclipse
Time for action – creating a bug
Time for action – setting up a Gerrit profile
Time for action – committing and pushing a patch
Summary

What You Will Learn

  • Create plug-ins for Eclipse 4.x
  • Test plug-ins automatically with JUnit
  • Display tree and table information in views
  • Upgrade Eclipse 3.x plug-ins to Eclipse 4.x
  • Find out how to build user interfaces from SWT and JFace
  • Run tasks in the background and update the user interface asynchronously
  • Automate builds of plug-ins and features
  • Automate user interface tests with SWTBot

Authors

Table of Contents

Chapter 1: Creating Your First Plug-in
Getting started
Time for action – setting up the Eclipse environment
Time for action – creating a plug-in
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 the debugger
Time for action – setting up step filtering
Time for action – breaking at method entry and exit
Time for action – setting a conditional breakpoint
Time for action – catching exceptions
Time for action – inspecting and watching variables
Summary
Chapter 2: 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 seconds 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
Chapter 3: Creating JFace Viewers
Why JFace?
Creating TreeViewers
Time for action – creating a tree viewer
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
Time for action – adding a double-click listener
Tabular data
Time for action – viewing time zones in tables
Selection
Time for action – propagating selection
Time for action – responding to selection changes
Summary
Chapter 4: Interacting with the User
Creating menus, commands, and handlers
Time for action – installing the E4 tools
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 menus items
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 sub-progress monitors
Time for action – using null progress monitors and sub monitors
Time for action – setting job properties
Reporting errors
Time for action – showing errors
Summary
Chapter 5: Working with Preferences
Eclipse Preferences
Time for action – persisting a value
Time for action – injecting preferences
Time for action – injecting individual preferences
Time for action – responding to preference changes
Preference pages
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 – aligning field editors with a grid
Time for action – placing the preferences page
Time for action: using other field editors
Time for action – searching for preferences
Summary
Chapter 6: 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 file is empty
Time for action – registering a marker type
Summary
Chapter 7: Creating Eclipse 4 Applications
Time for action – installing E4 tooling
Time for action – creating an E4 application
Time for action – creating a part
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 – interacting with the UI
Using commands, handlers, and menu items
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
Chapter 8: Migrating to Eclipse 4.x
Why Eclipse 4.x?
Time for action – creating a migration component
Time for action – updating to e4view
Time for action – upgrading the actions
Time for action – creating toolbars
Time for action – adding the view menu
Time for action – adding the pop-up
Migrating to Eclipse 4.x patterns
Time for action – creating a model fragment
Time for action – migrating the commands and handlers
Time for action – creating the view menu
Time for action – defining the pop-up view in the fragment
Summary
Chapter 9: Styling Eclipse 4 Applications
Styling Eclipse with CSS
Time for action – styling the UI with CSS
Time for action – using custom CSS classes
Using the Eclipse spies
Time for action – using the CSS Spy
Time for action – integrating the spy into a product
Styling a custom widget
Time for action – adding the clock
Time for action – using a CSS property
Time for action – going to the dark side
Time for action – adding themes
Time for action – switching between themes
Summary
Chapter 10: 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
Target platforms
Time for action – creating a target definition
Time for action – switching to a specific version
Summary
Chapter 11: Automated Testing of Plug-ins
Using JUnit for automated testing
Time for action – adding dependencies to the target platform
Time for action – writing a simple JUnit 4 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
Chapter 12: 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
Time for action – using the target platform
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
Chapter 13: Contributing to Eclipse
Open source contributions
Time for action – installing the sources
Time for action – debugging the platform
Time for action – modifying the platform
Time for action – checking out from EGit and Git
Time for action – configuring the SWT project
Contributing to Eclipse
Time for action – creating an account at Eclipse
Time for action – creating a bug
Time for action – setting up a Gerrit profile
Time for action – committing and pushing a patch
Summary

Book Details

ISBN 139781783980697
Paperback458 pages
Read More
From 3 reviews

Read More Reviews