Top Banner
30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead
53

30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

Jan 12, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30-Nov-05

The True Promise of Eclipse:Innovation at Your Fingertips

Doug SchaeferSenior Software DeveloperEclipse CDT Project Lead

Page 2: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

2 out of ##QNX Confidential. All content copyright QNX Software Systems.

Agenda

1. What is Eclipse?

2. The Eclipse Platform

3. Eclipse Extensibility

4. The C/C++ Development Tooling (CDT) Project

5. Using the CDT on Large “Legacy” Legacy Projects

6. QNX Momentics Development Suite

7. Q&A

Page 3: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30-Nov-05

The True Promise of Eclipse:Innovation at Your Fingertips

What is Eclipse?

Page 4: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

4 out of ##QNX Confidential. All content copyright QNX Software Systems.

What is Eclipse?

Eclipse is - a vast open source community► 17 Strategic Members, 79 Add-in Provider Members, many

independent contributors

► Widely adopted

over one million downloads of Eclipse Platform 3.1

Eclipse is - A collection of open source projects► “providing an extensible development platform and application

frameworks for building software” (www.eclipse.org)

Eclipse is – A platform► Core Runtime, GUI, and IDE features

► An SDK for building plug-ins for the Platform

Page 5: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

5 out of ##QNX Confidential. All content copyright QNX Software Systems.

History of Eclipse

Originated at IBM in 2000

Foundation for WebSphere Studio Application Developer®

► Intended to compete with Microsoft® Visual Studio® in enterprise

IBM had vision to see the value of open source technologies► Good experience with Apache and Linux

Formed Eclipse consortium November 2001► Involved both partners and competitors

Gave technology and leadership to Eclipse Foundation► February 2004

► Combat the perception that IBM still owned Eclipse

Page 6: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

6 out of ##QNX Confidential. All content copyright QNX Software Systems.

Eclipse Foundation

The Eclipse Foundation is the “keeper” of Eclipse

Small staff to facilitate activity on projects► Executive Director, Marketing, Legal, IT, Evangelists/Facilitators

► No project management or developer staff

Strong focus on IP cleanliness of Eclipse technologies► Difficult challenge for open source projects

► Addressed with strong tracking of all contributions

Project Management Committees manage project lifecycles► Run by employees of member companies

► Manage the creation of projects

Page 7: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

7 out of ##QNX Confidential. All content copyright QNX Software Systems.

Eclipse Projects

Where the work really happens► Eclipse Foundation manage infrastructure and marketing

► Project manage project lifecycles

► Projects manage technology and development

Committers have write access to CVS repository► With that comes responsibility to ensure quality and IP cleanliness

of code

► Also comes with ultimate power to make program decisions

Anyone can contribute► By sending patches that the committers review and apply

Code, documentation, test artifacts

► By testing and reporting bugs and enhancement requests

Page 8: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

8 out of ##QNX Confidential. All content copyright QNX Software Systems.

Eclipse Project

The original Eclipse project

Produces a platform for applications and tools

Produces an SDK for developing plug-ins for the platform► Java Development Tooling (JDT) for writing Java apps

► Plug-in Development Environment (PDE) for writing plug-ins

Different packaging of platform for different needs► Full Platform for Tools, IDEs

► Rich Client Platform for General Apps

► eRCP for embedded Rich Client Applications

IBM still major contributor to this project

Page 9: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30-Nov-05

The True Promise of Eclipse:Innovation at Your Fingertips

The Eclipse Platform

Page 10: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

10 out of ##QNX Confidential. All content copyright QNX Software Systems.

Runtime

OSGi Bundles, also known as plug-ins► Plug-ins are smallest component

► Dyanamic discovery, install and activation

Extension mechanism► Lower plug-ins define extension points

► Higher plug-ins provide additional functionality through them

Update► For downloading and installing plug-ins

Resource management► Elements that the tools work in

► Files, Folders, Projects

Page 11: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

11 out of ##QNX Confidential. All content copyright QNX Software Systems.

SWT

Full feature widget set.► Matches and extends

native feature set

► Web Browser

Native interface to underlying window system

► Fast

► Platform specific

Page 12: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

12 out of ##QNX Confidential. All content copyright QNX Software Systems.

User Interface

Higher level framework than SWT

Views

Editors

Perspectives

Standard UI Set► Text Editor

► Navigator

► Tasks List

Page 13: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

13 out of ##QNX Confidential. All content copyright QNX Software Systems.

Help System

Page 14: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

14 out of ##QNX Confidential. All content copyright QNX Software Systems.

Team

Monitors changes to resources

► Automatic checkout when changes occur

Out-of-the-box support for CVS

Extendible to other team/source control environments

► E.g. IBM’s Rational ClearCase

Page 15: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

15 out of ##QNX Confidential. All content copyright QNX Software Systems.

