Welcome!

Open Source Cloud Authors: Simon Hill, Stackify Blog, Liz McMillan, Vaibhaw Pandey, Pat Romanski

Related Topics: Open Source Cloud, Eclipse

Open Source Cloud: Article

Getting the Most Out of Eclipse CDT 3.0

Scaling the DOM

Eclipse has emerged as the platform that finally integrates development tools from multiple vendors into a common, extensible, and widely supported framework. The Eclipse CDT development environment brings this rich offering of integrated tools to the world of C and C++ programming, enabling C/C++ developers to improve their productivity and enhance the quality of the software they produce.

The CDT project began in the summer of 2002 with source code donated by QNX Software Systems. Since then, developers from a number of organizations have contributed to the CDT, helping it evolve into a mature commercial-quality development environment. This diverse participation, which lets the CDT address the needs of a wide audience of developers, brings together the best minds in the C/C++ IDE industry.

In the summer of 2005, the CDT project team released CDT 3.1, which offers a feature set that closely matches the capabilities of other commercial and Open Source development environments. When designing version 3.1, the CDT team paid special attention to scalability for large development projects and laid the foundations that will allow the CDT to grow beyond the edit/compile/debug cycle of development.

This article walks through the CDT, with a special focus on features introduced in CDT 3.1. We'll also preview upcoming features that will make the CDT even more responsive and scalable than it is today. We'll then discuss the growing adoption of the CDT and how you can contribute to it.

CDT Overview
The CDT has three major components:

  • CDT Core - helps developers create, edit, and navigate projects
  • CDT Build - integrates with build tools to create executables for projects
  • CDT Debug - integrates with native debuggers to help developers debug those executables
CDT Core
The CDT Core comprises several components, including project wizards, a source code editor, and a source code navigation system.
Project wizards

The project wizards help simplify the task of creating CDT projects. There is a wizard for each language (C and C++) (see Figure 1) and for each supported build system. Using the wizards, developers can quickly set the properties and build settings for a project, as well as enable or disable optional CDT features.

Source Code Editor
The CDT source code editor provides a modern feature set for browsing and editing C/C++ source. For instance, the editor:

  • Colorizes keywords and literals in the source code
  • Displays the location of matching brackets and braces
  • Offers code-formatting features for shifting code left and right and for commenting and uncommenting out lines of code
  • Provides code completion - the user can type the prefix of an identifier and then select from a list of possible completions for that identifier
With its built-in parser, the CDT provides a very accurate list of code completions based on the context of the code that the user is writing. (see Figure 2) This feature saves the time required to type in the completions and provides API assistance that frees the developer from having to rely on printed manuals.

Source Navigation
The CDT provides several features to help the developer navigate through the code in a project. These features are particularly useful when the developer is new to a project and doesn't necessarily know where certain pieces of code are defined or referenced. (see Figure 3)

The Document Object Model, or DOM, is at the core of the CDT's source-navigation features. The DOM provides a database of syntax and semantic information that's captured by the CDT's built-in parsers for C and C++. This database persists between sessions in an index that the CDT builds as files are saved in the file system.

The DOM supports several source navigation features, including:

  • C/C++ Projects View - Helps the developer navigate projects by providing a C/C++-centric view of source code, elements, and libraries.
  • Outline View - Shows declarations from source files. If the developer clicks on a declaration, the source-code editor will "jump" directly to the source line where the declaration occurs.
  • Search features - For looking up declarations, definitions, and references to identifiers defined in the source code or entered through dialogs. The developer can browse the search results. If the developer clicks on a result, the source code editor will jump to the corresponding point in the source file.
  • Source-code refactoring - Lets developers change the structure of their code without changing its behavior. The most common form is rename refactoring, which propagates an identifier name change to all uses of that identifier. By using the DOM, the refactoring engine makes intelligent decisions to ensure that the changes don't cause compile errors.
The New Fast Indexer
For CDT version 3.1, a major restructuring has taken place surrounding the CDT's source indexing functionality that feeds information to many of the Source Navigation features. The new "Fast" indexer uses the CDT's internal parser to populate the index database. However, instead of doing full parsing as is done by CDT's "Full" indexer, the "Fast" indexer takes a number of shortcuts to reduce the amount of work that needs to be done to generate the index information. The most important short cut is to reuse parse information between files, thus eliminating the need to parser header files every time they were included in other files. With these heuristics, the "Fast" indexer is able to parser Mozilla in about a quarter the time than the Full indexer. In addition, index updates when file changes occur also benefit from this reuse of information, resulting in update times of under a second in most cases. In all, this leads to much better UI response times while working on C/C++ projects..

Integrating Third-Party Tool Chains
Using the managed build system, vendors can provide descriptions of their tool chains, including option settings and the file extensions of the files that the tools will use as input and generate as output. The CDT uses this information to adapt the property dialogs, allowing options to be set per project and per file. The CDT also uses this information, along with user settings, to generate the build files, usually makefiles, that are used for the build. Out-of-the-box the CDT provides integration with the prolific gcc tool chain for host development.

To support the DOM, the CDT needs build information to properly parse the source files in a project. The main information required consists of the header-file include paths and the command-line macro settings used by the preprocessor. For managed build projects, the CDT gathers this information from the user settings on the tool options. The managed build system will also determine and supply the built-in settings for the compiler being used for the build.


More Stories By Doug Schaefer

Doug Schaefer is project lead, Eclipse CDT project senior software engineer, QNX Software Systems.

Comments (2) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
SYS-CON Italy News Desk 08/07/06 03:43:46 PM EDT

Eclipse has emerged as the platform that finally integrates development tools from multiple vendors into a common, extensible, and widely supported framework. The Eclipse CDT development environment brings this rich offering of integrated tools to the world of C and C++ programming, enabling C/C++ developers to improve their productivity and enhance the quality of the software they produce.

Eclipse News Desk 08/07/06 01:43:25 PM EDT

Eclipse has emerged as the platform that finally integrates development tools from multiple vendors into a common, extensible, and widely supported framework. The Eclipse CDT development environment brings this rich offering of integrated tools to the world of C and C++ programming, enabling C/C++ developers to improve their productivity and enhance the quality of the software they produce.

@ThingsExpo Stories
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...