30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software...
-
Upload
colleen-mckinney -
Category
Documents
-
view
223 -
download
1
Transcript of 30-Nov-05 The True Promise of Eclipse: Innovation at Your Fingertips Doug Schaefer Senior Software...
30-Nov-05
The True Promise of Eclipse:Innovation at Your Fingertips
Doug SchaeferSenior Software DeveloperEclipse 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
30-Nov-05
The True Promise of Eclipse:Innovation at Your Fingertips
What is Eclipse?
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
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
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
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
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
30-Nov-05
The True Promise of Eclipse:Innovation at Your Fingertips
The Eclipse Platform
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
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
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
13 out of ##QNX Confidential. All content copyright QNX Software Systems.
Help System
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
15 out of ##QNX Confidential. All content copyright QNX Software Systems.
Synchronization Perspective
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
30-Nov-05
The True Promise of Eclipse:Innovation at Your Fingertips
Eclipse Extensibility
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
19 out of ##QNX Confidential. All content copyright QNX Software Systems.
Plug-ins
20 out of ##QNX Confidential. All content copyright QNX Software Systems.
Extension Points
21 out of ##QNX Confidential. All content copyright QNX Software Systems.
Extension Point Schemas
22 out of ##QNX Confidential. All content copyright QNX Software Systems.
Extensions
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
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
30-Nov-05
The True Promise of Eclipse:Innovation at Your Fingertips
The C/C++ Development Tooling Project
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
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…
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
29 out of ##QNX Confidential. All content copyright QNX Software Systems.
C/C++ Perspective
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
31 out of ##QNX Confidential. All content copyright QNX Software Systems.
Content Assist
32 out of ##QNX Confidential. All content copyright QNX Software Systems.
Rename Refactoring
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
34 out of ##QNX Confidential. All content copyright QNX Software Systems.
C/C++ Search
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
36 out of ##QNX Confidential. All content copyright QNX Software Systems.
Managed Build Settings
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
38 out of ##QNX Confidential. All content copyright QNX Software Systems.
CDT Debug Perspective
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
30-Nov-05
The True Promise of Eclipse:Innovation at Your Fingertips
Using the CDT on Large “Legacy” Projects
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
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
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
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
45 out of ##QNX Confidential. All content copyright QNX Software Systems.
Mozilla in CDT
46 out of ##QNX Confidential. All content copyright QNX Software Systems.
Searching Mozilla
47 out of ##QNX Confidential. All content copyright QNX Software Systems.
Debugging Mozilla
30-Nov-05
The True Promise of Eclipse:Innovation at Your Fingertips
QNX Momentics® Development Suite
49 out of ##QNX Confidential. All content copyright QNX Software Systems.
QNX® Momentics® at a Glance
50 out of ##QNX Confidential. All content copyright QNX Software Systems.
Target Management
51 out of ##QNX Confidential. All content copyright QNX Software Systems.
System Profiler
52 out of ##QNX Confidential. All content copyright QNX Software Systems.
Application Profiling
30-Nov-05
Thank You!
Questions and Answers