Commit fb864f90 authored by Andrey Filippov's avatar Andrey Filippov

Moved enum-type parameter labels to tooltips

parent 05faded9
......@@ -43,7 +43,22 @@ public class ComboComponent extends GeneralComponent {
comboField = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
comboField.setLayoutData(gridData);
comboField.setItems(type.getLabels());
// comboField.setItems(type.getLabels());
comboField.setItems(type.getValues());
StringBuilder sb= new StringBuilder();
String [] values=type.getValues();
String [] labels=type.getLabels();
for (int i=0;i<type.getValues().length;i++){
sb.append("\"");
sb.append(values[i]);
sb.append("\" - ");
sb.append(labels[i]);
if (i<(values.length-1)){
sb.append("\n\n");
}
}
comboField.setToolTipText(sb.toString());
comboField.setMenu(createPopupMenu(comboField.getShell()));
endCreateControl();
......
......@@ -43,7 +43,7 @@ public class ListOption implements IOption {
}
/**
* Return core option (optiuon without UI elements)
* Return core option (option without UI elements)
*/
public Option getOption() {
return option;
......
......@@ -35,10 +35,12 @@ public class ListTabComponent extends AbstractTabComponent {
, Parameter toolParameter )
{
super(tab, new ComboComponent(toolParameter));
System.out.println("Created ListTabComponent, label= "+toolParameter.getLabel());
}
public void createControl(Composite parent) {
super.createControl(parent);
System.out.println("createControl(), parent= "+parent);
WidgetListener listener = new WidgetListener();
getComboField().addSelectionListener(listener);
getComboField().addModifyListener(listener);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment