diff --git a/org.eclipse.ajdt.ui.tests/src/org/eclipse/ajdt/ui/tests/FindFilesForLocationURITests.java b/org.eclipse.ajdt.ui.tests/src/org/eclipse/ajdt/ui/tests/FindFilesForLocationURITests.java
new file mode 100644
index 0000000..fdae502
--- /dev/null
+++ b/org.eclipse.ajdt.ui.tests/src/org/eclipse/ajdt/ui/tests/FindFilesForLocationURITests.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2011 SpringSource, a division of VMware, Inc
+ * 
+ * andrew - Initial API and implementation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.eclipse.ajdt.ui.tests;
+
+import java.io.StringReader;
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+/**
+ * 
+ * @author Andrew Eisenberg
+ * @created Nov 19, 2012
+ */
+public class FindFilesForLocationURITests extends UITestCase {
+    class StringInputStream extends ReaderInputStream {
+
+        public StringInputStream(String s) {
+            super(new StringReader(s));
+        }
+
+    }
+    
+    private IFile file;
+    private URI uri;
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        final IProject project = getRoot().getProject("Proj");
+        if (! project.exists()) {
+            project.create(null);
+            project.open(null);
+        }       
+        file = project.getFile("foo.txt");
+        if (!file.exists()) {
+            file.create(new StringInputStream("foo"), true, null);
+        }
+        uri = file.getLocation().toFile().toURI();
+    }
+    private IWorkspaceRoot getRoot() {
+        return ResourcesPlugin.getWorkspace().getRoot();
+    }
+    public void testFindFilesForLocationURI() throws Exception {
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < 1000; i++) {
+            getRoot().findFilesForLocationURI(uri);
+        }
+        long end = System.currentTimeMillis();
+        System.out.println("testFindFilesForLocationURI took " + (end - start) );
+    }
+    public void testGetFileForLocation() throws Exception {
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < 1000; i++) {
+            getRoot().getFileForLocation(file.getLocation());
+        }
+        long end = System.currentTimeMillis();
+        System.out.println("testGetFileForLocation took " + (end - start) );
+    }
+}
diff --git a/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/refactoring/ITDRenameRefactoringProvider.java b/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/refactoring/ITDRenameRefactoringProvider.java
index c67f607..4e1953b 100644
--- a/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/refactoring/ITDRenameRefactoringProvider.java
+++ b/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/refactoring/ITDRenameRefactoringProvider.java
@@ -18,6 +18,7 @@
 import org.eclipse.ajdt.core.codeconversion.AspectsConvertingParser;
 import org.eclipse.ajdt.core.codeconversion.AspectsConvertingParser.Replacement;
 import org.eclipse.ajdt.core.codeconversion.ConversionOptions;
+import org.eclipse.ajdt.core.codeconversion.ITDAwareNameEnvironment;
 import org.eclipse.ajdt.core.javaelements.AJCompilationUnit;
 import org.eclipse.ajdt.core.javaelements.IntertypeElement;
 import org.eclipse.contribution.jdt.refactoring.IRefactoringProvider;
@@ -28,11 +29,14 @@
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.core.dom.ASTVisitor;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.internal.core.CancelableNameEnvironment;
+import org.eclipse.jdt.internal.core.JavaProject;
 import org.eclipse.jdt.internal.corext.refactoring.rename.JavaRenameProcessor;
 import org.eclipse.jdt.internal.ui.refactoring.UserInterfaceManager;
 import org.eclipse.jdt.internal.ui.refactoring.reorg.RenameUserInterfaceManager;
@@ -145,8 +149,8 @@
         return null;
     }
 
-    public boolean inInterestingProject(ICompilationUnit unit) {
-        IProject project = unit.getJavaProject().getProject();
+    public boolean inInterestingProject(IJavaElement elt) {
+        IProject project = elt.getJavaProject().getProject();
         return AspectJPlugin.isAJProject(project);
     }
     
@@ -181,4 +185,10 @@
         });
         return result;
     }
+
+    public CancelableNameEnvironment createNameEnvironment(
+            JavaProject project, WorkingCopyOwner owner,
+            IProgressMonitor monitor) throws JavaModelException {
+        return new ITDAwareNameEnvironment(project, owner, monitor);
+    }
 }
