use of org.eclipse.jface.dialogs.ProgressMonitorDialog in project generator by mybatis.
the class RunGeneratorAction method run.
public void run(IAction action) {
Shell shell = new Shell();
if (!MessageDialog.openConfirm(shell, "Deprecated Funtionality", DEPRECATION_MESSAGE)) {
return;
}
try {
List<String> warnings = new ArrayList<String>();
ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
IRunnableWithProgress thread = new GeneratorRunner(warnings);
dialog.run(true, true, thread);
if (warnings.size() > 0) {
MultiStatus ms = new MultiStatus(Activator.PLUGIN_ID, Status.WARNING, "Generation Warnings Occured", null);
Iterator<String> iter = warnings.iterator();
while (iter.hasNext()) {
Status status = new Status(Status.WARNING, Activator.PLUGIN_ID, Status.WARNING, iter.next(), null);
ms.add(status);
}
ErrorDialog.openError(shell, "MyBatis Generator", "Run Complete With Warnings", ms, Status.WARNING);
}
} catch (Exception e) {
handleException(e, shell);
}
}
use of org.eclipse.jface.dialogs.ProgressMonitorDialog in project cubrid-manager by CUBRID.
the class TableSchemaCompareInfoPart method fetchCountOfRecords.
private void fetchCountOfRecords() {
// FIXME logic code move to core module
final Set<String> selectedItemKeys = new HashSet<String>();
TableItem[] items = tablesSchemaCompareTable.getTable().getSelection();
for (TableItem item : items) {
if (item == null) {
continue;
}
String src = item.getText(1).equals(Messages.statusMissing) ? "" : item.getText(1);
String dst = item.getText(2).equals(Messages.statusMissing) ? "" : item.getText(2);
String key = src + "$" + dst;
selectedItemKeys.add(key);
}
if (selectedItemKeys.size() == 0) {
CommonUITool.openWarningBox(Messages.warnNotSelectedTables);
return;
}
String msg = Messages.tablesDetailCompareBtnEsitmateRecordAlert;
if (!CommonUITool.openConfirmBox(msg)) {
return;
}
try {
new ProgressMonitorDialog(this.getSite().getShell()).run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) {
fetchRecordCountProcess(monitor, selectedItemKeys);
}
});
} catch (Exception e) {
LOGGER.debug("", e);
}
tablesSchemaCompareTable.refresh();
}
use of org.eclipse.jface.dialogs.ProgressMonitorDialog in project cubrid-manager by CUBRID.
the class BrokerLogTopMergeProgress method merge.
/**
* createDatabaseWithProgress return database name
*
* @return Catalog
*/
public boolean merge() {
Display display = Display.getDefault();
display.syncExec(new Runnable() {
public void run() {
try {
new ProgressMonitorDialog(null).run(true, false, BrokerLogTopMergeProgress.this);
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
});
return success;
}
use of org.eclipse.jface.dialogs.ProgressMonitorDialog in project cubrid-manager by CUBRID.
the class OpenSerialDetailInfoPartProgress method loadSerialInfoList.
/**
* load serialinfo list
*
* @return Catalog
*/
public void loadSerialInfoList() {
Display display = Display.getDefault();
display.syncExec(new Runnable() {
public void run() {
try {
new ProgressMonitorDialog(null).run(true, false, OpenSerialDetailInfoPartProgress.this);
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
});
}
use of org.eclipse.jface.dialogs.ProgressMonitorDialog in project cubrid-manager by CUBRID.
the class OpenTablesDetailInfoPartProgress method loadTablesInfo.
/**
* loadTablesInfo
*
* @return Catalog
*/
public void loadTablesInfo() {
Display display = Display.getDefault();
display.syncExec(new Runnable() {
public void run() {
try {
new ProgressMonitorDialog(null).run(true, false, OpenTablesDetailInfoPartProgress.this);
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
});
}
Aggregations