question: public static void deletePackage ( IPackageFragment pack ) throws CoreException { for ( int i = 0 ; i < MAX_RETRY ; i ++ ) { try { pack . delete ( true , null ) ; i = MAX_RETRY ; } catch ( CoreException e ) { if ( i == MAX_RETRY - 1 ) { JavaPlugin . log ( e ) ; throw e ; } try { JavaPlugin . log ( new IllegalStateException ( "sleep before retrying JavaProjectHelper.delete() for package " + pack . getHandleIdentifier ( ) ) ) ; Thread . sleep ( RETRY_DELAY ) ; } catch ( InterruptedException e1 ) { } } } }
target:  Removes a package fragment. Retries if deletion failed (e.g. because the indexer still locks a file).