Developing an Eclipse Plug-in David Gallardo. Platform Runtime Workspace Help Team Workbench JFace SWT Eclipse Project Java Development Tools (JDT) Their.

Slides:



Advertisements
Similar presentations
Eclipse Architecture Council Proposal about the updated Eclipse architecture introduction pictures / Kai Nyman This slide set contains a proposal.
Advertisements

Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems.
Where did I go ?. Where did I work ? What did I ANSTO ? 1.Choose a device bus 2.Choose a programming language 3.Propose and develop an architecture.
Extending Eclipse Kai-Uwe Mätzel IBM OTI Labs Zurich
ALAR E2 Architecture - Minh Vu1 E2 Plugin Architecture Project Minh Vu Mentor: Craig Thompson CSCE Department, University Of Arkansas.
Introduction to Eclipse plugin development for CSU 670 course project, Selector language (Xaspect) editor plugin implementation.
Timeline Editor Tommi Karhela, Antti Villberg VTT.
Goals Give you a feeling of what Eclipse is.
On the Eclipse Project Mateusz Srebrny 16 February 2004 Warszawa Slides adapted from
Leveraging the Eclipse Ecosystem for the Scientific Community Tony ANSTO Andy ESRF ICALEPCS 2005.
ANDROID OPERATING SYSTEM Guided By,Presented By, Ajay B.N Somashekar B.T Asst Professor MTech 2 nd Sem (CE)Dept of CS & E.
Eclipse Architecture Dwight Deugo Nesa Matic
Integrated Development Environments. Today We Will: Go over more advanced functionality of Eclipse. Break up into teams to work on presentation and final.
CS 225 Section 1 Spring Topics Software design Correctness and Efficiency Inheritance Data structures –Lists, Stacks, Queues –Trees –Sets, Maps.
Eclipse Introduction Dwight Deugo Nesa Matic
Eclipse Paolo Gasti. The Problem ■ There is the need for a new development environment ■ It has to help software designers and implementers to do their.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Views Dwight Deugo Nesa Matic
1 Plug-in Development Environment (PDE) Guide. 2 Introduction to PDE l What is PDE: »a tool designed to help you develop platform plug-ins while working.
Enhancing Developer Productivity using Eclipse Presented by: Tom Sausner.
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
03 Using Eclipse. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as.
1 eclipse the open platform for tool integration.
[________________________] Eclipse project briefing materials. Copyright (c) 2002 International Business Machines Corp. All rights reserved.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
ECLIPSE and UML Onur Demir
Duke University Program Design & Construction Course Application Development Tools Sherry Shavor
TOOLS FOR DESIGN AND DEVELOPMENT ENVIRONMENTS. Case study - ECLIPSE Lecture notes 3.
Definition of the SDK for FIspace Augusto Morales & Hector Bedón UPM.
Everything I Always Wanted to Know about Eclipse Harry Koehnemann Rocket Gang Many slides in this presentation can be found at
Model Handling with EMF Eclipse ECESIS Project Model handling with EMF An introduction to the Eclipse Modeling Framework ATLAS group (INRIA & LINA),
Introduction to Eclipse Plug-in Development. Who am I? Scott Kellicker Java, C++, JNI, Eclipse.
Android for Java Developers Denver Java Users Group Jan 11, Mike
The Eclipse IDE Gareth Davies. Relevant Bio Professional Developer since 1994 Mostly Microsoft platform, using successive versions of Visual Studio Serious.
Eclipse more than a Java IDE Core / Equinox Committer Users Extenders Publishers Enablers Configurers.
Extending the Eclipse Framework and Rich Client Platform Jeff Myers Languages for Lunch 10/13/2004.
Ontology Engineering and Plugin Development with the NeOn Toolkit Plug-in Development for the NeOn Toolkit June 1st, 2008 Michael Erdmann, Peter Haase,
TOOLS FOR DESIGN AND DEVELOPMENT ENVIRONMENTS. Case study - ECLIPSE Lecture notes 1.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
TOOLS FOR DESIGN AND DEVELOPMENT ENVIRONMENTS. Case study - ECLIPSE Lecture notes 2.
Jan Hatje, DESY CSS ITER March 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
Control System Studio (CSS) Overview Kay Kasemir, July 2009.
[________________________] Eclipse project briefing materials. Copyright (c) 2002, 2003 IBM Corporation and others. All rights reserved. This.
CMSC 466 / 666 Yong Rao Feb. 11, 2004 Revised Mar. 15, 2004.
Treasure Hunt - project development overall status - November 2011.
A (very brief) intro to Eclipse Boyana Norris June 4, 2009.
Eclipse. An IDE is an Integrated Development Environment Different IDEs meet different needs BlueJ, DrJava are designed as teaching tools Emphasis is.
DEV-8: OpenEdge® Architect – Extensibility & Third Party Integration Sunil Belgaonkar Principal Software Engineer Architect Phillip Magnay.
Eclipse Simple Profiler Ben Xu Mar 7,2011. About Eclipse simple profiler is a open source project to analyze your plug-ins/RCPs performance.
Eclipse. An IDE is an Integrated Development Environment Different IDEs meet different needs BlueJ, DrJava are designed as teaching tools Emphasis is.
Eclipse Rich Client Platform Discover the Anatomy of an Application Based On Eclipse Wayne Beaton Evangelist, Eclipse Foundation.
© 2008 by Shawn Spiars; made available under the EPL v1.0 | March 17, 2008 Case Study – Phurnace Software and RCP Shawn Spiars Lead UI Developer Phurnace.
Jan Hatje, DESY CSS GSI Feb. 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
Introduction 1 Lars Vogel 4/22/2009.  Who am I?  Eclipse as a platform  What is Eclipse RCP?  Extension Points / Extensions  Equinox  SWT & JFace.
Extending Eclipse General concepts and Project related APIs Yearly project, Winter 05/06 The Technion.
Bogor-Java Environment for Eclipse MSE Presentation III Yong Peng.
Java IDE Dwight Deugo Nesa Matic
ECLIPSE RICH CLIENT PLATFORM Part 1 Introduction.
DEV-21: Embracing OpenEdge ® Architect Sunil S Belgaonkar Software Architect.
Eclipse.
Goals Give you a feeling of what Eclipse is.
ATS Application Programming: Java Programming
A (very brief) intro to Eclipse
Introduction to Eclipse
Architecture, Components, Configuration
Eclipse Basic Concepts
Eclipse Tools Platform
An Introduction to Eclipse
Dev 11: Embracing OpenEdge® Architect
Presentation transcript:

