@Contract("_, !null -> !null") @Nullable public static String prependResourcePrefix(@Nullable Module module,@Nullable String name){
  if (module != null) {
    AndroidFacet facet=AndroidFacet.getInstance(module);
    if (facet != null) {
      AndroidGradleModel androidModel=AndroidGradleModel.get(facet);
      if (androidModel != null) {
        String resourcePrefix=LintUtils.computeResourcePrefix(androidModel.getAndroidProject());
        if (resourcePrefix != null) {
          if (name != null) {
            return name.startsWith(resourcePrefix) ? name : LintUtils.computeResourceName(resourcePrefix,name);
          }
 else {
            return resourcePrefix;
          }
        }
      }
    }
  }
  return name;
}

@ Contract ( "_, !null -> !null" ) @ Nullable public static String prependResourcePrefix ( @ Nullable Module module , @ Nullable String name ) { if ( module != null ) { AndroidFacet facet = AndroidFacet . getInstance ( module ) ; if ( facet != null ) { AndroidGradleModel androidModel = AndroidGradleModel . get ( facet ) ; if ( androidModel != null ) { String resourcePrefix = LintUtils . computeResourcePrefix ( androidModel . getAndroidProject ( ) ) ; if ( resourcePrefix != null ) { if ( name != null ) { return name . startsWith ( resourcePrefix ) ? name : LintUtils . computeResourceName ( resourcePrefix , name ) ; } else { return resourcePrefix ; } } } } } return name ; }
returns the given resource name , and possibly prepends a project - configured prefix to the name if set on the gradle module ( but only if it does not already start with the prefix ) .
