code: public static String getModuleName(URI uri) {
  		String name = uri.getPath();
  		if (name.endsWith("/")) { //$NON-NLS-1$
  			name = name.substring(0, name.length()-1);
  		}
  		int idx = name.lastIndexOf("/"); //$NON-NLS-1$
  		if (idx != -1) {
  			name = name.substring(idx+1);
  		}
  		if (name.endsWith(".js")) { //$NON-NLS-1$
  			name = name.substring(0, name.length()-3);
  		}
  		return name;
  	}
docs: Returns the module name for the specified URI. This is the name part of
  the URI with path information removed, and with the .js extension removed
  if present.
  
  @param uri
  the uri to return the name for
  @return the module name