de.cau.cs.kieler.core.model.xtend.util
Class XtendStatus

java.lang.Object
  extended by de.cau.cs.kieler.core.model.xtend.util.XtendStatus
All Implemented Interfaces:
IStatus

public class XtendStatus
extends Object
implements IStatus

Class to create a MultiStatus object from an Issues object that contains Xtend Errors, Warnings and Infos. Might still be IStatus.OK, if the Issues object is empty. Can be used to directly show issues in the Status Manager.

Rating proposed yellow
(2010-06-04) proposed by haf

Field Summary
 
Fields inherited from interface org.eclipse.core.runtime.IStatus
CANCEL, ERROR, INFO, OK, WARNING
 
Constructor Summary
XtendStatus(org.eclipse.emf.mwe.core.issues.Issues issues, String logMessage, Map<EObject,AnyType> unknownFeatures, Exception e)
          Constructor taking an Xtend Issues which contains Errors, Infos, Warnings.
 
Method Summary
 IStatus[] getChildren()
          
 int getCode()
          
 Throwable getException()
          
 String getMessage()
          
 String getPlugin()
          
 int getSeverity()
          
 Map<EObject,AnyType> getUnknownFeatures()
          If the input file is an XMIResource, unknown features (not specified XML elements) get recorded and can be passed to this status.
 boolean isMultiStatus()
          
 boolean isOK()
          
 boolean matches(int severityMask)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtendStatus

public XtendStatus(org.eclipse.emf.mwe.core.issues.Issues issues,
                   String logMessage,
                   Map<EObject,AnyType> unknownFeatures,
                   Exception e)
Constructor taking an Xtend Issues which contains Errors, Infos, Warnings.

Parameters:
issues - the input diagnostic information
logMessage - the logMessage of the Xtend components. Might carry detailed information about where an error occured, including a stack trace of the Xtend file.
unknownFeatures - if the input file is an XMIResource, unknown features (not specified XML elements) get recorded and can be passed to this status
e - an Exception occuring during transformation may be passed here
Method Detail

getChildren

public IStatus[] getChildren()

Specified by:
getChildren in interface IStatus

getCode

public int getCode()

Specified by:
getCode in interface IStatus

getException

public Throwable getException()

Specified by:
getException in interface IStatus

getMessage

public String getMessage()

Specified by:
getMessage in interface IStatus

getPlugin

public String getPlugin()

Specified by:
getPlugin in interface IStatus

getSeverity

public int getSeverity()

Specified by:
getSeverity in interface IStatus

isMultiStatus

public boolean isMultiStatus()

Specified by:
isMultiStatus in interface IStatus

isOK

public boolean isOK()

Specified by:
isOK in interface IStatus

matches

public boolean matches(int severityMask)

Specified by:
matches in interface IStatus

getUnknownFeatures

public Map<EObject,AnyType> getUnknownFeatures()
If the input file is an XMIResource, unknown features (not specified XML elements) get recorded and can be passed to this status.

Returns:
a map of unknown XML tags/attributes occured during the transformation