1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

added utility method to simplify creation

This commit is contained in:
Alena Laskavaia 2010-07-22 02:25:54 +00:00
parent a4a8abe72d
commit 6c54353b6e

View file

@ -56,4 +56,19 @@ public enum CodanSeverity {
}
return svalues;
}
/**
* @param intValue
* @return value of severity by its integer value
* @since 1.1
*/
public static CodanSeverity valueOf(int intValue) {
if (intValue == IMarker.SEVERITY_INFO)
return Info;
if (intValue == IMarker.SEVERITY_WARNING)
return Warning;
if (intValue == IMarker.SEVERITY_ERROR)
return Error;
return null;
}
}