Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 97737

Summary: [CellEditors] combo cell editor pops up in unexpected location in task view column
Product: [Eclipse Project] Platform Reporter: Susan McCourt <susan>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: gunnar, krzysztof.michalski, Mike_Wilson, Tod_Creasey
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
My cell editor ...
none
Attachment again
none
Patch for the cell editor
none
Icon for the normal state
none
Screen cap showing small priority icons none

Description Susan McCourt CLA 2005-05-31 17:08:01 EDT
3.1 RC1, Windows XP
- open the tasks view
- click in the priority column (the second column) to change the priority of 
a "normal" (blank in the column) task
- the combo cell editor overlays the column when the column is empty
    problem 1: this is somewhat distracting/disconcerting
- change the value to "high" and click on another task
- the cell now has the high prio icon in it
- click on the cell again to edit it. 
- now the combo cell editor is displayed to the right of the column
    problem 2:  this is inconsistent with the behavior when the column is empty

It seems to treat the empty column specially, but the fact that the column is 
empty is as meaningful as it having an icon, so I would expect the combo cell 
editor to pop up to the right of the column in both cases.
Comment 1 Eric Moffatt CLA 2005-07-20 15:31:37 EDT
This is a function of the 'computeBounds' method in the TableEditor class. It 
(likely intentionally) offsets the bounds to 'skip' the image. My guess is that 
this is to support 'imaged' labels, where the edit control should indeed show 
up bounded only by the text area.

We might hack around this by supplying a fully transparent 'image' for 
the 'normal' state...making it the same as the other two states that already 
have images.
Comment 2 Szymon Brandys CLA 2006-05-15 09:20:57 EDT
Instead of the transparent image for the normal state, we can show editor always as in the normal state.

I think that we can cover the image with the editor for high and low state.
Comment 3 Szymon Brandys CLA 2006-05-15 09:38:52 EDT
Created attachment 41441 [details]
My cell editor ...

I think it is good idea to separate view mode and edit mode of the cell.
Here you have a screenshot how it can look like.

To achieve this we have to modify computeBounds() method in TreeEditor.

Rectangle computeBounds () {
	if (item == null || column == -1 || item.isDisposed()) 
          return new Rectangle(0, 0, 0, 0);
	
        Rectangle cell = item.getBounds(column);
	Rectangle rect = item.getImageBounds(column);

	(-) cell.x = rect.x + rect.width;
	
	(-) cell.width -= rect.width;
	
        Rectangle area = tree.getClientArea();
Comment 4 Gunnar Wagenknecht CLA 2006-05-15 09:41:16 EDT
(In reply to comment #3)
> Created an attachment (id=41441) [edit]

I can't view the attachment. I think the content type is wrong.
Comment 5 Szymon Brandys CLA 2006-05-15 09:43:34 EDT
Created attachment 41442 [details]
Attachment again
Comment 6 Szymon Brandys CLA 2006-05-16 08:41:15 EDT
Created attachment 41579 [details]
Patch for the cell editor
Comment 7 Szymon Brandys CLA 2006-05-16 08:47:10 EDT
Comment on attachment 41579 [details]
Patch for the cell editor

This is change in the swt TreeEditor, so maybe it will be easier to add this transparent image ;-)
Comment 8 Eric Moffatt CLA 2006-05-16 09:48:29 EDT
Szymon, I think that you're correct in determining that changing the SWT behaviour is not the way to go. We are being inconsistent in how we define the 'cell' (low/high have images and 'normal' doesn't) which is giving us inconsistent behaviour in the GUI.

If you want to go the 'blank icon' route remember to make it fully 'transparent', not a block of a particular color so that it'll work on all colour schemes/themes...
Comment 9 Szymon Brandys CLA 2006-05-16 11:37:45 EDT
Created attachment 41598 [details]
Icon for the normal state

Finally I added icon for the normal priority.

If we want to have the same behaviour for all priorities,
that normal icon should be introduced. The graphic team 
should prepare a nice icon...
Comment 10 Szymon Brandys CLA 2006-05-16 15:42:26 EDT
Comment on attachment 41598 [details]
Icon for the normal state

I removed try/catch statement from the getImage   method because it is no longer necessary. I included it in the patch as well.
Comment 11 Eric Moffatt CLA 2006-05-17 10:09:32 EDT
Created attachment 41719 [details]
Screen cap showing small priority icons


I'm not sure what's changed but this is what I get on my machine
Comment 12 Krzysztof Michalski CLA 2006-05-18 03:48:35 EDT
I apply this patch and everything seems ok. I have a normal size of icon.
Comment 13 Eric Moffatt CLA 2006-05-23 11:47:37 EDT
Szymon, I've just tried this again with RC5 and it works fine for me now. I'll mark this for 3.3 (and start the process going to get a 'real' icon...;-).

Thanks


Comment 14 Eric Moffatt CLA 2006-05-23 13:02:21 EDT
Tod, can you open a request in the image database for the icon?
Thanks dude.
Comment 15 Tod Creasey CLA 2006-05-23 13:50:36 EDT
Eric where would this image live?
Comment 16 Eric Moffatt CLA 2006-07-05 13:55:16 EDT
The same place as the current 'high' and 'low' priority icons...see 'FieldPriority'...
Comment 17 Eric Moffatt CLA 2007-09-11 11:17:13 EDT
Too much on my plate...;-(.
Comment 18 Eclipse Webmaster CLA 2019-09-06 16:16:36 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 19 Eclipse Genie CLA 2022-02-13 14:58:36 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.