public static IStatus validateSimpleModuleName(String simpleName){
  String complianceLevel=JavaCore.getOption("org.eclipse.jdt.core.compiler.compliance");
  String sourceLevel=JavaCore.getOption("org.eclipse.jdt.core.compiler.source");
  if (simpleName.indexOf('.') != -1) {
    return Util.newErrorStatus("Module name should not contain dots.");
  }
  IStatus nameStatus=JavaConventions.validateJavaTypeName(simpleName,complianceLevel,sourceLevel);
  if (nameStatus.matches(IStatus.ERROR)) {
    return Util.newErrorStatus("The module name is invalid");
  }
  return Status.OK_STATUS;
}

public static IStatus validateSimpleModuleName ( String simpleName ) { String complianceLevel = JavaCore . getOption ( "org.eclipse.jdt.core.compiler.compliance" ) ; String sourceLevel = JavaCore . getOption ( "org.eclipse.jdt.core.compiler.source" ) ; if ( simpleName . indexOf ( '.' ) != - 1 ) { return Util . newErrorStatus ( "Module name should not contain dots." ) ; } IStatus nameStatus = JavaConventions . validateJavaTypeName ( simpleName , complianceLevel , sourceLevel ) ; if ( nameStatus . matches ( IStatus . ERROR ) ) { return Util . newErrorStatus ( "The module name is invalid" ) ; } return Status . OK_STATUS ; }
validates a simple module name . the name should be a camel - cased valid java identifier .
