'=' -> state 6 '>' -> state 4 (we didn't read an attribute but a value of the defaultAtt ) WS (white spaces) we don't know yet if we read an attribute or the value of the defaultAttr -> state 10 This state modifies the content onf m_modifier ... it adds text
(char currChar)
| 234 | * This state modifies the content onf m_modifier ... it adds text |
| 235 | */ |
| 236 | private void doState5(char currChar){ |
| 237 | if ( '=' == currChar ) |
| 238 | m_currState = 6; |
| 239 | if ( '>' == currChar ){ |
| 240 | // this mean that the attribute was a value and we have to create |
| 241 | // a default attribute |
| 242 | // the same as in state 10 |
| 243 | attrEnd = m_cursor - 1 ; |
| 244 | m_modifier.insert(attrEnd,'"'); |
| 245 | m_modifier.insert(attrStart,"defaultAttr=\""); |
| 246 | |
| 247 | // go to state 4 |
| 248 | m_currState = 4; |
| 249 | |
| 250 | // parse again the entire sequence from state 4 before reading any char |
| 251 | m_cursor = attrStart; |
| 252 | } |
| 253 | if (isWhiteSpace(currChar)){ |
| 254 | // go to state 10 |
| 255 | m_currState = 10; |
| 256 | |
| 257 | // record the position where ends this attribute |
| 258 | attrEnd = m_cursor - 1; |
| 259 | } |
| 260 | } // doState5 |
| 261 | |
| 262 | /** |
| 263 | * IF we read ' or " then we have to get prepared to read everything until |
no test coverage detected