mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 08:15:48 +02:00
fix for Bug 159084
This commit is contained in:
parent
94fc5f01e8
commit
3e83efc143
1 changed files with 1 additions and 8 deletions
|
@ -93,14 +93,12 @@ public class SystemComboBoxCellEditor extends CellEditor
|
||||||
selection = 0;
|
selection = 0;
|
||||||
//this.readOnly = readOnly;
|
//this.readOnly = readOnly;
|
||||||
setValueValid(true);
|
setValueValid(true);
|
||||||
System.out.println("Exiting ctor");
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Change the input items
|
* Change the input items
|
||||||
*/
|
*/
|
||||||
public void setItems(String[] items)
|
public void setItems(String[] items)
|
||||||
{
|
{
|
||||||
System.out.println("inside setItems");
|
|
||||||
this.items = items;
|
this.items = items;
|
||||||
populateComboBoxItems();
|
populateComboBoxItems();
|
||||||
setValueValid(true);
|
setValueValid(true);
|
||||||
|
@ -110,7 +108,6 @@ public class SystemComboBoxCellEditor extends CellEditor
|
||||||
*/
|
*/
|
||||||
protected Control createControl(Composite parent)
|
protected Control createControl(Composite parent)
|
||||||
{
|
{
|
||||||
System.out.println("inside createControl");
|
|
||||||
if (!readOnly)
|
if (!readOnly)
|
||||||
comboBox = new CCombo(parent, SWT.NONE);
|
comboBox = new CCombo(parent, SWT.NONE);
|
||||||
else
|
else
|
||||||
|
@ -133,12 +130,10 @@ public class SystemComboBoxCellEditor extends CellEditor
|
||||||
|
|
||||||
// must set the selection before getting value
|
// must set the selection before getting value
|
||||||
selection = comboBox.getSelectionIndex();
|
selection = comboBox.getSelectionIndex();
|
||||||
System.out.println("Inside widgetSelected. selection = " + selection);
|
|
||||||
Object newValue = doGetValue();
|
Object newValue = doGetValue();
|
||||||
|
|
||||||
|
|
||||||
boolean newValidState = isCorrect(newValue);
|
boolean newValidState = isCorrect(newValue);
|
||||||
System.out.println("Inside widgetSelected. selection = " + selection + ", " + newValidState);
|
|
||||||
if (newValidState) {
|
if (newValidState) {
|
||||||
doSetValue(newValue);
|
doSetValue(newValue);
|
||||||
} else {
|
} else {
|
||||||
|
@ -170,7 +165,6 @@ public class SystemComboBoxCellEditor extends CellEditor
|
||||||
*/
|
*/
|
||||||
protected Object doGetValue()
|
protected Object doGetValue()
|
||||||
{
|
{
|
||||||
System.out.println("Inside doGetValue");
|
|
||||||
return new Integer(selection);
|
return new Integer(selection);
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -190,7 +184,6 @@ public class SystemComboBoxCellEditor extends CellEditor
|
||||||
*/
|
*/
|
||||||
protected void doSetValue(Object value)
|
protected void doSetValue(Object value)
|
||||||
{
|
{
|
||||||
System.out.println("in doSetValue: " + comboBox + ", " + value);
|
|
||||||
if (!(value instanceof Integer))
|
if (!(value instanceof Integer))
|
||||||
{
|
{
|
||||||
String[] items = comboBox.getItems();
|
String[] items = comboBox.getItems();
|
||||||
|
|
Loading…
Add table
Reference in a new issue