Synchronization Perspective

Page 16: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

16 out of ##QNX Confidential. All content copyright QNX Software Systems.

Build and Debug

Very generic

Invoke builders incrementally based on resource change► Multiple builders to do different operations based

► Project “natures” define list of builders

Also used to activate other tooling

Debug platform extendible to different debug paradigms► Provides basic views for stack frames, variables

► Extension points to plug in integrations to native debuggers

Launch framework► Pluggable way to launch applications

E.g. download app to target, invoke remote debugging

Page 17: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30-Nov-05

The True Promise of Eclipse:Innovation at Your Fingertips

Eclipse Extensibility

Page 18: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

18 out of ##QNX Confidential. All content copyright QNX Software Systems.

Eclipse Extensibility

Everything is a plug-in► Written in Java but can contain native code, scripts

Plug-ins define extension points► Allow functionality to be added in at strategic locations

Plug-ins define extensions to those extension points► To provide customized functionality

Plug-in Development Environment (PDE)► Edit of plug-in definitions

► Build of plug-ins for deployment

► Debug of plug-ins in a self hosted environment

Page 19: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

19 out of ##QNX Confidential. All content copyright QNX Software Systems.

Plug-ins

Page 20: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

20 out of ##QNX Confidential. All content copyright QNX Software Systems.

Extension Points

Page 21: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

21 out of ##QNX Confidential. All content copyright QNX Software Systems.

Extension Point Schemas

Page 22: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

22 out of ##QNX Confidential. All content copyright QNX Software Systems.

Extensions

Page 23: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

23 out of ##QNX Confidential. All content copyright QNX Software Systems.

PDE Build

Generates Deployable plug-in distributions

Can be unpacked into any eclipse install

Includes scripting that can be used for product builds using Eclispe

Page 24: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

24 out of ##QNX Confidential. All content copyright QNX Software Systems.

Eclipse Platform Extensibility

User Interface Elements► Editors► Views► Menu/Toolbar Items► Keyboard Shortcuts► Perspectives► Context Sensitive Help► Property/Preference Pages► New/Import/Export Wizards

Core Elements► Content Types► Startup Behavior

Documented in Platform Plug-in Developer Guide

Page 25: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30-Nov-05

The True Promise of Eclipse:Innovation at Your Fingertips

The C/C++ Development Tooling Project

Page 26: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

26 out of ##QNX Confidential. All content copyright QNX Software Systems.

What is the CDT?

A set of plug-ins that support C and C++ development► Extend many of the Eclipse Platform extension points

Support Edit/Build/Debug cycle

Out-of-the-box support for gnu tools for host development► gcc, g++, gdb, binutils, etc

Platform for integrating other toolchains► Compilers, debuggers, build systems, …

Platform for adding other C/C++ tooling► Code analysis, documentation generation, unit testing

Page 27: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

27 out of ##QNX Confidential. All content copyright QNX Software Systems.

History of the CDT

Project launched July 2002► At QNX headquarters in Ottawa, Canada

Initially populated with contribution from QNX► Additional participation from Rational, MontaVista, and Red Hat► Again, both partners and competitors

CDT releases regularly with latest being 3.0.1 in Nov 2005

Contributions from► QNX - initial contribution, core and debug► Rational/IBM - parser technologies► Intel and Texas Instruments - makefile generation► Wind River - refactoring► Others coming…

Page 28: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

28 out of ##QNX Confidential. All content copyright QNX Software Systems.

CDT Contributors Summit 2005

Held at QNX in October 2005

Discussed a number of design issues► Debug, Build, Indexing

► Enhancing extensibility and scalability

Worked through process issues to make it easier for people to contribute

Participation from 20 different organizations► QNX, Intel, Texas Instruments, Wind River, IBM,

► Nokia, Symbian, Tensilica, Innoopract, ATI/Mentor Graphics,

► UIUC, Los Alamos NL, Ericsson, Cisco, Etnus, MontaVista

► Altera, Seimens, Etnus, Eclipse Foundation

Page 29: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

29 out of ##QNX Confidential. All content copyright QNX Software Systems.

C/C++ Perspective

Page 30: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30 out of ##QNX Confidential. All content copyright QNX Software Systems.

Editor

Syntax coloring

Bracket matching

Keyboard Shortcuts► Commenting out code

► Shifting code left or right

Content assist► Context accurate

Refactoring► Rename

Page 31: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

31 out of ##QNX Confidential. All content copyright QNX Software Systems.

Content Assist

Page 32: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

32 out of ##QNX Confidential. All content copyright QNX Software Systems.

Rename Refactoring

Page 33: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

33 out of ##QNX Confidential. All content copyright QNX Software Systems.

Source Navigation

Outline View with C/C++ Content

Open declaration, definition

C/C++ Search

