org.eclipse.ocl.examples.modelregistry.ui.ripoffs
Class StatusUtil

java.lang.Object
  extended by org.eclipse.ocl.examples.modelregistry.ui.ripoffs.StatusUtil

public class StatusUtil
extends java.lang.Object

A utility class to work with IStatus.


Constructor Summary
StatusUtil()
           
 
Method Summary
static void applyToStatusLine(org.eclipse.jface.dialogs.DialogPage page, org.eclipse.core.runtime.IStatus status)
          Applies the status to the status line of a dialog page.
static org.eclipse.core.runtime.IStatus getMoreSevere(org.eclipse.core.runtime.IStatus s1, org.eclipse.core.runtime.IStatus s2)
          Compares two instances of IStatus.
static org.eclipse.core.runtime.IStatus getMostSevere(org.eclipse.core.runtime.IStatus[] status)
          Finds the most severe status from a array of stati.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusUtil

public StatusUtil()
Method Detail

getMoreSevere

public static org.eclipse.core.runtime.IStatus getMoreSevere(org.eclipse.core.runtime.IStatus s1,
                                                             org.eclipse.core.runtime.IStatus s2)
Compares two instances of IStatus. The more severe is returned: An error is more severe than a warning, and a warning is more severe than ok. If the two stati have the same severity, the second is returned.


getMostSevere

public static org.eclipse.core.runtime.IStatus getMostSevere(org.eclipse.core.runtime.IStatus[] status)
Finds the most severe status from a array of stati. An error is more severe than a warning, and a warning is more severe than ok.


applyToStatusLine

public static void applyToStatusLine(org.eclipse.jface.dialogs.DialogPage page,
                                     org.eclipse.core.runtime.IStatus status)
Applies the status to the status line of a dialog page.