Eclipse with CDT, Eclipse plugin - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Eclipse with CDT, Eclipse plugin

Description:

Eclipse is a software platform comprised of extensible application ... Equinox OSGi. a standard bundling framework. Core platform. boot Eclipse, run plug-ins ... – PowerPoint PPT presentation

Number of Views:206
Avg rating:3.0/5.0
Slides: 37
Provided by: ludwigCsi
Category:
Tags: cdt | eclipse | equinox | plugin

less

Transcript and Presenter's Notes

Title: Eclipse with CDT, Eclipse plugin


1
Eclipse with CDT, Eclipse plug-in
  • ???
  • 2009/02/13

2
Outline
  • Eclipse and CDT introduction
  • Build our environment
  • Eclipse plug-in
  • Wizard

3
ECLIPSE AND CDT
4
Eclipse Introduction
  • Eclipse is a software platform comprised of
    extensible application frameworks, tools and
    runtimes for software development and management
  • Primarily written in Java
  • Primary use is as an integrated development
    environment (IDE)
  • In its default form it is meant for Java
    developers, consisting of the Java Development
    Tools (JDT)
  • Users can extend its capabilities by installing
    plug-ins written for the Eclipse software
    framework

5
Eclipse Architecture
  • Eclipse Rich Client Platform (RCP)
  • Equinox OSGi
  • a standard bundling framework
  • Core platform
  • boot Eclipse, run plug-ins
  • Standard Widget Toolkit (SWT)
  • a portable widget toolkit
  • JFace
  • viewer classes to bring model view controller
    programming to SWT, file buffers, text handling,
    text editors
  • Eclipse Workbench
  • views, editors, perspectives, wizards

6
Eclipse Structure
7
CDT Introduction
  • CDT
  • C/C Development Tools
  • Provide a fully functional C and C IDE for the
    Eclipse platform
  • Function
  • C/C Editor
  • basic functionality, syntax highlighting, code
    completion etc.
  • C/C Debugger
  • APIs Default implementation, using GDB
  • C/C Launcher
  • APIs Default implementation, launches and
    external application
  • Parser
  • Search Engine
  • Content Assist Provider
  • Makefile generator

8
CDT Architecture
9
BUILD OUR ENVIRONMENT
10
Build Our Environment
  • Install JDK
  • http//java.sun.com/javase/downloads/index.jsp
  • Install Eclipse platform
  • http//download.eclipse.org/eclipse/downloads/
  • The Latest Release is 3.4.1 (Ganymede)

11
Build Our Environment (Cont)
  • Install CDT
  • Use eclipse software update to install
  • Download through software update dialog
  • Download from the CDT website
  • http//www.eclipse.org/cdt/downloads.php
  • Choose the version according to the using
    eclipses version

12
Build Our Environment (Cont)
  • Download through software update dialog
  • Help -gt Software Updates

13
Build Our Environment (Cont)
  • Expend Ganymede Update Site
  • Choose C and C Development

14
Build Our Environment (Cont)
  • Download from website
  • Download zip file according to Eclipse version
  • Help -gt Software Updates
  • Click Add Site to add zip file to source

15
Build Our Environment (Cont)
  • Choose the zip file source and install

16
Build Our Environment (Cont)
  • Install Win32 GNU Toolchain
  • MinGW
  • http//www.mingw.org/
  • allow one to produce native Windows programs that
    do not rely on any 3rd-party C runtime DLLs
  • MSYS
  • A contraction of "Minimal SYStem
  • POSIX-like command line interpreter system
  • GDB
  • http//sourceforge.net/project/showfiles.php?group
    _id2435package_id20507
  • The MinGW setup program does not install the gdb

17
Demo
  • Using CDT to compile
  • No makefile (CDT automatically create)
  • With makefile
  • Using CDT to debug

18
ECLIPSE PLUG-IN
19
Eclipse Plug-in Architecture
  • Workbench and Workspace
  • Two indispensable plug-ins of the Eclipse
  • Provide the extension points used by most of the
    plug-ins
  • A plug-in requires an extension point to plug
    into in order to function

20
Eclipse Plug-in Architecture (Cont)
21
Eclipse Plug-in Architecture (Cont)
  • The Workbench extension points
  • Allow plug-ins to contribute behaviors to
    existing views and editors or to provide
    implementations for new views and editors
  • The Workspace extension points
  • Allow plug-ins to interact with resources,
    including projects and files

22
Eclipse Plug-in Model
  • A plug-in is described in an XML manifest file,
    called plugin.xml, residing in the plug-in's
    folder
  • The manifest file describes the content of the
    plug-in to the Eclipse runtime
  • plug-in identifier, version, etc.

23
Eclipse Plug-in Model (Cont)
  • The manifest file contains four main sections
  • Dependencies
  • listing all the plug-ins required by the plug-in
  • Extensions
  • declaring all the functionalities by extending
    other plug-ins' extension points
  • Runtime
  • shows all the packages that your plug-in makes
    visible to other plug-ins, libraries and folders
    that constitute the plug-in runtime classpath
  • Extension Points
  • declaring new function points defined by this
    plug-in which other plug-ins can extend

24
Dependency
  • When a plug-in is dependent on other plug-ins for
    its functions, the dependency is specified via a
    requires element in the plug-in manifest file

25
Extensions
  • A plug-in can contribute new functionality to the
    platform by adding an extension to extension
    points declared by other plug-ins
  • The extension declaration must follow the schema
    defined by the extension point it contributes to

26
Extension Points
  • Extension points define new function points for
    the platform that other plug-ins can plug into
  • Defining a new extension point requires the
    writing of a schema, which all clients of the
    extension point must then follow in order to be
    processed correctly at runtime

27
Develop a Plug-in
  • The easiest way to create a plug-in is to use the
    Plug-in Development Environment (PDE)
  • PDE provides a set of tools that assist the
    developer in every stage of plug-in development
    from genesis to deployment

28
Configuring PDE
  • In order for PDE to provide a development
    environment that is identical to the runtime
    environment in which the plug-in will be later
    deployed, one needs to specify the Target
    Platform
  • Target platform refers to the set of plug-ins
    with which the plug-in being developed will be
    deployed

29
Configuring PDE (Cont)
  • At runtime, most plug-ins require other plug-ins
    to be on their class path in order to run
    properly
  • At development time, a plug-in similarly requires
    that all the libraries for its required plug-ins
    be on its build path in order for its code to
    compile without errors

30
Configuring PDE (Cont)
31
Demo
  • Create a new plug-in project
  • Using template
  • No template

32
WIZARD
33
Wizard Components
  • Wizard has two components
  • Main wizard
  • Initialize, finalize, and handle all pages
  • Wizard page
  • Page layout
  • Event handle

34
Main Wizard
  • void addPages()
  • Adding pages to a wizard
  • void init()
  • Initializing widgets on wizard pages
  • ?boolean canFinish()
  • Pages can finish or not
  • boolean performFinish()
  • What to do when finishing

35
Wizard Page
  • void createControl()
  • Create widgets on page
  • ?void handleEvent()
  • Handle event
  • ?IWizardPage getNextPage()
  • Setting the next page
  • ?boolean canFlipToNextPage()
  • Can go to next page or not

36
Demo
  • Create a wizard plug-in project
  • A wizard example
Write a Comment
User Comments (0)
About PowerShow.com