Eclipse Debug Views Update Policy Agenda Background Requirements
Eclipse Debug Views Update Policy
Agenda § Background § Requirements § How does it work now? § How to make it more flexible? 2
Background § Debug Views Update is inflexible and is driven by a predefined set of events. § Model cannot control when / how updates are to be commenced § Difficult to define a strategy that is suitable for all debug adapters. 3
Requirements § Make debug views update more flexible – give models better control. § Allow a view to have different update policies. § Allow models to specify different update policies for different views. § Example Policies: 4 Update what’s visible 4 Update nothing 4 Update all 4 Periodic update 4 Etc. 4
How does it work now? 5
How to make it more flexible? § Replace static event handler with pluggable updaters. § Updater are bound to a view using the view id and the model identifier of the input element. § Create updater when new input is set to the view. § Updater controls when view is to be populated. 6
How to make it more flexible? § Specialized updaters 4 Selection Event Updater 4 Debug Event Updater 4 Delayed Debug Event Updater 4 Timer Updater 4 Preference Store Changed Updater 4 Etc. § Updaters are responsible for controlling when a view gets content from the model. § Extends IDebug. View: IDebug. View. Extension. 4 APIs to allow updaters to update views. § Debug Platform is to provide implementations to some generic updaters. § Clients can also implement their own updaters. 7
Contributing Updaters – extension point § Clients can contribute an updater to a specific view. § Updaters are bound by model identifier and view id. § If no updater is specified, a debug view uses its current event handler as its updater. 8
Handling Multi-Targets View § Views showing content from different targets simultaneously. § Example: Debug View, Expression View § View has static view input. § Retrieve updater as new models are added. § Updaters are responsible to update elements from its model, not the entire view. 9 Multi-Targets View Static View Input Updater 1 Model A Updater 2 Update (element. A) Model B Updater 3 Update (element. B) Model C Updater 4 Update (element. C)
Fitting into the new scheme… § Separate out logic of view updates from view. § Updaters have no knowledge about its view. Generic Debug View IDebug. Element 4 View updates are performed via a generic interface. § Views are not tied to any updater. 4 View event notifications are also performed via a generic interface. § Generic View needs to handle view updater extension point and honor contributed updaters. § Easy to migrate. 10 Generic Interface for View Events Notification Generic Interface for Update (Update an element and its children) View Updaters
- Slides: 11