Open Type, Resource

Features in Progress► Element Browser (Class Browser)

► Type Hierarchy

► Call Hierarchy

Page 34: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

34 out of ##QNX Confidential. All content copyright QNX Software Systems.

C/C++ Search

Page 35: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

35 out of ##QNX Confidential. All content copyright QNX Software Systems.

Build Systems

Standard Make► Invokes existing build systems

► Error parsing to map errors back to source code in editors

► Makefile editor for syntax highlighting and code completion

Managed Make► Adds makefile generation

► Extensibility to allow vendors to plug-in their toolchains

► Automated GUI generation for option settings

► Out-of-the-box support for gcc/ld on host

Page 36: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

36 out of ##QNX Confidential. All content copyright QNX Software Systems.

Managed Build Settings

Page 37: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

37 out of ##QNX Confidential. All content copyright QNX Software Systems.

Debug

Extends Eclipse Core Debugging

Visual debugging showing► Threads

► Stack Frames

► Variables

► Registers

► Memory

Breakpoints with visual stepping through source code

Out-of-the-box support for gdb

Extensible for integrating other debuggers

Page 38: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

38 out of ##QNX Confidential. All content copyright QNX Software Systems.

CDT Debug Perspective

Page 39: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

39 out of ##QNX Confidential. All content copyright QNX Software Systems.

CDT Extensibility

Plug-in help providers for API documentation► At content assist time

Plug-in error parsers for scanning build output to find build errors

Plug-in tool chain definitions for managed build

Plug-in native debuggers

Plug-in indexers for source navigation features

Page 40: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30-Nov-05

The True Promise of Eclipse:Innovation at Your Fingertips

Using the CDT on Large “Legacy” Projects

Page 41: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

41 out of ##QNX Confidential. All content copyright QNX Software Systems.

The Mozilla Project

Eclipse CDT can be used on large “legacy” projects

Scalability and performance testing with Mozilla

Mozilla is a large complex project► 22000 files, 17000 C/C++ files, 5 MLOC, 160MB Source

► Although Open Office is roughly twice the size

CDT has special features for handling large projects like this► They are not the defaults, though

► Setting specific properties is required

Page 42: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

42 out of ##QNX Confidential. All content copyright QNX Software Systems.

Challenges of Large Projects

Eclipse Resource Management System knows about all files► Used to detect when files change

► Drives a number of features including incremental builds, indexing

► Takes two minutes to refresh resource list for Mozilla

► Not noticeable after

CDT knows about all “binary” files► Used to make sure launching correct files

► Takes another two minutes to find binaries in the project

“Binary Search Thread” is shown in the progress

► Not noticeable after

Page 43: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

43 out of ##QNX Confidential. All content copyright QNX Software Systems.

CDT Indexer, the Biggest Challenge

CDT Index used for source navigation features

CDT’s Full indexer does a full parse of the project► Enables all source navigation features

► High accuracy

► But, parsing C++ very processor intensive and time consuming

► 2 secs/file * 17000 files = about 9 hours

Alternative is CDT’s ctags based parser► Does a “smart” scan of the source files to find declarations

► Does not look for references

► Heavy use of macros can “out-smart” ctags

► Very fast, 3 minutes on Mozilla

Page 44: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

44 out of ##QNX Confidential. All content copyright QNX Software Systems.

Loading up Mozilla in CDT

Get the source► Directions on http://www.mozilla.org/developer

Create your .mozconfig file to specify build options► We build the ‘suite’ in debug mode for CDT testing

In Eclipse, turn off Build Automatically► Generally always turn this of for C/C++ development

Create new C++ Standard Make Project► Set project location to the mozilla directory

► Set the build command to be make –f client.mk

► Change ‘all’ in build targets to ‘build’

► Set indexer to ctags

Page 45: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

45 out of ##QNX Confidential. All content copyright QNX Software Systems.

Mozilla in CDT

Page 46: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

46 out of ##QNX Confidential. All content copyright QNX Software Systems.

Searching Mozilla

Page 47: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

47 out of ##QNX Confidential. All content copyright QNX Software Systems.

Debugging Mozilla

Page 48: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30-Nov-05

The True Promise of Eclipse:Innovation at Your Fingertips

QNX Momentics® Development Suite

Page 49: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

49 out of ##QNX Confidential. All content copyright QNX Software Systems.

QNX® Momentics® at a Glance

Page 50: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

50 out of ##QNX Confidential. All content copyright QNX Software Systems.

Target Management

Page 51: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

51 out of ##QNX Confidential. All content copyright QNX Software Systems.

System Profiler

Page 52: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

52 out of ##QNX Confidential. All content copyright QNX Software Systems.

Application Profiling

Page 53: 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software Developer Eclipse CDT Project Lead.

30-Nov-05

Thank You!

Questions and Answers