Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorAlena Laskavaia2010-07-22 02:25:54 +0000
committerAlena Laskavaia2010-07-22 02:25:54 +0000
commit6c54353b6eef609dfa9de3d191eafe98e6403256 (patch)
treec9e19c5f93605fac8a96c2e024fc1cb0eaac5ebf /codan
parenta4a8abe72d009b2b37818336406cf67b1b538392 (diff)
downloadorg.eclipse.cdt-6c54353b6eef609dfa9de3d191eafe98e6403256.tar.gz
org.eclipse.cdt-6c54353b6eef609dfa9de3d191eafe98e6403256.tar.xz
org.eclipse.cdt-6c54353b6eef609dfa9de3d191eafe98e6403256.zip
added utility method to simplify creation
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CodanSeverity.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CodanSeverity.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CodanSeverity.java
index fb85718b2c4..6f340dc8493 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CodanSeverity.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CodanSeverity.java
@@ -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;
+ }
}

Back to the top