if (dialog.open() == Window.OK) {
BusyIndicator.showWhile(
Display.getCurrent(),
new Runnable() {
public void run() {
CustomConverterData data = dialog.getData();
Element element = getModel().getDocument().createElement("converter");
element.setAttribute("type", data.getCustomConverterName());
Element classA = getModel().getDocument().createElement("class-a");
element.appendChild(classA);
org.eclipse.core.dom.utils.DOMUtils.setTextContent(classA, data.getClassA());
Element classB = getModel().getDocument().createElement("class-b");
element.appendChild(classB);
org.eclipse.core.dom.utils.DOMUtils.setTextContent(classB, data.getClassB());
IObservableList values = (IObservableList)getTableViewer().getInput();
values.add(element);
}
});