langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java
changeset 46185 f4c981fc7818
parent 45748 0202b55d8e08
equal deleted inserted replaced
46184:f1325703ea85 46185:f4c981fc7818
   531                 .map(this::wrapper)
   531                 .map(this::wrapper)
   532                 .collect(toList());
   532                 .collect(toList());
   533     }
   533     }
   534 
   534 
   535     @Override
   535     @Override
       
   536     public List<Snippet> sourceToSnippets(String input) {
       
   537         proc.checkIfAlive();
       
   538         List<Snippet> snl = proc.eval.toScratchSnippets(input);
       
   539         for (Snippet sn : snl) {
       
   540             sn.setId(Snippet.UNASSOCIATED_ID);
       
   541         }
       
   542         return snl;
       
   543     }
       
   544 
       
   545     @Override
   536     public Collection<Snippet> dependents(Snippet snippet) {
   546     public Collection<Snippet> dependents(Snippet snippet) {
   537         return proc.maps.getDependents(snippet);
   547         return proc.maps.getDependents(snippet);
   538     }
   548     }
   539 
   549 
   540     private boolean isStaticContext(AnalyzeTask at, TreePath path) {
   550     private boolean isStaticContext(AnalyzeTask at, TreePath path) {