diff --git a/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/visualiser/AJDTMarkupProvider.java b/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/visualiser/AJDTMarkupProvider.java
index a4d89e9..8c6661c 100644
--- a/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/visualiser/AJDTMarkupProvider.java
+++ b/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/internal/ui/visualiser/AJDTMarkupProvider.java
@@ -115,9 +115,21 @@
                                     if (enclosingType == null) {
                                         // Bug 324706  I don't know why the sloc is null.  Log the bug and
                                         // continue on.
+                                        String handleIdentifier;
+                                        try {
+                                            if (target.getElementName().equals(AJProjectModelFacade.ERROR_JAVA_ELEMENT.getElementName())) {
+                                                handleIdentifier = AJProjectModelFacade.ERROR_JAVA_ELEMENT.getElementName();
+                                            } else {
+                                                handleIdentifier = target.getHandleIdentifier();
+                                            }
+                                        } catch (NullPointerException e) {
+                                            VisualiserPlugin.log(IStatus.WARNING, 
+                                                    "Error computeing handle identifier");
+                                            handleIdentifier = "<CAN'T COMPUTE>";
+                                        }
                                         VisualiserPlugin.log(IStatus.WARNING, 
                                                 "Bug 324706: null containing type found for " + target.getElementName() + 
-                                                "\nHandle identifier is: " + target.getHandleIdentifier());
+                                                "\nHandle identifier is: " + handleIdentifier);
                                         // avoid an npe
                                         continue;
                                     }
diff --git a/org.eclipse.contribution.weaving.jdt.tests/src/org/eclipse/contribution/weaving/jdt/tests/refactoring/MockRefactoringProvider.java b/org.eclipse.contribution.weaving.jdt.tests/src/org/eclipse/contribution/weaving/jdt/tests/refactoring/MockRefactoringProvider.java
index 8d51e72..991e9b7 100644
--- a/org.eclipse.contribution.weaving.jdt.tests/src/org/eclipse/contribution/weaving/jdt/tests/refactoring/MockRefactoringProvider.java
+++ b/org.eclipse.contribution.weaving.jdt.tests/src/org/eclipse/contribution/weaving/jdt/tests/refactoring/MockRefactoringProvider.java
@@ -14,14 +14,19 @@
 import org.eclipse.contribution.jdt.refactoring.IRefactoringProvider;
 import org.eclipse.contribution.weaving.jdt.tests.MockCompilationUnit;
 import org.eclipse.contribution.weaving.jdt.tests.MockNature;
+import org.eclipse.contribution.weaving.jdt.tests.itdawareness.MockNameEnvironmentProvider;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.ITypeRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.internal.core.CancelableNameEnvironment;
+import org.eclipse.jdt.internal.core.JavaProject;
 import org.eclipse.jdt.internal.corext.refactoring.util.RefactoringASTParser;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
@@ -71,8 +76,8 @@
         return null;
     }
 
-    public boolean inInterestingProject(ICompilationUnit unit) {
-        return createSourceConvertedAST = unit.getElementName().endsWith("mock");
+    public boolean inInterestingProject(IJavaElement elt) {
+        return createSourceConvertedAST = elt.getElementName().endsWith("mock");
     }
 
     public CompilationUnit createSourceConvertedAST(String contents, ICompilationUnit unit, boolean resolveBindings, boolean statementsRecovery, boolean bindingsRecovery, IProgressMonitor monitor) {
@@ -88,4 +93,10 @@
         CompilationUnit newCUNode= (CompilationUnit) fParser.createAST(monitor);
         return newCUNode;
     }
+
+    public CancelableNameEnvironment createNameEnvironment(
+            JavaProject project, WorkingCopyOwner owner,
+            IProgressMonitor monitor2) throws JavaModelException {
+        return null;
+    }
 }
