private void processDependencies ( ) { Set < Task > tasksWithBars = new HashSet < Task > ( ) ; FastTrackTable table = m_data . getTable ( FastTrackTableType . ACTBARS ) ; for ( MapRow row : table ) { Task task = m_project . getTaskByUniqueID ( row . getInteger ( ActBarField . _ACTIVITY ) ) ; if ( task == null || tasksWithBars . contains ( task ) ) { continue ; } tasksWithBars . add ( task ) ; String predecessors = row . getString ( ActBarField . PREDECESSORS ) ; if ( predecessors == null || predecessors . isEmpty ( ) ) { continue ; } for ( String predecessor : predecessors . split ( ", " ) ) { Matcher matcher = RELATION_REGEX . matcher ( predecessor ) ; matcher . matches ( ) ; Integer id = Integer . valueOf ( matcher . group ( 1 ) ) ; RelationType type = RELATION_TYPE_MAP . get ( matcher . group ( 3 ) ) ; if ( type == null ) { type = RelationType . FINISH_START ; } String sign = matcher . group ( 4 ) ; double lag = NumberHelper . getDouble ( matcher . group ( 5 ) ) ; if ( "-" . equals ( sign ) ) { lag = - lag ; } Task targetTask = m_project . getTaskByID ( id ) ; if ( targetTask != null ) { Duration lagDuration = Duration . getInstance ( lag , m_data . getDurationTimeUnit ( ) ) ; Relation relation = task . addPredecessor ( targetTask , type , lagDuration ) ; m_eventManager . fireRelationReadEvent ( relation ) ; } } } }
Process task dependencies .