万本电子书0元读

万本电子书0元读

顶部广告

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

售       价:¥

15人正在读 | 0人评论 6.2

作       者:Dr Alex Blewitt

出  版  社:Packt Publishing

出版时间:2016-08-01

字       数:213.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Develop skills to build powerful plug-ins with Eclipse IDE through examples About This Book Create useful plug-ins to make Eclipse work for you Learn how to migrate Eclipse 3.x plug-ins to Eclipse 4.x From automation to testing, find out how to get your IDE performing at an impressive standard Who This Book Is For This book is for Java developers familiar with Eclipse who need more from the IDE. This book will sharpen your confidence and make you a more productive developer with a tool that supports rather than limits you. 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 In Detail 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. Style and approach Packed with plenty of examples so you're never stuck, or never left simply reading instructions, this book encourages you to get started immediately. This book is for developers who want to develop, not just learn.
目录展开

Eclipse Plug-in Development Beginner's Guide Second Edition

Table of Contents

Eclipse Plug-in Development Beginner's Guide Second Edition

Credits

Foreword

About the Author

Acknowledgments

About the Reviewers

www.PacktPub.com

eBooks, discount offers, and more

Why subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Sections

Time for action – heading

What just happened?

Pop quiz – heading

Have a go hero – heading

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. Creating Your First Plug-in

Getting started

Time for action – setting up the Eclipse environment

What just happened?

Creating your first plug-in

Time for action – creating a plug-in

What just happened?

Pop quiz – Eclipse workspaces and plug-ins

Running plug-ins

Time for action – launching Eclipse from within Eclipse

What just happened?

Pop quiz: launching Eclipse

Have a go hero – modifying the plug-in

Debugging a plug-in

Time for action – debugging a plug-in

What just happened?

Time for action – updating code in the debugger

What just happened?

Debugging with step filters

Time for action – setting up step filtering

What just happened?

Using different breakpoint types

Time for action – breaking at method entry and exit

What just happened?

Using conditional breakpoints

Time for action – setting a conditional breakpoint

What just happened?

Using exceptional breakpoints

Time for action – catching exceptions

What just happened?

Time for action – inspecting and watching variables

What just happened?

Pop quiz: debugging

Have a go hero – working with breakpoints

Summary

2. Creating Views with SWT

Creating views and widgets

Time for action – creating a view

What just happened?

Manifest.mf

plugin.xml

Time for action – drawing a custom view

What just happened?

Time for action – drawing a seconds hand

What just happened?

Time for action – animating the second hand

What just happened?

Time for action – running on the UI thread

What just happened?

Time for action – creating a reusable widget

What just happened?

Time for action – using layouts

What just happened?

Pop quiz: understanding views

Have a go hero – drawing hour and minute hands

Managing resources

Time for action – getting colorful

What just happened?

Time for action – finding the leak

What just happened?

Time for action – plugging the leak

What just happened?

Pop quiz – understanding resources

Have a go hero

Interacting with the user

Time for action – getting in focus

What just happened?

Time for action – responding to input

What just happened?

Pop quiz: understanding widgets

Have a go hero – updating the clock widget

Using other SWT widgets

Time for action – adding items to the tray

What just happened?

Time for action – responding to the user

What just happened?

Time for action – modal and other effects

What just happened?

Time for action – groups and tab folders

What just happened?

Pop quiz: using SWT

Have a go hero: enhancing the time zones

Summary

3. Creating JFace Viewers

Why JFace?

Creating TreeViewers

Time for action – creating a tree viewer

What just happened?

Time for action – using Images in JFace

What just happened?

Time for action – styling label providers

What just happened?

Pop quiz – understanding JFace

Have a go hero – adding images for regions

Sorting and filtering

Time for action – sorting items in a viewer

What just happened?

Time for action – filtering items in a viewer

What just happened?

Pop quiz – understanding sorting and filters

Have a go hero – expanding and filtering

Interaction

Time for action – adding a double-click listener

What just happened?

Pop quiz – understanding interaction

Tabular data

Time for action – viewing time zones in tables

What just happened?

Pop quiz: understanding tables

Selection

Time for action – propagating selection

What just happened?

Time for action – responding to selection changes

What just happened?

Have a go hero – adding selection support to the table view

Pop quiz – understanding selection

Summary

4. Interacting with the User

Creating menus, commands, and handlers

Time for action – installing the E4 tools

What just happened?

Time for action – creating commands and handlers

What just happened?

Time for action – binding commands to keys

What just happened?

Time for action – changing contexts

What just happened?

Time for action – enabling and disabling menus items

What just happened?

Time for action – contributing commands to pop-up menus

