use of org.talend.commons.utils.data.list.ListenableList in project tdi-studio-se by Talend.
the class MetadataImportXmlCommand method execute.
/*
* (non-Javadoc)
*
* @see org.talend.core.ui.metadata.extended.command.MetadataImportXmlCommand#execute()
*/
@Override
public void execute() {
try {
removed = new ArrayList<IMetadataColumn>(extendedTableModel.getBeansList());
extendedTableModel.removeAll(removed);
added = MetadataSchema.initializeColumns(file);
extendedTableModel.addAll(added, true, false);
if (extendedTableModel.getBeansList() instanceof ListenableList) {
ListenableList beanList = (ListenableList) extendedTableModel.getBeansList();
beanList.fireReplacedEvent(0, removed, added, false);
}
} catch (Exception e) {
new ErrorDialogWidthDetailArea(null, XmlMapPlugin.PLUGIN_ID, "Can not import schema from invalid xml", ExceptionUtils.getFullStackTrace(e));
ExceptionHandler.process(e);
}
}
Aggregations