langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
changeset 6717 0103d76cfe48
parent 6582 c7a4fb5a2f86
child 6721 d92073844278
equal deleted inserted replaced
6716:71df48777dd1 6717:0103d76cfe48
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    47 import javax.tools.JavaFileManager;
    47 import javax.tools.JavaFileManager;
    48 import javax.tools.StandardJavaFileManager;
    48 import javax.tools.StandardJavaFileManager;
    49 import javax.tools.JavaFileObject;
    49 import javax.tools.JavaFileObject;
    50 import javax.tools.DiagnosticListener;
    50 import javax.tools.DiagnosticListener;
    51 
    51 
       
    52 import com.sun.tools.javac.api.JavacTrees;
    52 import com.sun.source.util.AbstractTypeProcessor;
    53 import com.sun.source.util.AbstractTypeProcessor;
    53 import com.sun.source.util.TaskEvent;
    54 import com.sun.source.util.TaskEvent;
    54 import com.sun.source.util.TaskListener;
    55 import com.sun.source.util.TaskListener;
    55 import com.sun.tools.javac.api.JavacTaskImpl;
    56 import com.sun.tools.javac.api.JavacTaskImpl;
    56 import com.sun.tools.javac.code.*;
    57 import com.sun.tools.javac.code.*;
  1102             if (task != null) {
  1103             if (task != null) {
  1103                 next.put(JavacTaskImpl.class, task);
  1104                 next.put(JavacTaskImpl.class, task);
  1104                 task.updateContext(next);
  1105                 task.updateContext(next);
  1105             }
  1106             }
  1106 
  1107 
       
  1108             JavacTrees trees = context.get(JavacTrees.class);
       
  1109             if (trees != null) {
       
  1110                 next.put(JavacTrees.class, trees);
       
  1111                 trees.updateContext(next);
       
  1112             }
       
  1113 
  1107             context.clear();
  1114             context.clear();
  1108             return next;
  1115             return next;
  1109         }
  1116         }
  1110     }
  1117     }
  1111 
  1118