use of org.eclipse.core.runtime.MultiStatus in project erlide_eclipse by erlang.
the class ErlangCoreLogger method logErrorStatus.
public void logErrorStatus(final String message, final IStatus status) {
if (status == null) {
logErrorMessage(message);
return;
}
final MultiStatus multi = new MultiStatus(plugin.getBundle().getSymbolicName(), ErlangStatus.INTERNAL_ERROR.getValue(), message, null);
multi.add(status);
log(multi);
}
use of org.eclipse.core.runtime.MultiStatus in project erlide_eclipse by erlang.
the class ErlideUIPlugin method logErrorStatus.
public static void logErrorStatus(final String message, final IStatus status) {
if (status == null) {
ErlideUIPlugin.logErrorMessage(message);
return;
}
final MultiStatus multi = new MultiStatus(ErlideUIPlugin.PLUGIN_ID, ErlangStatus.INTERNAL_ERROR.getValue(), message, null);
multi.add(status);
log(multi);
}
use of org.eclipse.core.runtime.MultiStatus in project vorto by eclipse.
the class VortoProgressMonitor method display.
public void display() {
List<Status> buildResults = new ArrayList<>();
String message;
if (!generatorStatusList.isEmpty()) {
buildResults.add(new MultiStatus(PLUGIN_ID, IStatus.INFO, generatorStatusList.toArray(new Status[] {}), "Code Generator Status Messages", null));
}
if (!infrastructureStatusList.isEmpty()) {
buildResults.add(new MultiStatus(PLUGIN_ID, IStatus.INFO, infrastructureStatusList.toArray(new Status[] {}), "Code Generator Infrastructure Status Messages", null));
}
if (warningPresent) {
message = "Code generation finished with warnings!";
} else {
message = "Code generation successul!";
}
MessageDisplayFactory.getMessageDisplay().displayStatus(new MultiStatus(PLUGIN_ID, IStatus.INFO, buildResults.toArray(new Status[] {}), message, null));
/* Reset status lists */
generatorStatusList = new ArrayList<>();
infrastructureStatusList = new ArrayList<>();
warningPresent = false;
}
use of org.eclipse.core.runtime.MultiStatus in project tmdm-studio-se by Talend.
the class DeployStatusDialog method initMultiStatus.
@Override
protected IStatus initMultiStatus(IStatus multiStatus) {
IStatus[] children = multiStatus.getChildren();
Map<ERepositoryObjectType, List<IStatus>> map = new HashMap<ERepositoryObjectType, List<IStatus>>();
for (IStatus status : children) {
collectTypeStatus(map, status);
}
// $NON-NLS-1$
MultiStatus retStatus = new MultiStatus(RepositoryPlugin.PLUGIN_ID, Status.OK, "", null);
for (Entry<ERepositoryObjectType, List<IStatus>> entry : map.entrySet()) {
ERepositoryObjectType key = entry.getKey();
IInteractiveHandler handler = InteractiveService.findHandler(key);
if (handler != null) {
MultiStatus submultiStatus = new DeployCategoryStatus(RepositoryPlugin.PLUGIN_ID, Status.OK, Messages.bind(Messages.MultiStatusDialog_MultiStatus_Messages, key.getLabel()), null);
for (IStatus status : entry.getValue()) {
if (isShown(handler, status)) {
submultiStatus.add(status);
}
}
if (submultiStatus.getChildren().length > 0) {
retStatus.add(submultiStatus);
}
}
}
isShowWarningMsg = map.containsKey(IServerObjectRepositoryType.TYPE_VIEW) && (!map.containsKey(IServerObjectRepositoryType.TYPE_DATAMODEL));
map.clear();
return retStatus;
}
use of org.eclipse.core.runtime.MultiStatus in project tmdm-studio-se by Talend.
the class ExportDataClusterAction method doRun.
@Override
protected void doRun() {
List<Object> selectedObject = getSelectedObject();
if (!selectedObject.isEmpty()) {
IRepositoryViewObject viewObj = (IRepositoryViewObject) selectedObject.get(0);
SelectServerDefDialog dialog = new SelectServerDefDialog(getShell());
if (dialog.open() == IDialogConstants.OK_ID) {
MDMServerDef serverDef = dialog.getSelectedServerDef();
MDMServerObjectItem item = (MDMServerObjectItem) viewObj.getProperty().getItem();
String dName = item.getMDMServerObject().getName();
try {
FileDialog fd = new FileDialog(getShell(), SWT.SAVE);
// $NON-NLS-1$
fd.setFilterExtensions(new String[] { "*.zip" });
String fPath = fd.open();
if (fPath != null) {
TMDMService service = RepositoryWebServiceAdapter.getMDMService(serverDef);
service.ping(new WSPing(Messages.ExportDataClusterAction_exportContent));
DataClusterService dataClusterService = DataClusterService.getIntance();
if (dataClusterService.isExistDataCluster(service, dName)) {
File tempFolder = IOUtil.getTempFolder();
String tempFolderPath = tempFolder.getAbsolutePath();
dataClusterService.storeIndexFile(tempFolderPath, dName);
//
IDataContentProcess process = dataClusterService.getNewExportContentProcess(service, tempFolderPath, dName, fPath);
try {
process.run();
} catch (InterruptedException e) {
// do nothing
return;
}
MultiStatus status = process.getResult();
if (status != null && status.getChildren().length > 0) {
MessageDialog.openError(getShell(), Messages._Error, Messages.bind(Messages.ExportDataClusterAction_failedExportContent, dName));
} else {
MessageDialog.openInformation(getShell(), Messages.ExportDataClusterAction_exportContent, Messages.bind(Messages.ExportDataClusterAction_successExport, dName));
}
} else {
MessageDialog.openInformation(getShell(), Messages.Common_Warning, Messages.bind(Messages.ExportDataClusterAction_noContainerFound, dName));
}
}
} catch (XtentisException e) {
log.error(e.getMessage(), e);
} catch (WebServiceException e) {
MessageDialog.openError(getShell(), Messages.ExportDataClusterAction_exportContent, Messages.AbstractDataClusterAction_ConnectFailed);
}
}
}
}
Aggregations