* Sort items to alphabetical order.\r
*/\r
private void sort() {\r
- // First sort all items\r
TableItem[] connectedVariables = variableTable.getItems();\r
Collator collator = Collator.getInstance(Locale.getDefault());\r
for (int i = 1; i < connectedVariables.length; i++) {\r
for (int j = 0; j < i; j++) {\r
String value2 = connectedVariables[j].getText(0);\r
if (collator.compare(value1, value2) < 0) {\r
- String[] values = { connectedVariables[i].getText(0),\r
- connectedVariables[i].getText(1) };\r
+ String value = connectedVariables[i].getText(0);\r
connectedVariables[i].dispose();\r
TableItem item2 = new TableItem(variableTable, SWT.NONE, j);\r
- item2.setText(values);\r
- item2.setData(values);\r
+ item2.setText(value);\r
+ item2.setData(value);\r
connectedVariables = variableTable.getItems();\r
break;\r
}\r