code: private void validatePlugin(final Features f) {
          final String id = f.getPluginId();
          if (!ID_PATTERN.matcher(id).matches()) {
              final String msg = "Plug-in ID '" + id + "' doesn't follow syntax rules.";
              throw new IllegalArgumentException(msg);
          }
          final List<String> version = f.getFeature("package.version");
          if (version != null && !version.isEmpty() && !VERSION_PATTERN.matcher(version.get(0)).matches()) {
              final String msg = "Plug-in version '" + version.get(0) + "' doesn't follow syntax rules.";
              throw new IllegalArgumentException(msg);
          }
      }
docs: Validate plug-in configuration.
  
  Follow OSGi symbolic name syntax rules:
  
  <pre>
  digit         ::= [0..9]
  alpha         ::= [a..zA..Z]
  alphanum      ::= alpha | digit
  token         ::= ( alphanum | '_' | '-' )+
  symbolic-name ::= token('.'token)*
  </pre>
  
  Follow OSGi bundle version syntax rules:
  
  <pre>
  version   ::= major( '.' minor ( '.' micro ( '.' qualifier )? )? )?
  major     ::= number
  minor     ::=number
  micro     ::=number
  qualifier ::= ( alphanum | '_' | '-' )+
  </pre>
  
  @param f Features to validate