Bug 77001

Summary: [Viewers] ColorCellEditor is displayed instead of TextCellEditor
Product: [Eclipse Project] Platform Reporter: Ole Laurisch <Ole.Laurisch>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 Keywords: needinfo
Version: 2.1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Ole Laurisch CLA 2004-10-26 06:53:36 EDT
Hello,

I have a dialog with a TableViewer with four columns A, B, C and D. Those
columns have the following CellEditors:

A: none
B: TextCellEditor
C: TextCellEditor
D: ColorCellEditor

If I click into a D-field a ColorCellEditor is opened correctly. The
TextCellEditors are also opened correctly.

But when I do the following clicks

into record one, field D
into record one, field B
into record two, field B

first a ColorCellEditor is opened in one-D, then a TextCellEditor is opened
in one-B (both correct) and then a TextCellEditor is opened in two-B. With
the last click into two-B also the Editor in one-B changes into a
ColorCellEditor, which definitely isn't correct nor reasonable.

I can observe the same behaviour in another dialog which is a code example
from the chapter 14 (PersonEditor) from the book "The definitive guide to SWT 
and JFace" by Rob Warner.
Comment 1 Veronika Irvine CLA 2004-10-26 10:21:03 EDT
Can you give a small code example showing this problem?
Comment 2 Ole Laurisch CLA 2004-10-27 10:43:25 EDT
This code example should show the problem.

Integrate this in any dialog with a TableViewer. The CellModifier need probably 
not to been implemented with any reasonable code.


private static final String[] PROPS =
		{ A, B, C, D};

Tableviewer myTableViewer= new TableViewer(myTable);
myTableViewer.setColumnProperties(PROPS);
myTableViewer.setCellModifier(
			new MyCellModifier(this, myTableViewer));
		CellEditor[] editors = new CellEditor[4];
		editors[1] = new TextCellEditor(myTable);
		editors[2] = new TextCellEditor(myTable);
		editors[3] = new ColorCellEditor(myTable);
		myTableViewer.setCellEditors(editors);

		addTableListener(myTable);
		
Comment 3 Veronika Irvine CLA 2004-11-29 13:57:31 EST
Moving to UI team since code sample is all JFace code.  

Ole, I notice that your eclipse version is 2.1.1.  Please try with 3.0.
Comment 4 Boris Bokowski CLA 2007-06-20 16:19:10 EDT
Is this still a problem in 3.3?
Comment 5 Boris Bokowski CLA 2009-11-26 09:43:10 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 6 Eclipse Webmaster CLA 2019-09-06 15:36:43 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.