Developing an Eclipse Plug-in David Gallardo

Platform Runtime Workspace Help Team Workbench JFace SWT Eclipse Project Java Development Tools (JDT) Their Tool Your Tool Another Tool Eclipse Overview Plug-in Development Environment (PDE) Eclipse Platform Debug

The Eclipse JDT and PDE Java VM Standard Java2 Virtual Machine Platform Eclipse Platform Java development tools JDTPDE Plug-in development environment

Eclipse Plug-in Architecture Plug-in - smallest unit of Eclipse function –Big example: HTML editor –Small example: Action to create zip files Extension point - named entity for collecting “contributions” –Example: extension point for workbench preference UI Extension - a contribution –Example: specific HTML editor preferences

Eclipse Plug-in Architecture Each plug-in –Contributes to 1 or more extension points –Optionally declares new extension points –Depends on a set of other plug-ins –Contains Java code libraries and other files –May export Java-based APIs for downstream plug-ins –Lives in its own plug-in subdirectory Details spelled out in the plug-in manifest –Manifest declares contributions –Code implements contributions and provides API –plugin.xml file in root of plug-in subdirectory

Plug-in Manifest <plugin = “Example Plug-in Tool" class = "com.example.tool.ToolPlugin"> id = “com.example.tool" name <page id = "com.example.tool.preferences" icon = "icons/knob.gif" title = “Tool Knobs" class = "com.example.tool.ToolPreferenceWizard“/> Declare contribution this plug-in makes Declare new extension point open to contributions from other plug-ins Location of plug-in’s code Other plug-ins needed Plug-in identification plugin.xml

Eclipse Plug-in Architecture Plug-in A –Declares extension point P –Declares interface I to go with P Plug-in B –Implements interface I with its own class C –Contributes class C to extension point P Plug-in A instantiates C and calls its I methods plug-in Aplug-in B class C interface I extension point P extension Typical arrangement: contributes creates, calls implements

Eclipse Platform Architecture Eclipse Platform Runtime is micro-kernel –All functionality supplied by plug-ins Eclipse Platform Runtime handles start up –Discovers plug-ins installed on disk –Matches up extensions with extension points –Builds global plug-in registry –Caches registry on disk for next time

Using the Eclipse PDE Self-hosted development environment New PDE project wizard creates directory structure and populates Templates for specific types of plug-ins Manifest editor for plugin.xml configuration file –Identify dependencies –Add extension points Run and debug in a separate Eclipse window

Example: A log4j configuration file editor Should look and work like other editors in Eclipse: –Distinguish and allow editing different types of text—comments and values –Provide syntax coloring –Provide code assistance (triggered by Ctrl- Space and context-sensitive

Creating the plug-in project and extension point Create new project Create the “main” text editor class Define the extension point in the manifest file and associate it with the editor class Add icon Run to see default editor behavior

A sample log4j.properties file # Logger log4j.rootLogger=DEBUG, ConApp # Appender log4j.appender.ConApp=org.apache.log4j.ConsoleAppender # PatternLayout log4j.appender.ConApp.layout=org.apache.log4j.PatternLayout log4j.appender.ConApp.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

Working with text Differentiate between sections of text by providing a rule-base partition scanner: –Comments –Values –Everything else Eclipse provides base classes for rule-based scanning, which we’ll extend to support log4j syntax

Working with tokens For each partition type, you need to provide a token scanner: –CommentScanner –ValueScanner –DefaultScanner You also need to provide a token manager to track tokens and their colors –Support user-preferences –Track colors—In SWT, you need to dispose of resources you create

Add content assist Provide a content assist processor for each partition that require content assist (also known as code completion) Return list of possible completions Define character that trigger content assist automatically

Connect to the backing file Eclipse provides an interface— IDocument—that represents the document Assigns a partition scanner to the document And, conversely, assigns the document to the partition scanner JFace class FileDocumentProvider does most of the work

Bringing it all back home The SourceViewerConfiguration class ties everything together: –Determines partition types, default partition –Set up the partitions –Provide damagers and repairers for each partion –Turn on content assist

Finishing touches: The editor class Now we can finish the editor class we started with: –Plug in the source configuration –Plug in document provider –Attach to Eclipse preference store –Handle calls to redraw text when necessary –Handle calls to update preferences –Plug in content assist as a retargetable action

Demo Import example source Walk through source code demonstrating the components previously described Run and demonstrate: –New Eclipse Menu item –Default editor for log4j.properties –Syntax coloring –Content assist