refresh = false;
}
}
private int validateDependencyName(String name, String key) {
IMessageManager msgManager = getManagedForm().getMessageManager();
if(name == null) {
String msg = UIPlugin.getLocalString("_UI_Dependency_name_missing");
msgManager.addMessage(key, msg, null, IMessageProvider.ERROR);
return IMessageProvider.ERROR;
}
int syntaxSeverity = IMessageProvider.NONE;
String syntax = null;
try {
ModuleName.create(name, true);
}
catch(IllegalArgumentException e) {
syntaxSeverity = IMessageProvider.WARNING;
try {
ModuleName.create(name, false);
}
catch(IllegalArgumentException e2) {
syntaxSeverity = IMessageProvider.ERROR;
e = e2;
}
syntax = MetadataModel.getBadNameMessage(e, true);
}
if(syntax != null)
msgManager.addMessage(key, syntax, null, syntaxSeverity);
return syntaxSeverity;
}