use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.StatementTreeObject in project convertigo by convertigo.
the class EnableStatementAction method run.
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DatabaseObjectTreeObject treeObject = null;
Statement statement = null;
TreeObject[] treeObjects = explorerView.getSelectedTreeObjects();
for (int i = treeObjects.length - 1; i >= 0; i--) {
treeObject = (DatabaseObjectTreeObject) treeObjects[i];
if (treeObject instanceof StatementTreeObject) {
StatementTreeObject statementTreeObject = (StatementTreeObject) treeObject;
statement = (Statement) statementTreeObject.getObject();
statement.setEnabled(true);
statementTreeObject.setEnabled(true);
statementTreeObject.hasBeenModified(true);
}
}
explorerView.refreshSelectedTreeObjects();
}
} catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to enable statement!");
} finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
Aggregations