equal
deleted
inserted
replaced
280 |
280 |
281 try { |
281 try { |
282 Iterable<? extends CompilationUnitTree> trees = task.parse(); |
282 Iterable<? extends CompilationUnitTree> trees = task.parse(); |
283 task.analyze(); |
283 task.analyze(); |
284 List<Pair<JCCompilationUnit, JCTree>> res = new ArrayList<>(); |
284 List<Pair<JCCompilationUnit, JCTree>> res = new ArrayList<>(); |
285 System.out.println("Try to add pairs. Elems are " + analyzedElems); |
285 //System.out.println("Try to add pairs. Elems are " + analyzedElems); |
286 for (CompilationUnitTree t : trees) { |
286 for (CompilationUnitTree t : trees) { |
287 JCCompilationUnit cu = (JCCompilationUnit)t; |
287 JCCompilationUnit cu = (JCCompilationUnit)t; |
288 for (JCTree def : cu.defs) { |
288 for (JCTree def : cu.defs) { |
289 if (def.getTag() == JCTree.CLASSDEF && |
289 if (def.getTag() == JCTree.CLASSDEF && |
290 analyzedElems.contains(((JCTree.JCClassDecl)def).sym)) { |
290 analyzedElems.contains(((JCTree.JCClassDecl)def).sym)) { |
291 System.out.println("Adding pair..."); |
291 //System.out.println("Adding pair..."); |
292 res.add(new Pair<>(cu, def)); |
292 res.add(new Pair<>(cu, def)); |
293 } |
293 } |
294 } |
294 } |
295 } |
295 } |
296 return res; |
296 return res; |