use of org.talend.sqlbuilder.ui.SQLPropertyDialog in project tdi-studio-se by Talend.
the class ShowQueryPropertyAction method run.
@Override
public void run() {
RepositoryNode node = (RepositoryNode) getStructuredSelection().getFirstElement();
QueryRepositoryObject object = (QueryRepositoryObject) node.getObject();
Query query = object.getQuery();
String oldQuery = query.getLabel();
// Finds the root
node = SQLBuilderRepositoryNodeManager.getRoot(node);
List<String> existingName = repositoryNodeManager.getALLQueryLabels(node);
SQLPropertyDialog saveSQLDialog = new SQLPropertyDialog(dialog.getShell(), true);
saveSQLDialog.setQuery(query);
if (Window.OK == saveSQLDialog.open()) {
query = saveSQLDialog.getQuery();
repositoryNodeManager.saveQuery(node, query, oldQuery);
dialog.refreshNode(node);
dialog.notifySQLBuilder(node.getObject());
}
}
Aggregations