public static InstancesLoadResult restoreInstances ( ManagedApplication ma ) { File sourceFile = new File ( ma . getDirectory ( ) , Constants . PROJECT_DIR_INSTANCES + "/" + INSTANCES_FILE ) ; Graphs graphs = ma . getApplication ( ) . getTemplate ( ) . getGraphs ( ) ; InstancesLoadResult result ; if ( sourceFile . exists ( ) ) result = RuntimeModelIo . loadInstances ( sourceFile , sourceFile . getParentFile ( ) , graphs , ma . getApplication ( ) . getName ( ) ) ; else result = new InstancesLoadResult ( ) ; return result ; }
Restores instances and set them in the application .