/** * Adds the given status to this multi-status. * * @param status the new child status */ public void add(IStatus status) { Assert.isLegal(status != null); IStatus[] result = new IStatus[children.length + 1]; System.arraycopy(children, 0, result, 0, children.length); result[result.length - 1] = status; children = result; int newSev = status.getSeverity(); if (newSev > getSeverity()) { setSeverity(newSev); } }
/** * Adds the given status to this multi-status. * * @param status the new child status */ public void add(IStatus status) { Assert.isLegal(status != null); IStatus[] result = new IStatus[children.length + 1]; System.arraycopy(children, 0, result, 0, children.length); result[result.length - 1] = status; children = result; int newSev = status.getSeverity(); if (newSev > getSeverity()) { setSeverity(newSev); } }
/** * Adds the given status to this multi-status. * * @param status the new child status */ public void add(IStatus status) { Assert.isLegal(status != null); IStatus[] result = new IStatus[children.length + 1]; System.arraycopy(children, 0, result, 0, children.length); result[result.length - 1] = status; children = result; int newSev = status.getSeverity(); if (newSev > getSeverity()) { setSeverity(newSev); } }
/** * Adds the given status to this multi-status. * * @param status the new child status */ public void add(IStatus status) { Assert.isLegal(status != null); IStatus[] result = new IStatus[children.length + 1]; System.arraycopy(children, 0, result, 0, children.length); result[result.length - 1] = status; children = result; int newSev = status.getSeverity(); if (newSev > getSeverity()) { setSeverity(newSev); } }
/** * Incorporates the provided <code>newStats</code> into the * <code>multieStatus</code>. * * @param multiStatus * @param newStatus * @return <code>true</code> if the update should proceed */ /* package */boolean mergeStatus(MultiStatus multiStatus, IStatus newStatus) { if (!newStatus.isOK()) { multiStatus.add(newStatus); return multiStatus.getSeverity() < IStatus.ERROR; } return true; }
/** * Incorporates the provided <code>newStats</code> into the * <code>multieStatus</code>. * * @param multiStatus * @param newStatus * @return <code>true</code> if the update should proceed */ /* package */boolean mergeStatus(MultiStatus multiStatus, IStatus newStatus) { if (!newStatus.isOK()) { multiStatus.add(newStatus); return multiStatus.getSeverity() < IStatus.ERROR; } return true; }
/** * Incorporates the provided <code>newStats</code> into the * <code>multieStatus</code>. * * @param multiStatus * @param newStatus * @return <code>true</code> if the update should proceed */ /* package */boolean mergeStatus(MultiStatus multiStatus, IStatus newStatus) { if (!newStatus.isOK()) { multiStatus.add(newStatus); return multiStatus.getSeverity() < IStatus.ERROR; } return true; }
result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, e.getMessage(), e)); if (Tracing.DEBUG && result.getSeverity() != IStatus.OK) LogHelper.log(result); if (result.getSeverity() == IStatus.ERROR) return null; return new QueryableArray(considered.toArray(new IInstallableUnit[considered.size()]));
/** * Creates and returns a new multi-status object with the given children. * * @param pluginId the unique identifier of the relevant plug-in * @param code the plug-in-specific status code * @param newChildren the list of children status objects * @param message a human-readable message, localized to the * current locale * @param exception a low-level exception, or <code>null</code> if not * applicable */ public MultiStatus(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception) { this(pluginId, code, message, exception); Assert.isLegal(newChildren != null); int maxSeverity = getSeverity(); for (int i = 0; i < newChildren.length; i++) { Assert.isLegal(newChildren[i] != null); int severity = newChildren[i].getSeverity(); if (severity > maxSeverity) maxSeverity = severity; } this.children = new IStatus[newChildren.length]; setSeverity(maxSeverity); System.arraycopy(newChildren, 0, this.children, 0, newChildren.length); }
/** * Creates and returns a new multi-status object with the given children. * * @param pluginId the unique identifier of the relevant plug-in * @param code the plug-in-specific status code * @param newChildren the list of children status objects * @param message a human-readable message, localized to the * current locale * @param exception a low-level exception, or <code>null</code> if not * applicable */ public MultiStatus(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception) { this(pluginId, code, message, exception); Assert.isLegal(newChildren != null); int maxSeverity = getSeverity(); for (int i = 0; i < newChildren.length; i++) { Assert.isLegal(newChildren[i] != null); int severity = newChildren[i].getSeverity(); if (severity > maxSeverity) maxSeverity = severity; } this.children = new IStatus[newChildren.length]; setSeverity(maxSeverity); System.arraycopy(newChildren, 0, this.children, 0, newChildren.length); }
/** * Creates and returns a new multi-status object with the given children. * * @param pluginId the unique identifier of the relevant plug-in * @param code the plug-in-specific status code * @param newChildren the list of children status objects * @param message a human-readable message, localized to the * current locale * @param exception a low-level exception, or <code>null</code> if not * applicable */ public MultiStatus(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception) { this(pluginId, code, message, exception); Assert.isLegal(newChildren != null); int maxSeverity = getSeverity(); for (int i = 0; i < newChildren.length; i++) { Assert.isLegal(newChildren[i] != null); int severity = newChildren[i].getSeverity(); if (severity > maxSeverity) maxSeverity = severity; } this.children = new IStatus[newChildren.length]; setSeverity(maxSeverity); System.arraycopy(newChildren, 0, this.children, 0, newChildren.length); }
/** * Creates and returns a new multi-status object with the given children. * * @param pluginId the unique identifier of the relevant plug-in * @param code the plug-in-specific status code * @param newChildren the list of children status objects * @param message a human-readable message, localized to the * current locale * @param exception a low-level exception, or <code>null</code> if not * applicable */ public MultiStatus(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception) { this(pluginId, code, message, exception); Assert.isLegal(newChildren != null); int maxSeverity = getSeverity(); for (int i = 0; i < newChildren.length; i++) { Assert.isLegal(newChildren[i] != null); int severity = newChildren[i].getSeverity(); if (severity > maxSeverity) maxSeverity = severity; } this.children = new IStatus[newChildren.length]; setSeverity(maxSeverity); System.arraycopy(newChildren, 0, this.children, 0, newChildren.length); }
public ResolutionResult getResolutionResult() { if (report == null) { if (plan == null) { if (additionalStatus.getSeverity() != IStatus.ERROR) { additionalStatus.add(new Status(IStatus.ERROR, Activator.ID, Messages.PlannerResolutionJob_NullProvisioningPlan)); } report = new ResolutionResult(); report.addSummaryStatus(additionalStatus); } else { report = PlanAnalyzer.computeResolutionResult(request, plan, additionalStatus); } } return report; }
public ResolutionResult getResolutionResult() { if (report == null) { if (plan == null) { if (additionalStatus.getSeverity() != IStatus.ERROR) { additionalStatus.add(new Status(IStatus.ERROR, Activator.ID, Messages.PlannerResolutionJob_NullProvisioningPlan)); } report = new ResolutionResult(); report.addSummaryStatus(additionalStatus); } else { report = PlanAnalyzer.computeResolutionResult(request, plan, additionalStatus); } } return report; }
@Override protected void okPressed() { Iterator settingsIterator = selectedSettings.iterator(); MultiStatus result = new MultiStatus( PlatformUI.PLUGIN_ID, IStatus.OK, IDEWorkbenchMessages.ChooseWorkspaceWithSettingsDialog_ProblemsTransferTitle, null); IPath path = new Path(getWorkspaceLocation()); String[] selectionIDs = new String[selectedSettings.size()]; int index = 0; while (settingsIterator.hasNext()) { IConfigurationElement elem = (IConfigurationElement) settingsIterator .next(); result.add(transferSettings(elem, path)); selectionIDs[index] = elem.getAttribute(ATT_ID); } if (result.getSeverity() != IStatus.OK) { ErrorDialog .openError( getShell(), IDEWorkbenchMessages.ChooseWorkspaceWithSettingsDialog_TransferFailedMessage, IDEWorkbenchMessages.ChooseWorkspaceWithSettingsDialog_SaveSettingsFailed, result); return; } saveSettings(selectionIDs); super.okPressed(); }
public ProjectDescription read(InputSource input) { problems = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, Messages.projRead_failureReadingProjectDesc, null); objectStack = new Stack<>(); state = S_INITIAL; try { createParser().parse(input, this); } catch (ParserConfigurationException e) { log(e); } catch (IOException e) { log(e); } catch (SAXException e) { log(e); } if (projectDescription != null && projectDescription.getName() == null) parseProblem(Messages.projRead_missingProjectName); switch (problems.getSeverity()) { case IStatus.ERROR : Policy.log(problems); return null; case IStatus.WARNING : case IStatus.INFO : Policy.log(problems); case IStatus.OK : default : return projectDescription; } }
public ProjectDescription read(InputSource input) { problems = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, Messages.projRead_failureReadingProjectDesc, null); objectStack = new Stack<>(); state = S_INITIAL; try { createParser().parse(input, this); } catch (ParserConfigurationException e) { log(e); } catch (IOException e) { log(e); } catch (SAXException e) { log(e); } if (projectDescription != null && projectDescription.getName() == null) parseProblem(Messages.projRead_missingProjectName); switch (problems.getSeverity()) { case IStatus.ERROR : Policy.log(problems); return null; case IStatus.WARNING : case IStatus.INFO : Policy.log(problems); case IStatus.OK : default : return projectDescription; } }
public ProjectDescription read(InputSource input) { problems = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, Messages.projRead_failureReadingProjectDesc, null); objectStack = new Stack<>(); state = S_INITIAL; try { createParser().parse(input, this); } catch (ParserConfigurationException e) { log(e); } catch (IOException e) { log(e); } catch (SAXException e) { log(e); } if (projectDescription != null && projectDescription.getName() == null) parseProblem(Messages.projRead_missingProjectName); switch (problems.getSeverity()) { case IStatus.ERROR : Policy.log(problems); return null; case IStatus.WARNING : case IStatus.INFO : Policy.log(problems); case IStatus.OK : default : return projectDescription; } }
if (status == null) return; // cancelled if (readStatus.getSeverity() == IStatus.ERROR) message= readStatus.getMessage(); else
if (status == null) return; // cancelled if (readStatus.getSeverity() == IStatus.ERROR) message= readStatus.getMessage(); else