What just happened?

Have a go hero – using view menus and toolbars

Pop quiz – understanding menus

Jobs and progress

Time for action – running operations in the background

What just happened?

Have a go hero – using a UIJob

Time for action – reporting progress

What just happened?

Time for action – dealing with cancellation

What just happened?

Time for action – using subtasks and sub-progress monitors

What just happened?

Time for action – using null progress monitors and sub monitors

What just happened?

Time for action – setting job properties

What just happened?

Have a go hero – displaying in the taskbar

Pop quiz – understanding Jobs

Reporting errors

Time for action – showing errors

What just happened?

Pop quiz – understanding errors

Summary

5. Working with Preferences

Eclipse Preferences

Time for action – persisting a value

What just happened?

Time for action – injecting preferences

What just happened?

Time for action – injecting individual preferences

What just happened?

Time for action – responding to preference changes

What just happened?

Preference pages

Time for action – creating a preference page

What just happened?

Time for action – creating warning and error messages

What just happened?

Time for action: choosing from a list

What just happened?

Time for action – aligning field editors with a grid

What just happened?

Time for action – placing the preferences page

What just happened?

Time for action: using other field editors

What just happened?

Time for action – searching for preferences

What just happened?

Have a go hero – translating into different languages

Pop quiz – understanding preferences

Summary

6. Working with Resources

Using the workspace and resources

Time for action – creating an editor

What just happened?

Time for action – writing the markup parser

What just happened?

Time for action – building the builder

What just happened?

Time for action – iterating through resources

What just happened?

Time for action – creating resources

What just happened?

Time for action – implementing incremental builds

What just happened?

Time for action: handling deletion

What just happened?

Have a go hero – builder upgrades

Using natures

Time for action – creating a nature

What just happened?

Have a go hero – enable for selected object type

Using markers

Time for action – error markers if file is empty

What just happened?

Time for action – registering a marker type

What just happened?

Have a go hero – work out when the file is really empty

Pop quiz – understanding resources, builders, and markers

Summary

7. Creating Eclipse 4 Applications

Time for action – installing E4 tooling

What just happened?

Time for action – creating an E4 application

What just happened?

Time for action – creating a part

What just happened?

Using services and contexts

Time for action – adding logging

What just happened?

Time for action – getting the window

What just happened?

Time for action – obtaining the selection

What just happened?

Time for action – dealing with events

What just happened?

Time for action – calculating values on demand

What just happened?

Time for action – interacting with the UI

What just happened?

Using commands, handlers, and menu items

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

What just happened?

Time for action: passing command parameters

What just happened?

Time for action – creating a direct menu and keybindings

What just happened?

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

What just happened?

Creating custom injectable classes

Time for action – creating a simple service

What just happened?

Time for action – injecting subtypes

What just happened?

Have a go hero – using the tools bridge

Pop quiz – understanding E4

Summary

8. Migrating to Eclipse 4.x

Why Eclipse 4.x?

Time for action – creating a migration component

What just happened?

Time for action – updating to e4view

What just happened?

Time for action – upgrading the actions

What just happened?

Time for action – creating toolbars

What just happened?

Have a go hero – optimising the handler lookup

Time for action – adding the view menu

What just happened?

Time for action – adding the pop-up

What just happened?

Migrating to Eclipse 4.x patterns

Time for action – creating a model fragment

What just happened?

Time for action – migrating the commands and handlers

What just happened?

Time for action – creating the view menu

What just happened?

Time for action – defining the pop-up view in the fragment

What just happened?

Have a go hero – invoking the handler from the hookDoubleClick action

Pop quiz

Summary

9. Styling Eclipse 4 Applications

Styling Eclipse with CSS

Time for action – styling the UI with CSS

What just happened?

Have a go hero – experiment with other CSS properties

Time for action – using custom CSS classes

What just happened?

Using the Eclipse spies

Time for action – using the CSS Spy

What just happened?

Time for action – integrating the spy into a product

What just happened?

Styling a custom widget

Time for action – adding the clock

What just happened?

Time for action – using a CSS property

What just happened?

Themes

Time for action – going to the dark side

What just happened?

Time for action – adding themes

What just happened?

Time for action – switching between themes

What just happened?

Have a go hero

Pop quiz – styling Eclipse 4

Summary

10. Creating Features, Update Sites, Applications, and Products

Grouping plug-ins with features

Time for action – creating a feature

What just happened?

Time for action – exporting a feature

What just happened?

Time for action – installing a feature

What just happened?

Time for action – categorizing the update site

What just happened?

Time for action – depending on other features

What just happened?

Time for action – branding features

What just happened?

Have a go hero – publishing the content remotely

