Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Eclipse Plug-in Development
Mastering Eclipse Plug-in Development

Mastering Eclipse Plug-in Development: Build modular applications on Eclipse by defining custom extension points and using OSGi services

Arrow left icon
Profile Icon Alex Blewitt Profile Icon Bandlem Limited
Arrow right icon
€8.99 €32.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (1 Ratings)
eBook Aug 2014 362 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Alex Blewitt Profile Icon Bandlem Limited
Arrow right icon
€8.99 €32.99
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (1 Ratings)
eBook Aug 2014 362 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering Eclipse Plug-in Development

Chapter 2. Creating Custom Extension Points

Eclipse is extended through the use of extension points and the extension registry. The registry manages a list of extension points and a list of extensions. Although it is commonly used in OSGi runtimes such as Eclipse, the extension registry can be used outside of an OSGi runtime as well.

Extensions and extension points


The first thing to understand in the registry is the terminology. An extension is a contributed functionality that is often found in the plugin.xml file as an <extension> element. The extension itself provides some configuration or customization that can be processed appropriately. An extension is like a USB device, such as a mouse or keyboard. For example, the new feed wizard was added as an extension in the previous chapter:

<extension point="org.eclipse.ui.newWizards">
  <category name="Feeds" id="com.packtpub.e4.advanced.feeds.ui.category"/>
</extension>

An extension point defines the contract of an extension, along with any required arguments or attributes that an extension must provide. An extension point is like a USB hub that allows extensions (USB devices) to be plugged in. For example, the newWizards extension point is defined in the plugin.xml file of the org.eclipse.ui plug-in as follows:

<extension-point id="newWizards...

Summary


In this chapter, we looked at the Eclipse extension registry and how it can be used by programs to load extensions, as well as how to define extension points for others to extend. We learned how to sort elements in a way that does not rely on the order of the data in the plugin.xml files and how to perform simple definitions and validations with the associated schema.

The extension registry can also be used to customize different instances of extensions, and we looked at both of the ways in which this is done in Eclipse—with executable extensions and with extension factories (for classes whose inheritance hierarchy cannot be modified).

Finally, we looked at how the registry can be used outside of an OSGi runtime, which permits application code to be well behaved both inside and outside of OSGi.

In the next chapter, we will look at how similar extensions can be achieved with OSGi services.

Left arrow icon Right arrow icon

Description

Mastering Eclipse Plug-in Development shows you how to build an extensible application using custom extension points and dynamic OSGi services in Eclipse. Dynamic design patterns such as whiteboard and extender are covered along with specific techniques to deal with native and legacy code. This book dives right into the details and teaches you how to define new JFace wizards and extend Eclipse with custom extension points. Then the book moves quickly on to the details of how to define new commands for the Eclipse console and how to include native code in a plug-in. You will engage with modular application design patterns and Thread Context ClassLoaders before getting the details on how to create as well as manage P2 sites and write help documentation for an Eclipse plug-in.

What you will learn

  • Create a custom extension point to allow other plugins to contribute
  • Employ Declarative Services and Blueprint for dynamic OSGi contributions
  • Extend the Common Navigator Framework to provide nested content
  • Build commands to extend the builtin Gogo shell
  • Use fragments to contribute native code to plugins
  • Fix code using the service loader and wrap nonOSGifriendly JARs
  • Discover how to build modular applications with decoupled design patterns

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 26, 2014
Length: 362 pages
Edition : 1st
Language : English
ISBN-13 : 9781783287802
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 26, 2014
Length: 362 pages
Edition : 1st
Language : English
ISBN-13 : 9781783287802
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 83.98
Eclipse Plug-in Development Beginner's Guide
€41.99
Mastering Eclipse Plug-in Development
€41.99
Total 83.98 Stars icon
Banner background image

Table of Contents

10 Chapters
Plugging in to JFace and the Common Navigator Framework Chevron down icon Chevron up icon
Creating Custom Extension Points Chevron down icon Chevron up icon
Using OSGi Services to Dynamically Wire Applications Chevron down icon Chevron up icon
Using the Gogo Shell and Commands Chevron down icon Chevron up icon
Native Code and Fragment Bundles Chevron down icon Chevron up icon
Understanding ClassLoaders Chevron down icon Chevron up icon
Designing Modular Applications Chevron down icon Chevron up icon
Event-driven Applications with EventAdmin Chevron down icon Chevron up icon
Deploying and Updating with P2 Chevron down icon Chevron up icon
User Assistance in Eclipse Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(1 Ratings)
5 star 0%
4 star 100%
3 star 0%
2 star 0%
1 star 0%
W Boudville Dec 07, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Hmm. The book came out in August 2014. Strange that no reviews have been posted by now (Dec 2014), so I will try to remedy the situation.Eclipse is perhaps the most common development environment for java programming. Blewitt shows the latest developments in its support for adding plug-ins. A good aspect of the book is that it jumps right in. You are expected to be already using Eclipse and hopefully have written some prior plug-ins.Chapter 2 has a long discussion about how the classpath is used. As a practical matter, complexity and bugs can arise from problems with the elements (jar files) listed in the classpath. This is not restricted to programming with Eclipse. But the chapter delves into the details of, for example, the loading of all extensions via the classpath. To this ends, you might also check out chapter 6, which is a companion description of class loaders. Historically, this was the crucial idea that drove the very successful use of java inside enterprise computing on the Internet in the dot com years. You can now see here what the latest features of the class loader can do for your code.The text also goes into OSGi services and runtime. For dynamically hooking up your executable to existing services.Another useful feature is the Gogo shell and a console view, where the latter comes with Eclipse. Likely, you have run the console to see output from your programs. But the text shows how other consoles can be invoked, with various advantages for each.Throughout the book are many code snippets and examples of running programs from a console or terminal window. Useful guidance.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.