public static void forkResourceFile(@NotNull DesignSurface surface,@Nullable String newFolder,boolean open){
  Configuration configuration=surface.getConfiguration();
  if (configuration == null) {
    assert false;
    return;
  }
  final VirtualFile file=configuration.getFile();
  if (file == null) {
    assert false;
    return;
  }
  Module module=configuration.getModule();
  if (module == null) {
    assert false;
    return;
  }
  XmlFile xmlFile=(XmlFile)configuration.getPsiFile();
  ResourceFolderType folderType=ResourceHelper.getFolderType(xmlFile);
  if (folderType == null) {
    folderType=ResourceFolderType.LAYOUT;
  }
  forkResourceFile(module.getProject(),folderType,file,xmlFile,newFolder,configuration,open);
}

public static void forkResourceFile ( @ NotNull DesignSurface surface , @ Nullable String newFolder , boolean open ) { Configuration configuration = surface . getConfiguration ( ) ; if ( configuration == null ) { assert false ; return ; } final VirtualFile file = configuration . getFile ( ) ; if ( file == null ) { assert false ; return ; } Module module = configuration . getModule ( ) ; if ( module == null ) { assert false ; return ; } XmlFile xmlFile = ( XmlFile ) configuration . getPsiFile ( ) ; ResourceFolderType folderType = ResourceHelper . getFolderType ( xmlFile ) ; if ( folderType == null ) { folderType = ResourceFolderType . LAYOUT ; } forkResourceFile ( module . getProject ( ) , folderType , file , xmlFile , newFolder , configuration , open ) ; }
create a variation ( copy ) of a given resource file
