1 / 19

Eclipse Plug-in Development Byju Veedu

Eclipse Plug-in Development Byju Veedu. Agenda. Eclipse platform architecture Plug-in development environment Eclipse RCP Creating a sample plug-in Q & A. What is eclipse?. Eclipse is a universal platform for integrating development tools Eclipse Platform is the nucleus of IDE products

Download Presentation

Eclipse Plug-in Development Byju Veedu

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Eclipse Plug-in DevelopmentByju Veedu

  2. Agenda • Eclipse platform architecture • Plug-in development environment • Eclipse RCP • Creating a sample plug-in • Q & A

  3. What is eclipse? • Eclipse is a universal platform for integrating development tools • Eclipse Platform is the nucleus of IDE products • Plug-ins, extension points, extensions • Open, extensible architecture • Workspace, projects, files, folders • Common place to organize & store development artifacts • Workbench, editors, views, perspectives • Common user presentation and UI paradigm • Key building blocks and facilities • Help, team support, internationalization

  4. Eclipse architecture

  5. Eclipse architecture • RCP: On the bottom is RCP which provides the architecture and framework to build any rich client application.IDE: It is a tools platform and a rich client application itself. We can build various form of tooling by using IDE for example Database tooling.JDT: It is a complete java IDE and a platform in itself.PDE: It provides all tools necessary to develop plug-ins and RCP applications. This is what we will concentrate on the course of this tutorial.

  6. OSGI The Open Services Gateway Initiative (OSGi) defines an architecture for developing and deploying modular applications and libraries • You can install, uninstall, start, and stop different modules of your application dynamically without restarting the container. • Your application can have more than one version of a particular module running at the same time. • OSGi provides very good infrastructure for developing service-oriented applications, as well as embedded, mobile, and rich internet apps.

  7. SWT • SWT = Standard Widget Toolkit • Generic graphics and GUI widget set • buttons, lists, text, menus, trees, styled text... • Simple • Small • Fast • OS-independent API • Uses native widgets where available • Emulates widgets where unavailable

  8. Why SWT? • Consensus: hard to produce professional looking shrink-wrapped products using Swing and AWT • SWT provides • Tight integration with native window system • Authentic native look and feel • Good performance • Good portability • Good base for robust GUIs

  9. JDT • JDT = Java development tools • State of the art Java development environment • Built atop Eclipse Platform • Implemented as Eclipse plug-ins • Using Eclipse Platform APIs and extension points • Included in Eclipse Project releases • Available as separately installable feature

  10. Plugin Development Environment • Plug-in - smallest unit of Eclipse function • Big example: Xml 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 Xml editor preferences

  11. Extension

  12. 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

  13. 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 Plug-in Manifest Plug-in Manifest

  14. Plug-in identification Other plug-ins needed Location of plug-in’s code Declare contributionthis plug-in makes Declare new extension point open to contributions from other plug-ins Plug-in Manifest plugin.xml <plugin id = “com.example.tool" name = “Example Plug-in Tool" class = "com.example.tool.ToolPlugin"> <requires> <import plugin = "org.eclipse.core.resources"/> <import plugin = "org.eclipse.ui"/> </requires> <runtime> <library name = “tool.jar"/> </runtime> <extension point = "org.eclipse.ui.preferencepages"> <page id = "com.example.tool.preferences" icon = "icons/knob.gif" title = “Tool Knobs" class = "com.example.tool.ToolPreferenceWizard“/> </extension> <extension-point name = “Frob Providers“ id = "com.example.tool.frobProvider"/> </plugin>

  15. Plug-in Activation • Each plug-in gets its own Java class loader • Delegates to required plug-ins • Restricts class visibility to exported APIs • Contributions processed without plug-in activation • Example: Menu constructed from manifest info for contributed items • Plug-ins are activated only as needed • Example: Plug-in activated only when user selects its menu item • Scalable for large base of installed plug-ins • Helps avoid long start up times

  16. Features • Features package plug-ins • A plug-in without a feature is an unmanaged plug-in By packaging your plug-ins into a feature (or two), you get the opportunity to: • List the prerequisites of your contribution (in the feature.xml file) for use during Eclipse configuration processing. • Manage your contribution as part of the active Eclipse configuration. • Contribute branding information to identify your contribution to those using the run-time environment and a welcome page telling users what your feature offers (in the welcome.xml file associated with your feature). • Potentially service your contribution using the Eclipse update manager.

  17. Creating Hello world plug-in • Creating the plug-in • Running • Debugging • Packaging

  18. Creating a Rich client application • Creating the application • Running • Debugging • Packaging

  19. References • http://www.eclipsepluginsite.com/ • http://www.vogella.de/articles/EclipsePlugIn/article.html • http://www.eclipse.org/swt/ • http://eclipse.org/articles/Article-RCP-1/tutorial1.html

More Related