Browse Source

added extra utility method for warnings

tags/V1_5_0M3
acolyer 19 years ago
parent
commit
31d0b1f9f1
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      bridge/src/org/aspectj/bridge/MessageUtil.java

+ 8
- 0
bridge/src/org/aspectj/bridge/MessageUtil.java View File

@@ -175,6 +175,14 @@ public class MessageUtil {
}
}

/** @return WARNING_NOMESSAGE if message is empty or IMessage otherwise */ //
public static IMessage warn(String message, ISourceLocation location) {
if (LangUtil.isEmpty(message)) {
return WARNING_NOMESSAGE;
} else {
return new Message(message, IMessage.WARNING, null, location);
}
}
/** @return ERROR_NOMESSAGE if message is empty or IMessage otherwise */ //
public static IMessage error(String message) {
if (LangUtil.isEmpty(message)) {

Loading…
Cancel
Save