public static void saveInstances ( Application app ) { File targetFile = new File ( app . getDirectory ( ) , Constants . PROJECT_DIR_INSTANCES + "/" + INSTANCES_FILE ) ; try { Utils . createDirectory ( targetFile . getParentFile ( ) ) ; RuntimeModelIo . writeInstances ( targetFile , app . getRootInstances ( ) ) ; } catch ( IOException e ) { Logger logger = Logger . getLogger ( ConfigurationUtils . class . getName ( ) ) ; logger . severe ( "Failed to save instances. " + e . getMessage ( ) ) ; Utils . logException ( logger , e ) ; } }
Saves the instances into a file .