Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

CDT/LaunchBar

< CDT

Overview

Bug is here. https://bugs.eclipse.org/bugs/show_bug.cgi?id=437392

Implementation is in the org.eclipse.cdt.launchbar.core and org.eclipse.cdt.launchbar.ui plug-ins.

Providers for CDT projects will be in the org.eclipse.cdt.launchbar.cdt.core and org.eclipse.cdt.launchbar.cdt.ui plug-ins.

UI

Screenshot is here:

CDTLaunchBar.png

The LaunchBar is a Tool Control that's inserted into the top trim bar of all workbench windows. It has three selectors (fancy custom combo dropdowns), and three buttons. The three selectors are:

  1. Active Launch Mode
  2. Active Launch Descriptor
  3. Active Launch Target

The buttons are:

  1. Build for launch
  2. Launch
  3. Stop active build and/or launch

There is the concept of active Launch Configuration that is used by the buttons. It is determined by the combination of descriptor type and target type. The edit button (the gear) on the Launch Descriptor allows the user to edit that launch configuration using the launch configuration editor. There is also a shortcut at the bottom of the Descriptor selector to manually create a new Launch Configuration. We'll go into more detail on this in the following sections.

There is also an edit button on the target to change properties for the target, such as communication channel to get to it, etc.

Model

The main requirement for the LaunchBar is to make it unnecessary for the user to have to go to the launch configurations dialogs to create and set up launches. As such there needs to be enough information available to create good default launch configurations for the different tools people will want to launch from there. We've already introduced a few concepts but here's more detail on what they are and a few more that create the entire picture.

Launch Object

A thing that can drive the launch. Out of the box, we have support for ILaunchConfigurations and IProjects as things, but a provider can be added to provide other types of things.

Launch Descriptor

This is the element shown in the middle selector. It represents a Launch Object. Descriptors have a Type that watches for the creation and removal of Launch Objects and manages the creation and removal of Descriptors for those object.

Launch Target

This is the element shown in the right selector. It represents a machine that the launch will run on. Targets have Types which manage the creation and remove of Targets. The Types interface the underlying target management system with the toolbar.

Launch Configuration Provider

This is the object that manages the creation and selection of ILaunchConfiguration used by the buttons and Descriptor edit gear. Providers are registered to a given Launch Descriptor Type and Launch Target Type. They also provide access to the type of the configuration without having to create one. Each provider supports a single launch configuration type.

Launch Mode

This is the element shown in the left selector. It is actually the platform debug ILaunchMode. The list of modes are determined from the ILaunchConfigurationType returned by the Launch Configuration Provider for the currently active Launch Descriptor and Launch Target.

Launch Manager

This is the service that manages the objects, including the current selection of active objects. Each descriptor has an active mode and active target. This is persisted in preference store. The launch manager should only be

Extensibility

There are two extension points provided to allow plug-in developers to add their own content to the LaunchBar, one for core (launchBarContributions) and one for UI (launchBarUIContributions).

Core

The core extension point allows for registration of descriptor types, target types, launch object providers, and launch configuration providers.

Launch Object Provider

The launch object provider watches the system for the creation and removal of launch objects. It calls on the Launch Manager which then passes the objects on to the descriptor types in a priority order.

Launch Descriptor Type Provider

Provides a descriptor type.

Launch Target Type Provider

Provides a target type

Launch Configuration Provider

The provider is mapped to a given descriptor type and target type. It creates the Launch Configurations with default values when asked.

UI

The UI extension point provides label providers, commands, and other UI elements for the LaunchBar itself.

descriptor

Provides a label provider for a descriptor type to managed the icon and text shown for a given descriptor.

target

Provides a label provider for a target type to manage the icon and text shown for a given target. The icon can show state for the target.

Provides a hover provider which shows an element when the mouse hovers over the target (sorta like a fancy tooltip).

Provides an edit command id that's called when the gear for a target is selected.

(Note there is currently an add target command id that feeds a Add New Target entry in the target selector, but we'll probably redo that to match the Add Launch Configuration wizard.)

Copyright © Eclipse Foundation, Inc. All Rights Reserved.