diff --git a/org.eclipse.contribution.weaving.jdt/src/org/eclipse/contribution/jdt/refactoring/IRefactoringProvider.java b/org.eclipse.contribution.weaving.jdt/src/org/eclipse/contribution/jdt/refactoring/IRefactoringProvider.java
index 67c84f1..9adaa91 100644
--- a/org.eclipse.contribution.weaving.jdt/src/org/eclipse/contribution/jdt/refactoring/IRefactoringProvider.java
+++ b/org.eclipse.contribution.weaving.jdt/src/org/eclipse/contribution/jdt/refactoring/IRefactoringProvider.java
@@ -16,7 +16,11 @@
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.ITypeRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.internal.core.CancelableNameEnvironment;
+import org.eclipse.jdt.internal.core.JavaProject;
 
 /**
  * @author Andrew Eisenberg
@@ -42,10 +46,10 @@
     CompilationUnit createASTForRefactoring(ITypeRoot root);
 
     /**
-     * @param unit
+     * @param elt
      * @return true iff this CU is in a project type that we care about.
      */
-    boolean inInterestingProject(ICompilationUnit unit);
+    boolean inInterestingProject(IJavaElement elt);
     
     /**
      * Creates an AST for the given compilation unit with source code translated.
@@ -61,4 +65,15 @@
      * @return
      */
     CompilationUnit createSourceConvertedAST(String contents, ICompilationUnit unit, boolean resolveBindings, boolean statementsRecovery, boolean bindingsRecovery, IProgressMonitor monitor);
+
+    /**
+     * Creates a name environment suitable for refactoring
+     * @param project
+     * @param owner
+     * @param monitor2
+     * @return
+     * @throws JavaModelException 
+     */
+    CancelableNameEnvironment createNameEnvironment(JavaProject project,
+            WorkingCopyOwner owner, IProgressMonitor monitor2) throws JavaModelException;
 }
diff --git a/org.eclipse.contribution.weaving.jdt/src/org/eclipse/contribution/jdt/refactoring/RenameJavaElementActionAspect.aj b/org.eclipse.contribution.weaving.jdt/src/org/eclipse/contribution/jdt/refactoring/RenameJavaElementActionAspect.aj
index 8b740ab..625c98d 100644
--- a/org.eclipse.contribution.weaving.jdt/src/org/eclipse/contribution/jdt/refactoring/RenameJavaElementActionAspect.aj
+++ b/org.eclipse.contribution.weaving.jdt/src/org/eclipse/contribution/jdt/refactoring/RenameJavaElementActionAspect.aj
@@ -14,10 +14,17 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.internal.core.JavaProject;
 import org.eclipse.jdt.internal.corext.refactoring.util.RefactoringASTParser;
+import org.eclipse.jdt.internal.core.CancelableNameEnvironment;
+import org.eclipse.jdt.internal.corext.refactoring.rename.JavaRenameProcessor;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
 
 /**
  * This aspect ensures that ITDs are renamed with the proper rename refactoring
@@ -76,7 +83,25 @@
         } else {
             return proceed(contents, unit, resolveBindings, statementsRecovery, monitor);
         }
-        
     }
-
+    
+    /**
+     * Captures calls to creating a name environment while doing a refactoring parse
+     */
+//    pointcut creatingRefactoringNameEnvironment(String contents, ICompilationUnit unit, boolean resolveBindings, boolean statementsRecovery, IProgressMonitor monitor1,
+//            JavaProject project, WorkingCopyOwner owner, IProgressMonitor monitor2) : cflowbelow(refactoringParse(contents, unit, resolveBindings, statementsRecovery, monitor1)) &&
+//        call(CancelableNameEnvironment.new(JavaProject, WorkingCopyOwner, IProgressMonitor)) && 
+//                args(project, owner, monitor2);
+    pointcut creatingRefactoringNameEnvironment(JavaProject project, WorkingCopyOwner owner, IProgressMonitor monitor2) : 
+        call(CancelableNameEnvironment.new(JavaProject, WorkingCopyOwner, IProgressMonitor)) && 
+                args(project, owner, monitor2) && cflow(execution(public RefactoringStatus JavaRenameProcessor+.checkFinalConditions(IProgressMonitor, CheckConditionsContext)));
+    
+    CancelableNameEnvironment around(JavaProject project, WorkingCopyOwner owner, IProgressMonitor monitor2) throws JavaModelException : creatingRefactoringNameEnvironment(project, owner, monitor2) {
+        IRefactoringProvider provider = adapter.getProvider();
+        if (provider != null && provider.inInterestingProject(project)) {
+            return provider.createNameEnvironment(project, owner, monitor2);
+        } else {
+            return proceed(project, owner, monitor2);
+        }
+    }
 }
