Download Eclipse introduction

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Goals
• Give you a feeling of what Eclipse is.
• Introduce the basic mechanisms behind the
scene.
• Show how to contribute to the Eclipse
environment by example.
What is Eclipse?
• Eclipse is a kind of universal tool
platform - an open extensible IDE for
anything and nothing in particular.
(www.eclipse.org)
• Eclipse is a platform for integrating
development tools. (www.eclipse.org)
• Place where development tools live and
collaborate.
What is Eclipse? User’s view.
• Eclipse is designed to be used by developers.
• Eclipse allows user to manage project resources
(files, folders).
• Editors allow user to edit resources.
• Views assist user by providing structured
information about edited/selected resource.
• Perspectives arrange editors and views in order to
suit current developer task best.
Workbench window
Menu bar
Text
editor
Tool bar
Perspective
and
Fast View
bar
Outline
view
Resource
Navigator
view
Bookmarks
view
Properties
view
Message
area
Stacked
views
Tasks
view
Editor
Status
area
What is Eclipse?
Plug-in developer view.
• Environment providing you with an
extensive set of facilities (API) for
creating development tools.
• Concepts and mechanisms allowing you
to extend and/or collaborate with
existing solutions seamlessly.
• Set of frameworks you may want to
implement in your product.
General structure
Plug-in development
environment
PDE
Java development
tools
JDT
Eclipse Platform
Platform
Standard Java2
Virtual Machine
Java VM
www.eclipse.org
Platform architecture.
www.eclipse.org
Platform runtime
• Starts the platform and discovers plug-ins
• Defines mechanisms for attaching plug-ins
to the environment
• Designed to use plug-ins only if needed
• Maintains plug-in registry
• org.eclipse.core.runtime
Workspace
• Central hub for user’s data files
• Resource management
–
–
–
–
Projects
Folders
Files
Specialized resources
• Builders, Project Natures, Resource Markers
• Resources plug-in. org.eclipse.core.resources
Workbench
• Eclipse UI
• Frame that can represent various visual parts
– Views
– Editors
• Defines 27 extension points. Basics are:
–
–
–
–
–
org.eclipse.ui.views
org.eclipse.ui.editors
org.eclipse.ui.viewActionss
org.eclipse.ui.editorActions
org.eclipse.ui.popupMenus
• Extensive set of API classes and interfaces
JFace & SWT.
• Standard widget toolkit (SWT)
– Portable API
– Tight integration with native OS
• JFace.
– Provides higher level interface than SWT
– Contains a lot of facilities to use in your plug-ins
(wizards, preferences etc.)
– Defines useful frameworks, such as viewer MVC
model
Help and Team support
• Help
– HTML format
– .toc (Table of Contens) files are used to represent documentation
structure
– org.eclipse.help.toc extension
• Team support
– additional API that allow plug-ins to integrate the function of a
versioning and configuration management repository
– API allows different repository plug-ins to work with the system
– Multiple repository providers can coexist peacefully within the
platform
Extension point
• Functionality to the system is contributed via socalled “extension points”.
• In essence each extension point is an interface
contributors have to implement.
• The extension point mechanism is the only way of
contributing functionality to the system.
• Plug-ins can define their own extension points, so
that other plug-ins can integrate tightly with them.
Extension
• Extension is a piece of functionality contributed
via corresponding extension point.
• Extension is just an implementation of interface
defined by extension point.
• Extensions are typically written in Java using the
platform APIs. Extension=Java class!
• Some extension points accommodate extensions
provided as platform executables, ActiveX
components, or developed in scripting languages.
In general, only a subset of the full platform functionality is available
to non-Java extensions.
Plug-In
•
•
•
•
•
•
Contains one or more extensions
Can optionally declare new extension points
Depends on a set of other plug-ins
Contains Java code libraries and other files.
Lives in its own plug-in subdirectory
Introduced to the Platform by a manifest file
(plugin.xml)
• Loaded to the Eclipse registry on a start-up
Plug-in manifest (plugin.xml)
• Introduces plug-in interface to the Platform
• Contains
–
–
–
–
–
plug-in version, id, provider, class
plug-in dependency information
plug-in java library name(s)
extensions implemented
defines new extension points (optionally)
Eclipse Plug-In Architecture
• Typical arrangement
plug-in A
extension
point P
interface I
plug-in B
contributes
implements
extension
class C
• Plug-in A
creates,
– Declares extension point P calls
– 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
www.eclipse.org
• Plug-in A instantiates C and calls its I methods
Plug-in installation
•
•
•
•
•
•
Plug-in have to be installed into a directory underneath the platform's plug-in
directory. This directory corresponds to our plug-in id, which must be unique.
The standard practice for plug-in directory names is to use the plug-in's fully
qualified id, including the dots. (i.e. org.aspectj.ajde plug-in is rooted to
{platform's plug-in directory}/org.aspectj.ajde_1.0.6 /)
The plug-in directory is named plugins and is typically located underneath the
main directory where you installed the platform.
All the plug-in files (java libraries,manifest, images etc.) have to be located
within plug-in directory system.
All the plug-in code have to be in the jar format. The names of the jar files
should correspond to the values of the name attribute of the library tag inside
the corresponding plug-ins manifest file.
Each plug-in must have it’s own plugin.xml located at the top level of plug-in
directory system
A plug-in typically contains some extra files (images, docs, etc) which can be
located at any place within plug-in directory system