Bug 306768 - ElementLabelProvider doesn't handle mixed label provider properly
Summary: ElementLabelProvider doesn't handle mixed label provider properly
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Pawel Piech CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on:
Blocks:
 
Reported: 2010-03-22 17:25 EDT by Patrick Chuong CLA
Modified: 2010-05-10 15:21 EDT (History)
3 users (show)

See Also:
darin.eclipse: review+


Attachments
screen capture (48.91 KB, image/pjpeg)
2010-03-22 17:26 EDT, Patrick Chuong CLA
no flags Details
fix (8.04 KB, patch)
2010-05-10 13:28 EDT, Patrick Chuong CLA
pawel.1.piech: iplog+
Details | Diff
Added @since tags. (5.98 KB, patch)
2010-05-10 13:53 EDT, Pawel Piech CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Chuong CLA 2010-03-22 17:25:13 EDT
Build Identifier: 3.6 M6

I am working with the breakpoints view with column support, when I have my own debugger up (non-java debug conetxt), than the column show repeated label for a Java breakpoint, as well as repeated icon for each column. The ElementLabelProvider should some how pass a default column id to the getLabel (or getImageDescriptor, etc...) API, so that label provider can determine what to return for the default column and what else to return for non-default column.

See the attached screen capture.

Reproducible: Always
Comment 1 Patrick Chuong CLA 2010-03-22 17:26:20 EDT
Created attachment 162724 [details]
screen capture
Comment 2 Pawel Piech CLA 2010-03-24 13:13:45 EDT
Seems like a fairly simple fix, can you supply a patch?
Comment 3 Dobrin Alexiev CLA 2010-03-24 14:54:31 EDT
Pawel, Patrick is on valaction for the next few weeks. 
He can look at it when he comes back, but he is afraid it may be too late.
Comment 4 Patrick Chuong CLA 2010-05-10 13:28:40 EDT
Created attachment 167763 [details]
fix

Pawel, I added two new methods in ElementLabelProvider that contains the columnIndex, subclass can override these methods to handle column label, such as the BreakpointLabelProvider.

I don't know whether this is the right thing to do without changing the existing API from ElementLabelProvider.
Comment 5 Pawel Piech CLA 2010-05-10 13:53:22 EDT
Created attachment 167769 [details]
Added @since tags.
Comment 6 Pawel Piech CLA 2010-05-10 13:55:36 EDT
I think the change makes sense as a polish item.  It adds a couple of new methods but they are not in an API (not even a provisional one).  

Darin do you agree?
Comment 7 Darin Wright CLA 2010-05-10 15:20:41 EDT
Ideally, we'd just be able to recognize some column ID as the first/only column... but since there are no common column names, I think the column index is required.

+1
Comment 8 Darin Wright CLA 2010-05-10 15:21:28 EDT
Applied/Fixed.