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 – styling the UI with CSS


Eclipse 4 user interfaces are styled with CSS. Although this is loosely based on the CSS syntax used by browsers, the stylesheet is interpreted by the Eclipse 4 runtime. CSS stylesheets are composed of selectors and style rules: a selector can be one of a widget name (for example, Button), a model class name (for example, .MPartStack), or an identifier (for example, #PerspectiveSwitcher).

  1. The default Eclipse 4 application with sample content (generated by the wizard in Chapter 7, Creating an E4 Application, will have an empty CSS file called css/default.css. Open this file, and add the following rule:

    Shell {
      background-color: blue;
    }

    Tip

    The File | New | Plug-in Project menu can be used to create a new plug-in project, and the Would you like to create a rich client application? combined with the This plug-in will make contributions to the UI will allow the creation of an Eclipse 4 application for testing purposes if required. If this is chosen, ensure...