private static void listAssignments ( ProjectFile file ) { Task task ; Resource resource ; String taskName ; String resourceName ; for ( ResourceAssignment assignment : file . getResourceAssignments ( ) ) { task = assignment . getTask ( ) ; if ( task == null ) { taskName = "(null task)" ; } else { taskName = task . getName ( ) ; } resource = assignment . getResource ( ) ; if ( resource == null ) { resourceName = "(null resource)" ; } else { resourceName = resource . getName ( ) ; } System . out . println ( "Assignment: Task=" + taskName + " Resource=" + resourceName ) ; if ( task != null ) { listTimephasedWork ( assignment ) ; } } System . out . println ( ) ; }
This method lists all resource assignments defined in the file .