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:
parent
a4a8abe72d
commit
6c54353b6e
1 changed files with 15 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue