private static Ptg [ ] convertPtgForWatchList ( final Ptg [ ] ptgs , final int position , final ShiftFormulaRef shiftFormulaRef , final Object ptg , final byte originalOperandClass , final int currentRow ) { List < SerialRow > rowlist = getRowsList ( currentRow , shiftFormulaRef . getCurrentRowsMappingList ( ) ) ; if ( ( rowlist == null ) || ( rowlist . isEmpty ( ) ) ) { // no need change ptg return singlePtg ( ptg , originalOperandClass , - 1 ) ; } shiftFormulaRef . setFormulaChanged ( 1 ) ; // one to one or has no round brackets if ( ( rowlist . size ( ) == 1 ) || ( ( position + 1 ) >= ptgs . length ) || ! ( ptgs [ position + 1 ] instanceof ParenthesisPtg ) ) { // change ptg one to one // return changed ptg return singlePtg ( fixupRefRelativeRowOneToOne ( ptg , rowlist . get ( 0 ) . getRow ( ) ) , originalOperandClass , - 1 ) ; } shiftFormulaRef . setFormulaChanged ( rowlist . size ( ) ) ; return fixupRefRelativeRowOneToMany ( ptg , originalOperandClass , rowlist , ptgs , position ) ; }
Convert ptg for watch list .