| Summary: | fireListeners called a huge number of times on startup by CVS decorator | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Tod Creasey <Tod_Creasey> |
| Component: | Team | Assignee: | Kevin McGuire <Kevin_McGuire> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | James_Moody, Kevin_Haaland, Kevin_McGuire |
| Version: | 2.0 | ||
| Target Milestone: | 2.0 M6 | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 10903 | ||
|
Description
Tod Creasey
Problem is that because we compute the decorators in a background thread we must fire the listeners to get desktop to pick up the new decorators we've just computed. Discussed with Tod the issues surrounding it: - we need a way of later giving the decorator to the desktop without firing the update event, especially since this causes all other decorators to recompute themselves needlessly. - not being asked to decorate items which are not visible would help reduce work spent We can do no better with the current API: computing of decorators is expensive and must be done in a background thread, but the current API is not ameanable to this threading. Thus moving the PR to UI. Supported added for multi element label updates and decoration of text and images. The IBatchLabelDecorator (which extends ILabelDecorator) has been added that allows for Decoration of an Image and a Text in the same method invocation using the decorateTextAndImage method. The LabelProviderChangedEvent can now accept an Array of Objects as its elements. The default handleLabelProviderChanged method in StructuredViewer now calls update(Object[],String[]) rather than update(Object,String[]). The previous getElement() API remains and now returns the first element in the list of elements if there is one (otherwise null as before). Moving the PR back to VCM so that it can be closed when the new support is integrated. Will move to new API in M6 Now use array of elements for event |