File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -522,10 +522,20 @@ protected void parseTreesBlock(final BufferedReader fin) throws IOException {
522
522
}
523
523
524
524
// read trees
525
+ int current = 0 ;
525
526
while (nextCommand != null && !nextCommand .isEndOfBlock ()) {
526
527
if (nextCommand .isCommand ("tree" )) {
527
528
String treeString = nextCommand .arguments ;
528
529
final int i = treeString .indexOf ('(' );
530
+
531
+
532
+ String id = "" + current ;
533
+ try {
534
+ id = treeString .substring (5 , i ).split ("=" )[0 ].trim ();
535
+ } catch (Exception e ) {
536
+ // ignore
537
+ }
538
+
529
539
if (i > 0 ) {
530
540
treeString = treeString .substring (i );
531
541
}
@@ -546,8 +556,11 @@ protected void parseTreesBlock(final BufferedReader fin) throws IOException {
546
556
listener .treeParsed (trees .size (), treeParser );
547
557
}
548
558
559
+ treeParser .setID (id );
560
+
549
561
// this must come after listener or trees.size() gives the wrong index to treeParsed
550
562
trees .add (treeParser );
563
+ current ++;
551
564
552
565
}
553
566
nextCommand = readNextCommand (fin );
You can’t perform that action at this time.
0 commit comments