Building applications and products

Time for action – creating a headless application

What just happened?

Time for action – creating a product

What just happened?

Have a go hero – creating a product based on features

Target platforms

Time for action – creating a target definition

What just happened?

Time for action – switching to a specific version

What just happened?

Have a go hero – configuring target platforms for other releases

Pop quiz – understanding features, applications, and products

Summary

11. Automated Testing of Plug-ins

Using JUnit for automated testing

Time for action – adding dependencies to the target platform

What just happened?

Time for action – writing a simple JUnit 4 test case

What just happened?

Time for action – writing a plug-in test

What just happened?

Using SWTBot for user interface testing

Time for action – writing an SWTBot test

What just happened?

Time for action – working with menus

What just happened?

Have a go hero – using resources

Working with SWTBot

Time for action – hiding the welcome screen

What just happened?

Time for action – avoiding SWTBot runtime errors

What just happened?

Working with views

Time for action: showing views

What just happened?

Time for action – interrogating views

What just happened?

Interacting with the UI

Time for action – getting values from the UI

What just happened?

Time for action – waiting for a condition

What just happened?

Have a go hero – driving the new class wizard

Pop quiz – understanding swtbot

Summary

12. Automated Builds with Tycho

Using Maven to build Eclipse plug-ins with Tycho

Time for action – installing Maven

What just happened?

Time for action – building with Tycho

What just happened?

Building features and update sites with Tycho

Time for action – creating a parent project

What just happened?

Time for action – building a feature

What just happened?

Time for action – building an update site

What just happened?

Time for action – building a product

What just happened?

Time for action – using the target platform

What just happened?

Have a go hero – depending on Maven components

Testing and releasing

Time for action – running automated tests

What just happened?

Time for action – changing the version numbers

What just happened?

Have a go hero – enabling builds for other plug-ins

Signing update sites

Time for action – creating a self-signed certificate

What just happened?

Time for action – signing the plug-ins

What just happened?

Time for action – serving an update site

What just happened?

Pop quiz – understanding automated builds and update sites

Summary

13. Contributing to Eclipse

Open source contributions

Importing the source

Time for action – installing the sources

What just happened?

Time for action – debugging the platform

What just happened?

Time for action – modifying the platform

What just happened?

Checking out from Git

Time for action – checking out from EGit and Git

What just happened?

Time for action – configuring the SWT project

What just happened?

Contributing to Eclipse

Creating bugs on Bugzilla

Time for action – creating an account at Eclipse

What just happened?

Time for action – creating a bug

What just happened?

Have a go hero

Submitting fixes

Time for action – setting up a Gerrit profile

What just happened?

Time for action – committing and pushing a patch

What just happened?

Have a go hero

Summary

A. Using OSGi Services to Dynamically Wire Applications

Services overview

Registering a service programmatically

Creating an activator

Registering a service

Priority of services

Using the services

Lazy activation of bundles

Comparison of services and extension points

Registering a service declaratively

Declarative Services

Properties and Declarative Services

Service references in Declarative Services

Multiple components and debugging Declarative Services

Dynamic Service annotations

Processing annotations at Maven build time

Dynamic services

Resolving services each time

Using a ServiceTracker

Filtering services

Obtaining a BundleContext without using an activator

Dependent Services

Dynamic service configuration

Installing Felix FileInstall

Installing ConfigAdmin

Configuring Declarative Services

Service factories

Creating the EchoService

Creating an EchoServiceFactory

Configuring the EchoServices

Summary

B. Pop Quiz Answers

Chapter 1 – Creating Your First Plug-in

Eclipse workspaces and plug-ins

Launching Eclipse

Debugging

Chapter 2 – Creating Views with SWT

Understanding views

Understanding resources

Understanding widgets

Using SWT

Chapter 3 – Creating JFace Viewers

Understanding JFace

Understanding sorting and filters

Understanding interaction

Understanding tables

Understanding selection

Chapter 4 – Interacting with the User

Understanding menus

Understanding jobs

Understanding errors

Chapter 5 – Storing Preferences and Settings

Understanding preferences

Chapter 6 – Working with Resources

Understanding resources, builders, and markers

Chapter 7 – Creating Eclipse 4 Applications

Understanding E4

Chapter 8 – Migrating to Eclipse 4.x

Chapter 9 – Styling Eclipse 4 Applications

Styling Eclipse 4

Chapter 10 – Creating Features, Update Sites, Applications, and Products

Understanding features, applications, and products

Chapter 11 – Automated Testing of Plug-ins

Understanding swtbot

Chapter 12 – Automated Builds with Tycho

Understanding automated builds and update sites

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部