Skip to content
Snippets Groups Projects
Commit ec7bd9ea authored by Florian Hölzl's avatar Florian Hölzl
Browse files

YELLOW

refs 311
parent 606b9c2d
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ import org.fortiss.tooling.kernel.extension.base.ConstraintViolationBase;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 04141B3BFD9B4AE78321DA1CE292E144
* @ConQAT.Rating YELLOW Hash: C7983E84AE129101D5BEF37F511DDFFD
*/
public interface IConstraintViolation<T extends EObject> extends IAdaptable {
......@@ -63,35 +63,30 @@ public interface IConstraintViolation<T extends EObject> extends IAdaptable {
public static enum ESeverity {
/** Fatal error severity. */
FATAL,
FATAL(-5),
/** Normal error severity. */
ERROR,
ERROR(-3),
/** Warning severity. */
WARNING,
WARNING(-1),
/** Information severity. */
INFO,
INFO(1),
/** Debug severity. */
DEBUG,
DEBUG(5),
/** The lowest None severity. */
NONE;
NONE(10000);
/** The NONE severity level. */
private final int level;
/** Constructor. */
private ESeverity(int level) {
this.level = level;
}
/** Translates ESeverity to int. */
public static int getIntSeverity(ESeverity severity) {
switch (severity) {
case FATAL:
return -5;
case ERROR:
return -3;
case WARNING:
return -1;
case INFO:
return 1;
case DEBUG:
return 5;
}
// ESeverity.NONE
return 10000;
return severity.level;
}
/** Returns the lowest severity level. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment