use of org.talend.sqlbuilder.ui.ISQLBuilderDialog in project tdi-studio-se by Talend.
the class CreateTableCommand method execute.
@Override
public void execute() {
for (MetadataTable metadataTable : metaTables) {
if (!tableNames.contains(metadataTable.getSourceName())) {
Table table = new Table();
table.setMetadataTable(metadataTable, null);
table.setErDiagram(erDiagram);
erDiagram.addTable(table);
erDiagram.getMetadataTables().add(metadataTable);
}
}
IRunnableWithProgress progress = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
//$NON-NLS-1$
monitor.beginTask("", IProgressMonitor.UNKNOWN);
try {
fks = EMFRepositoryNodeManager.getInstance().getPKFromTables(erDiagram.getMetadataTables(), erDiagram.getErDiagramComposite().getDialog().getSelectedContext());
} finally {
monitor.done();
}
}
};
ISQLBuilderDialog dialog = erDiagram.getErDiagramComposite().getDialog();
UIUtils.runWithProgress(progress, true, dialog.getProgressMonitor(), dialog.getShell());
erDiagram.setRelations(fks);
}
Aggregations