Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 160932 - API for debug context and debug commands
Summary: API for debug context and debug commands
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.3 M3   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 154135
  Show dependency tree
 
Reported: 2006-10-13 16:42 EDT by Darin Wright CLA
Modified: 2006-10-30 11:37 EST (History)
1 user (show)

See Also:


Attachments
patch (155.73 KB, patch)
2006-10-13 16:46 EDT, Darin Wright CLA
no flags Details | Diff
patch (355.96 KB, patch)
2006-10-16 12:18 EDT, Darin Wright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2006-10-13 16:42:06 EDT
As part of bug 154135, we need to make the debug context and debug command adapters API in 3.3.
Comment 1 Darin Wright CLA 2006-10-13 16:45:54 EDT
For a start, I've refactored the provisional 3.2 "action adapters" (such as IAsynchronousStepAdapter), into "commands". The new commands are:

IDisconnectCommand
IDropToFrameCommand
IResumeCommand
IStepIntoCommand
IStepOverCommand
IStepReturnCommand
ISuspendCommand
ITerminateCommand

This generalizes the commands to all have the same interface of "execute" and "canExecute". I.e - check if the command can be performed, and perform it. Rather than having each action update its enablement as the context changes, the context service performs command updating after context change notification, such that all interested parties in a particular command enablement are coalesced. This reduces the 32 (or so) enablement jobs to 8ish. Should be more efficient.
Comment 2 Darin Wright CLA 2006-10-13 16:46:24 EDT
Created attachment 51980 [details]
patch

current work in progress
Comment 3 Michael Rennie CLA 2006-10-13 17:01:20 EDT
I tried the patch and it works flawlessly on Linux....I am mildly amused....
Comment 4 Darin Wright CLA 2006-10-16 12:18:08 EDT
Created attachment 52040 [details]
patch

updated patch - all actions are converted to the command format.
Comment 5 Darin Wright CLA 2006-10-25 15:50:10 EDT
Released debug context API to HEAD. See new package:
     org.eclipse.debug.ui.contexts

The IDebugContextManager is available from:
     DebugUITools.getDebugContextManager()

The API is slightly changed from the provisional API to be more extensible. A context listener is passed a context event rather than a part/selection. The event provides access to the selection (context), context provider, and a bit mask of flags indicating how the context has changed.
Comment 6 Darin Wright CLA 2006-10-26 17:10:41 EDT
Released new API package org.eclipse.debug.ui.commands that defines the APIs for common debug commands. Actions in the debug platform delegate to the commands for enablement and execution of a command.

API for commands and context service are now "complete" (in the sense that the provisional API is now public and subject to change over the 3.3 release).

Note that the two interfaces that I can see "moving" are IStatusMonitor and IBooleanStatusMonitor. These are general interfaces that are also used in the viewer flexible hierarchy implementation (which is not yet public API). Depending on where the viewer implementation ends up (i.e. JFace or in the debug platform), these interfaces may move to a new package or plug-in during the 3.3 time frame.
Comment 7 Darin Wright CLA 2006-10-26 17:11:22 EDT
Fixed. Please open new bugs as required.

Please verify, Mike.
Comment 8 Michael Rennie CLA 2006-10-30 11:37:36 EST
verified