Bug 437193 - JSR-45 Support broken 

Change-Id: I89aa19f22f284b506c3bdbac8a19b8f958fefd64
diff --git a/org.eclipse.debug.tests/META-INF/MANIFEST.MF b/org.eclipse.debug.tests/META-INF/MANIFEST.MF
index 54d5bec..275b5d9 100644
--- a/org.eclipse.debug.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.tests/META-INF/MANIFEST.MF
@@ -22,5 +22,6 @@
  org.eclipse.debug.tests,
  org.eclipse.debug.tests.breakpoint,
  org.eclipse.debug.tests.expressions,
+ org.eclipse.debug.tests.sourcelookup,
  org.eclipse.debug.tests.statushandlers
 Eclipse-BundleShape: dir
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java
index 7fb3eac..5f8e5dc 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2009, 2014 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,33 +33,37 @@
 import org.eclipe.debug.tests.viewer.model.VirtualViewerStateTests;
 import org.eclipe.debug.tests.viewer.model.VirtualViewerUpdateTests;
 import org.eclipse.debug.tests.breakpoint.BreakpointOrderingTests;
+import org.eclipse.debug.tests.sourcelookup.SourceLookupFacilityTests;
 import org.eclipse.debug.tests.statushandlers.StatusHandlerTests;
 
 /**
   * Tests for integration and nightly builds.
- * 
- * @since 3.6 
+ *
+ * @since 3.6
  */
 public class AutomatedSuite extends TestSuite {
 
 	/**
 	 * Returns the suite.  This is required to use the JUnit Launcher.
-	 * 
+	 *
 	 * @return the test suite
 	 */
 	public static Test suite() {
 		return new AutomatedSuite();
 	}
-	
+
 	/**
-	 * Constructs the automated test suite. Adds all tests. 
+	 * Constructs the automated test suite. Adds all tests.
 	 */
 	public AutomatedSuite() {
+		// Source lookup tests
+		addTest(new TestSuite(SourceLookupFacilityTests.class));
+		// BP tests
 		addTest(new TestSuite(BreakpointOrderingTests.class));
-	    // Note: jface viewer tests were moved out of nightly tests 
-	    // due to frequent problems on nightly build machines. 
-	    // (Bug 343308). 
-		
+	    // Note: jface viewer tests were moved out of nightly tests
+	    // due to frequent problems on nightly build machines.
+	    // (Bug 343308).
+
 		// Virtual viewer tests
 		addTest(new TestSuite(VirtualViewerDeltaTests.class));
         addTest(new TestSuite(VirtualViewerContentTests.class));
@@ -68,15 +72,15 @@
 		addTest(new TestSuite(VirtualViewerStateTests.class));
 		addTest(new TestSuite(VirtualViewerUpdateTests.class));
         addTest(new TestSuite(VirtualViewerFilterTests.class));
-		
+
 		// Viewer neutral tests
 		addTest(new TestSuite(FilterTransformTests.class));
 		addTest(new TestSuite(ChildrenUpdateTests.class));
 		addTest(new TestSuite(PresentationContextTests.class));
-		
+
 		// Memory view
 		addTest(new TestSuite(MemoryRenderingTests.class));
-		
+
 		// Launch framework
 		addTest(new TestSuite(LaunchConfigurationTests.class));
 		addTest(new TestSuite(AcceleratorSubstitutionTests.class));
@@ -85,7 +89,7 @@
 		addTest(new TestSuite(LaunchManagerTests.class));
 		addTest(new TestSuite(RefreshTabTests.class));
 		addTest(new TestSuite(ArgumentParsingTests.class));
-		
+
 		// Status handlers
 		addTest(new TestSuite(StatusHandlerTests.class));
 	}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java
new file mode 100644
index 0000000..9e474ed
--- /dev/null
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ * Copyright (c) Jul 30, 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.tests.sourcelookup;
+
+import junit.framework.TestCase;
+
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility;
+import org.eclipse.debug.ui.sourcelookup.ISourceLookupResult;
+
+/**
+ * Tests {@link SourceLookupFacility}
+ *
+ * @since 3.9.200
+ */
+public class SourceLookupFacilityTests extends TestCase {
+
+	/**
+	 * {@link IStackFrame} to be reused
+	 */
+	TestStackFrame fReusableFrame = new TestStackFrame(new TestLaunch());
+	/**
+	 * Testing source director
+	 */
+	TestSourceDirector fTestDirector = new TestSourceDirector();
+	/**
+	 * Test source locator
+	 */
+	TestSourceLocator fTestLocator = new TestSourceLocator();
+
+	/**
+	 * @param name
+	 */
+	public SourceLookupFacilityTests(String name) {
+		super(name);
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with simple type, no locator and no forcing
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStringNoLocatorNoForce() throws Exception {
+		try {
+			String artifact = "Empty"; //$NON-NLS-1$
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(artifact, null, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertNull("Source element should be null", result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with simple type and no forcing
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStringNoForce() throws Exception {
+		try {
+			String artifact = "One"; //$NON-NLS-1$
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(artifact, fTestDirector, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof String); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			String value = (String) result.getSourceElement();
+			result = SourceLookupFacility.getDefault().lookup(artifact, fTestDirector, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof String); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			assertEquals("The results should be equal", value, result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with simple type and forcing
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStringForce() throws Exception {
+		try {
+			String artifact = "Two"; //$NON-NLS-1$
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(artifact, fTestDirector, true);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof String); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			String value = (String) result.getSourceElement();
+			result = SourceLookupFacility.getDefault().lookup(artifact, fTestDirector, true);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof String); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			assertNotSame("The results should not be equal", value, result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with simple type and no forcing
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStringLocatorNoForce() throws Exception {
+		try {
+			String artifact = "Three"; //$NON-NLS-1$
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(artifact, fTestLocator, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertNull("The source element should be null", result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with an {@link IStackFrame} impl and no forcing
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStackframeNoForce() throws Exception {
+		try {
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(fReusableFrame, fTestDirector, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			String value = (String) result.getSourceElement();
+			result = SourceLookupFacility.getDefault().lookup(fReusableFrame, fTestDirector, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			assertEquals("The results should not be equal", value, result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with an {@link IStackFrame} impl and forcing
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStackframeForce() throws Exception {
+		try {
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(fReusableFrame, fTestDirector, true);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			String value = (String) result.getSourceElement();
+			result = SourceLookupFacility.getDefault().lookup(fReusableFrame, fTestDirector, true);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			assertNotSame("The results should not be equal", value, result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with an {@link IStackFrame} impl, no forcing, no locator, no launch
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStackframeWithDebugElement1() throws Exception {
+		try {
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(new TestStackFrame(null), null, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertNull("Source element should be null", result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with an {@link IStackFrame} impl, no forcing, no locator
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStackframeWithDebugElement2() throws Exception {
+		try {
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(fReusableFrame, null, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			String value = (String) result.getSourceElement();
+			result = SourceLookupFacility.getDefault().lookup(fReusableFrame, null, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			assertEquals("The results should be equal", value, result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with an {@link IStackFrame} impl, forcing, no locator
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStackframeWithDebugElement3() throws Exception {
+		try {
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(fReusableFrame, null, true);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			String value = (String) result.getSourceElement();
+			result = SourceLookupFacility.getDefault().lookup(fReusableFrame, null, true);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			assertNotSame("The results should not be equal", value, result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with an {@link IStackFrame} impl, no forcing, ISourceLocator impl
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStackframeWithDebugElement4() throws Exception {
+		try {
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(fReusableFrame, fTestLocator, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			String value = (String) result.getSourceElement();
+			result = SourceLookupFacility.getDefault().lookup(fReusableFrame, fTestLocator, false);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			assertEquals("The results should not be equal", value, result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+
+	/**
+	 * Tests calling
+	 * {@link SourceLookupFacility#lookup(Object, org.eclipse.debug.core.model.ISourceLocator, boolean)}
+	 * with an {@link IStackFrame} impl, forcing, ISourceLocator impl
+	 *
+	 * @throws Exception
+	 */
+	public void testLookupStackframeWithDebugElement5() throws Exception {
+		try {
+			ISourceLookupResult result = SourceLookupFacility.getDefault().lookup(fReusableFrame, fTestLocator, true);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			String value = (String) result.getSourceElement();
+			result = SourceLookupFacility.getDefault().lookup(fReusableFrame, fTestLocator, true);
+			assertNotNull("There should be a result", result); //$NON-NLS-1$
+			assertTrue("The result artifact should be a String", result.getArtifact() instanceof IStackFrame); //$NON-NLS-1$
+			assertTrue("The result source element should be a String", result.getSourceElement() instanceof String); //$NON-NLS-1$
+			assertNotSame("The results should not be equal", value, result.getSourceElement()); //$NON-NLS-1$
+		} finally {
+			SourceLookupFacility.shutdown();
+		}
+	}
+}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestLaunch.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestLaunch.java
new file mode 100644
index 0000000..2c94c0e
--- /dev/null
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestLaunch.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.tests.sourcelookup;
+
+import org.eclipse.debug.core.Launch;
+
+public class TestLaunch extends Launch {
+
+	public TestLaunch() {
+		super(null, "debug", new TestSourceDirector()); //$NON-NLS-1$
+	}
+
+}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestSourceDirector.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestSourceDirector.java
new file mode 100644
index 0000000..6ec38fa
--- /dev/null
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestSourceDirector.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.tests.sourcelookup;
+
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
+
+public class TestSourceDirector extends AbstractSourceLookupDirector {
+
+
+	@Override
+	public Object getSourceElement(Object element) {
+		if (element instanceof String) {
+			return element.toString() + System.currentTimeMillis();
+		} else if (element instanceof IStackFrame) {
+			IStackFrame frame = (IStackFrame) element;
+			return frame.getModelIdentifier() + System.currentTimeMillis();
+		}
+		return super.getSourceElement(element);
+	}
+
+	@Override
+	public void initializeParticipants() {
+	}
+}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestSourceLocator.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestSourceLocator.java
new file mode 100644
index 0000000..bff3493
--- /dev/null
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestSourceLocator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) Jul 30, 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.tests.sourcelookup;
+
+import org.eclipse.debug.core.model.ISourceLocator;
+import org.eclipse.debug.core.model.IStackFrame;
+
+/**
+ * Test source locator
+ */
+public class TestSourceLocator implements ISourceLocator {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISourceLocator#getSourceElement(org.eclipse.debug.core.model.IStackFrame)
+	 */
+	@Override
+	public Object getSourceElement(IStackFrame stackFrame) {
+		return stackFrame.getModelIdentifier() + System.currentTimeMillis();
+	}
+
+}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestStackFrame.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestStackFrame.java
new file mode 100644
index 0000000..2e6da1a
--- /dev/null
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/TestStackFrame.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.tests.sourcelookup;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IRegisterGroup;
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.model.IThread;
+import org.eclipse.debug.core.model.IVariable;
+
+public class TestStackFrame implements IStackFrame {
+
+	TestLaunch fLaunch = null;
+
+	public TestStackFrame(TestLaunch launch) {
+		fLaunch = launch;
+	}
+
+	@Override
+	public String getModelIdentifier() {
+		return "test.debug.model"; //$NON-NLS-1$
+	}
+
+	@Override
+	public IDebugTarget getDebugTarget() {
+		return null;
+	}
+
+	@Override
+	public ILaunch getLaunch() {
+		return fLaunch;
+	}
+
+	@Override
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	@Override
+	public boolean canStepInto() {
+		return false;
+	}
+
+	@Override
+	public boolean canStepOver() {
+		return false;
+	}
+
+	@Override
+	public boolean canStepReturn() {
+		return false;
+	}
+
+	@Override
+	public boolean isStepping() {
+		return false;
+	}
+
+	@Override
+	public void stepInto() throws DebugException {
+	}
+
+	@Override
+	public void stepOver() throws DebugException {
+	}
+
+	@Override
+	public void stepReturn() throws DebugException {
+	}
+
+	@Override
+	public boolean canResume() {
+		return false;
+	}
+
+	@Override
+	public boolean canSuspend() {
+		return false;
+	}
+
+	@Override
+	public boolean isSuspended() {
+		return false;
+	}
+
+	@Override
+	public void resume() throws DebugException {
+	}
+
+	@Override
+	public void suspend() throws DebugException {
+	}
+
+	@Override
+	public boolean canTerminate() {
+		return false;
+	}
+
+	@Override
+	public boolean isTerminated() {
+		return false;
+	}
+
+	@Override
+	public void terminate() throws DebugException {
+	}
+
+	@Override
+	public IThread getThread() {
+		return null;
+	}
+
+	@Override
+	public IVariable[] getVariables() throws DebugException {
+		return new IVariable[0];
+	}
+
+	@Override
+	public boolean hasVariables() throws DebugException {
+		return false;
+	}
+
+	@Override
+	public int getLineNumber() throws DebugException {
+		return 0;
+	}
+
+	@Override
+	public int getCharStart() throws DebugException {
+		return 0;
+	}
+
+	@Override
+	public int getCharEnd() throws DebugException {
+		return 0;
+	}
+
+	@Override
+	public String getName() throws DebugException {
+		return "Test Debug Source Lookup Frame"; //$NON-NLS-1$
+	}
+
+	@Override
+	public IRegisterGroup[] getRegisterGroups() throws DebugException {
+		return new IRegisterGroup[0];
+	}
+
+	@Override
+	public boolean hasRegisterGroups() throws DebugException {
+		return false;
+	}
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java
index a62505d..3d41de7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2013 IBM Corporation and others.
+ * Copyright (c) 2005, 2014 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,239 +10,20 @@
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.elements.adapters;
 
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.internal.ui.InstructionPointerManager;
-import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupResult;
-import org.eclipse.debug.internal.ui.views.launch.DecorationManager;
-import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility;
 import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
-import org.eclipse.debug.ui.sourcelookup.ISourceLookupResult;
 import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.progress.UIJob;
 
 /**
  * @since 3.2
  */
 public class StackFrameSourceDisplayAdapter implements ISourceDisplay {
 
-	private IStackFrame fPrevFrame;
-	private SourceLookupResult fPrevResult;
-	
-	/**
-	 * Constructs singleton source display adapter for stack frames.
-	 */
-	public StackFrameSourceDisplayAdapter() {
-		DebugPlugin.getDefault().addDebugEventListener(new IDebugEventSetListener() {
-			@Override
-			public void handleDebugEvents(DebugEvent[] events) {
-				for (int i = 0; i < events.length; i++) {
-					final DebugEvent event = events[i];
-					switch (event.getKind()) {
-						case DebugEvent.TERMINATE:
-							clearCachedModel(event.getSource());
-							//$FALL-THROUGH$
-						case DebugEvent.RESUME:
-							if (!event.isEvaluation()) {
-								Job uijob = new UIJob("clear source selection"){ //$NON-NLS-1$
-									@Override
-									public IStatus runInUIThread(
-											IProgressMonitor monitor) {
-										clearSourceSelection(event.getSource());
-										return Status.OK_STATUS;
-									}
-									
-								};
-								uijob.setSystem(true);
-								uijob.schedule();
-							}
-							break;
-						case DebugEvent.CHANGE:
-							if (event.getSource() instanceof IStackFrame) {
-								if (event.getDetail() == DebugEvent.CONTENT) {
-									// force source lookup if a stack frame fires a content change event
-									clearCachedModel(event.getSource());
-								}
-							}
-							break;
-						default:
-							break;
-					}
-				}
-			}
-		});
-	}
-	
-	/**
-	 * A job to perform source lookup on the currently selected stack frame.
-	 */
-	class SourceLookupJob extends Job {
-		
-		private IStackFrame fTarget;
-		private ISourceLocator fLocator;
-		private IWorkbenchPage fPage;
-
-		/**
-		 * Constructs a new source lookup job.
-		 */
-		public SourceLookupJob(IStackFrame frame, ISourceLocator locator, IWorkbenchPage page) {
-			super("Debug Source Lookup");  //$NON-NLS-1$
-			setPriority(Job.INTERACTIVE);
-			setSystem(true);	
-			fTarget = frame;
-			fLocator = locator;
-			fPage = page;
-			// Note: Be careful when trying to use scheduling rules with this 
-			// job, in order to avoid blocking nested jobs (bug 339542).
-		}
-		
-		/* (non-Javadoc)
-		 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
-		 */
-		@Override
-		protected IStatus run(IProgressMonitor monitor) {
-			if (!monitor.isCanceled()) {				
-				if (!fTarget.isTerminated()) {
-					ISourceLookupResult result = DebugUITools.lookupSource(fTarget, fLocator);
-					synchronized (StackFrameSourceDisplayAdapter.this) {
-						fPrevResult = (SourceLookupResult)result;
-						fPrevFrame = fTarget;
-					}
-					if (!monitor.isCanceled() && !fTarget.isTerminated()) {
-						new SourceDisplayJob(result, fPage).schedule();
-					}
-				}
-			}
-			return Status.OK_STATUS;
-		}
-		
-		/* (non-Javadoc)
-		 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
-		 */
-		@Override
-		public boolean belongsTo(Object family) {
-			// source lookup jobs are a family per workbench page
-			if (family instanceof SourceLookupJob) {
-				SourceLookupJob slj = (SourceLookupJob) family;
-				return slj.fPage.equals(fPage);
-			}
-			return false;
-		}
-		
-	}
-	
-	class SourceDisplayJob extends UIJob {
-		
-		private ISourceLookupResult fResult;
-		private IWorkbenchPage fPage;
-
-		public SourceDisplayJob(ISourceLookupResult result, IWorkbenchPage page) {
-			super("Debug Source Display");  //$NON-NLS-1$
-			setSystem(true);
-			setPriority(Job.INTERACTIVE);
-			fResult = result;
-			fPage = page;
-		}
-		
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
-		 */
-		@Override
-		public IStatus runInUIThread(IProgressMonitor monitor) {
-			if (!monitor.isCanceled() && fResult != null) {
-				DebugUITools.displaySource(fResult, fPage);
-				// termination may have occurred while displaying source
-				if (monitor.isCanceled()) {
-					Object artifact = fResult.getArtifact();
-					if (artifact instanceof IStackFrame) {
-						clearSourceSelection(((IStackFrame)artifact).getThread());
-					}
-				}
-			}
-			
-			return Status.OK_STATUS;
-		}
-		
-		/* (non-Javadoc)
-		 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
-		 */
-		@Override
-		public boolean belongsTo(Object family) {
-			// source display jobs are a family per workbench page
-			if (family instanceof SourceDisplayJob) {
-				SourceDisplayJob sdj = (SourceDisplayJob) family;
-				return sdj.fPage.equals(fPage);
-			}
-			return false;
-		}
-		
-	}	
-
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.ui.contexts.ISourceDisplayAdapter#displaySource(java.lang.Object, org.eclipse.ui.IWorkbenchPage, boolean)
 	 */
 	@Override
 	public synchronized void displaySource(Object context, IWorkbenchPage page, boolean force) {
-		IStackFrame frame = (IStackFrame)context;
-		if (!force && frame.equals(fPrevFrame)) {
-			fPrevResult.updateArtifact(context);
-			SourceDisplayJob sdj = new SourceDisplayJob(fPrevResult, page);
-			// cancel any existing source display jobs for this page
-			Job.getJobManager().cancel(sdj);
-			sdj.schedule();
-		} else {
-			SourceLookupJob slj = new SourceLookupJob(frame, frame.getLaunch().getSourceLocator(), page);
-			// cancel any existing source lookup jobs for this page
-			Job.getJobManager().cancel(slj);
-			slj.schedule();
-		}
+		SourceLookupFacility.getDefault().displaySource(context, page, force);
 	}
-	
-	/**
-	 * Clears any source decorations associated with the given thread or
-	 * debug target.
-	 * 
-	 * @param source thread or debug target
-	 */
-	private void clearSourceSelection(Object source) {		
-		if (source instanceof IThread) {
-			IThread thread = (IThread)source;
-			DecorationManager.removeDecorations(thread);
-			InstructionPointerManager.getDefault().removeAnnotations(thread);
-		} else if (source instanceof IDebugTarget) {
-			IDebugTarget target = (IDebugTarget)source;
-			DecorationManager.removeDecorations(target);
-			InstructionPointerManager.getDefault().removeAnnotations(target);
-		}
-	}	
-	
-	/**
-	 * Clear any cached results associated with the given object.
-	 * 
-	 * @param source
-	 */
-	private synchronized void clearCachedModel(Object source) {
-		if (fPrevFrame != null) {
-			IDebugTarget target = null;
-			if (source instanceof IDebugElement) {
-				target = ((IDebugElement)source).getDebugTarget();
-			}
-			if (fPrevFrame.getDebugTarget().equals(target)) {
-				fPrevFrame = null;
-				fPrevResult = null;
-			}
-		}
-	}
-	
 }
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
index cfdae31..a9c655a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
@@ -49,7 +49,6 @@
 import org.eclipse.debug.ui.IInstructionPointerPresentation;
 import org.eclipse.debug.ui.ISourcePresentation;
 import org.eclipse.debug.ui.sourcelookup.CommonSourceNotFoundEditorInput;
-import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
 import org.eclipse.debug.ui.sourcelookup.ISourceLookupResult;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
@@ -77,7 +76,7 @@
  * 
  * @since 3.1
  */
-public class SourceLookupFacility implements IPageListener, IPartListener2, IPropertyChangeListener, ISourceDisplay {
+public class SourceLookupFacility implements IPageListener, IPartListener2, IPropertyChangeListener, IDebugEventSetListener {
 
 	/**
 	 * Provides an LRU cache with a given max size
@@ -106,7 +105,6 @@
 		 */
 		@Override
 		public SourceLookupResult put(Object key, SourceLookupResult value) {
-
 			shuffle(key);
 			return super.put(key, value);
 		}
@@ -168,8 +166,6 @@
 	 * Whether to re-use editors when displaying source.
 	 */
 	private boolean fReuseEditor = DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_REUSE_EDITOR);
-	private IStackFrame fPrevFrame;
-	private SourceLookupResult fPrevResult;
 
 	/**
 	 * Constructs singleton source display adapter for stack frames.
@@ -193,7 +189,6 @@
 		if (fgDefault != null) {
 			fgDefault.dispose();
 		}
-		fLookupResults.clear();
 	}
 
 	/**
@@ -202,44 +197,42 @@
 	private SourceLookupFacility() {
 		fEditorsByPage = new HashMap<IWorkbenchPage, IEditorPart>();
 		DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
-		DebugPlugin.getDefault().addDebugEventListener(new IDebugEventSetListener() {
-			@Override
-			public void handleDebugEvents(DebugEvent[] events) {
-				for (int i = 0; i < events.length; i++) {
-					final DebugEvent event = events[i];
-					switch (event.getKind()) {
-						case DebugEvent.TERMINATE:
-							clearCachedModel(event.getSource());
-							//$FALL-THROUGH$
-						case DebugEvent.RESUME:
-							if (!event.isEvaluation()) {
-								Job uijob = new UIJob("clear source selection") { //$NON-NLS-1$
-									@Override
-									public IStatus runInUIThread(IProgressMonitor monitor) {
-										clearSourceSelection(event.getSource());
-										return Status.OK_STATUS;
-									}
+		DebugPlugin.getDefault().addDebugEventListener(this);
+	}
 
-								};
-								uijob.setSystem(true);
-								uijob.schedule();
+	@Override
+	public void handleDebugEvents(DebugEvent[] events) {
+		IStackFrame frame = null;
+		for (int i = 0; i < events.length; i++) {
+			final DebugEvent event = events[i];
+			switch (event.getKind()) {
+				case DebugEvent.TERMINATE:
+				case DebugEvent.RESUME:
+					if (!event.isEvaluation()) {
+						Job uijob = new UIJob("clear source selection") { //$NON-NLS-1$
+							@Override
+							public IStatus runInUIThread(IProgressMonitor monitor) {
+								clearSourceSelection(event.getSource());
+								return Status.OK_STATUS;
 							}
-							break;
-						case DebugEvent.CHANGE:
-							if (event.getSource() instanceof IStackFrame) {
-								if (event.getDetail() == DebugEvent.CONTENT) {
-									// force source lookup if a stack frame
-									// fires a content change event
-									clearCachedModel(event.getSource());
-								}
-							}
-							break;
-						default:
-							break;
+
+						};
+						uijob.setSystem(true);
+						uijob.schedule();
 					}
-				}
+					break;
+				case DebugEvent.CHANGE:
+					if (event.getSource() instanceof IStackFrame) {
+						if (event.getDetail() == DebugEvent.CONTENT) {
+							frame = (IStackFrame) event.getSource();
+							fLookupResults.remove(new ArtifactWithLocator(frame, frame.getLaunch().getSourceLocator()));
+						}
+					}
+					break;
+				default:
+					break;
 			}
-		});
+		}
 	}
 
 	private class ArtifactWithLocator {
@@ -313,14 +306,18 @@
 	 *            <code>null</code> a source locator is determined from the
 	 *            artifact, if possible. If the artifact is a debug element, the
 	 *            source locator from its associated launch is used.
+	 * @param force If we should ignore the cached value and re-look up
 	 * @return a source lookup result
 	 */
-	public SourceLookupResult lookup(Object artifact, ISourceLocator locator) {
+	public SourceLookupResult lookup(Object artifact, ISourceLocator locator, boolean force) {
 		SourceLookupResult result = null;
 		synchronized (fLookupResults) {
-			result = fLookupResults.get(new ArtifactWithLocator(artifact, locator));
-			if (result != null) {
-				return result;
+			ArtifactWithLocator key = new ArtifactWithLocator(artifact, locator);
+			if (!force) {
+				result = fLookupResults.get(key);
+				if (result != null) {
+					return result;
+				}
 			}
 			result = new SourceLookupResult(artifact, null, null, null);
 			IDebugElement debugElement = null;
@@ -379,7 +376,7 @@
 				result.setEditorInput(editorInput);
 				result.setEditorId(editorId);
 				result.setSourceElement(sourceElement);
-				fLookupResults.put(new ArtifactWithLocator(artifact, localLocator), result);
+				fLookupResults.put(key, result);
 			}
 		}
 		return result;
@@ -698,8 +695,10 @@
      */
     protected void dispose() {
         DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
+		DebugPlugin.getDefault().removeDebugEventListener(this);
         fEditorsByPage.clear();
         fPresentation.dispose();
+		fLookupResults.clear();
     }
 
 	/**
@@ -710,17 +709,19 @@
 		private IStackFrame fTarget;
 		private ISourceLocator fLocator;
 		private IWorkbenchPage fPage;
+		private boolean fForce = false;
 
 		/**
 		 * Constructs a new source lookup job.
 		 */
-		public SourceLookupJob(IStackFrame frame, ISourceLocator locator, IWorkbenchPage page) {
+		public SourceLookupJob(IStackFrame frame, ISourceLocator locator, IWorkbenchPage page, boolean force) {
 			super("Debug Source Lookup"); //$NON-NLS-1$
 			setPriority(Job.INTERACTIVE);
 			setSystem(true);
 			fTarget = frame;
 			fLocator = locator;
 			fPage = page;
+			fForce = force;
 			// Note: Be careful when trying to use scheduling rules with this
 			// job, in order to avoid blocking nested jobs (bug 339542).
 		}
@@ -734,11 +735,7 @@
 		protected IStatus run(IProgressMonitor monitor) {
 			if (!monitor.isCanceled()) {
 				if (!fTarget.isTerminated()) {
-					ISourceLookupResult result = lookup(fTarget, fLocator);
-					synchronized (SourceLookupFacility.this) {
-						fPrevResult = (SourceLookupResult) result;
-						fPrevFrame = fTarget;
-					}
+					ISourceLookupResult result = lookup(fTarget, fLocator, fForce);
 					if (!monitor.isCanceled() && !fTarget.isTerminated() && fPage != null) {
 						new SourceDisplayJob(result, fPage).schedule();
 					}
@@ -820,21 +817,12 @@
 	 * org.eclipse.debug.ui.contexts.ISourceDisplayAdapter#displaySource(java
 	 * .lang.Object, org.eclipse.ui.IWorkbenchPage, boolean)
 	 */
-	@Override
 	public synchronized void displaySource(Object context, IWorkbenchPage page, boolean force) {
 		IStackFrame frame = (IStackFrame) context;
-		if (!force && frame.equals(fPrevFrame)) {
-			fPrevResult.updateArtifact(context);
-			SourceDisplayJob sdj = new SourceDisplayJob(fPrevResult, page);
-			// cancel any existing source display jobs for this page
-			Job.getJobManager().cancel(sdj);
-			sdj.schedule();
-		} else {
-			SourceLookupJob slj = new SourceLookupJob(frame, frame.getLaunch().getSourceLocator(), page);
-			// cancel any existing source lookup jobs for this page
-			Job.getJobManager().cancel(slj);
-			slj.schedule();
-		}
+		SourceLookupJob slj = new SourceLookupJob(frame, frame.getLaunch().getSourceLocator(), page, force);
+		// cancel any existing source lookup jobs for this page
+		Job.getJobManager().cancel(slj);
+		slj.schedule();
 	}
 
 	/**
@@ -854,22 +842,4 @@
 			InstructionPointerManager.getDefault().removeAnnotations(target);
 		}
 	}
-
-	/**
-	 * Clear any cached results associated with the given object.
-	 * 
-	 * @param source
-	 */
-	private synchronized void clearCachedModel(Object source) {
-		if (fPrevFrame != null) {
-			IDebugTarget target = null;
-			if (source instanceof IDebugElement) {
-				target = ((IDebugElement) source).getDebugTarget();
-			}
-			if (fPrevFrame.getDebugTarget().equals(target)) {
-				fPrevFrame = null;
-				fPrevResult = null;
-			}
-		}
-	}
 }
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
index 59a7e9b..6475b09 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
@@ -37,6 +37,7 @@
 import org.eclipse.debug.internal.ui.elements.adapters.MemoryBlockLabelAdapter;
 import org.eclipse.debug.internal.ui.elements.adapters.MemoryRetrievalContentAdapter;
 import org.eclipse.debug.internal.ui.elements.adapters.MemorySegmentLabelAdapter;
+import org.eclipse.debug.internal.ui.elements.adapters.StackFrameSourceDisplayAdapter;
 import org.eclipse.debug.internal.ui.elements.adapters.StackFrameViewerInputProvider;
 import org.eclipse.debug.internal.ui.elements.adapters.VariableColumnFactoryAdapter;
 import org.eclipse.debug.internal.ui.model.elements.BreakpointContainerLabelProvider;
@@ -71,7 +72,6 @@
 import org.eclipse.debug.internal.ui.model.elements.VariableLabelProvider;
 import org.eclipse.debug.internal.ui.model.elements.VariableMementoProvider;
 import org.eclipse.debug.internal.ui.model.elements.WatchExpressionEditor;
-import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
@@ -93,7 +93,7 @@
 public class DebugElementAdapterFactory implements IAdapterFactory {
 	
 	private static IModelProxyFactory fgModelProxyFactoryAdapter = new DefaultModelProxyFactory();
-	private static ISourceDisplay fgStackFrameSourceDisplayAdapter = SourceLookupFacility.getDefault();
+	private static ISourceDisplay fgStackFrameSourceDisplayAdapter = new StackFrameSourceDisplayAdapter();
 	private static IModelSelectionPolicyFactory fgModelSelectionPolicyFactoryAdapter = new DefaultModelSelectionPolicyFactory();
     
     private static IAsynchronousLabelAdapter fgDebugLabelAdapter = new AsynchronousDebugLabelAdapter();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
index ab92b74..cb5b1b9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -989,7 +989,7 @@
      * @since 3.1
      */
     public static ISourceLookupResult lookupSource(Object artifact, ISourceLocator locator) {	
-    	return SourceLookupFacility.getDefault().lookup(artifact, locator);
+		return SourceLookupFacility.getDefault().lookup(artifact, locator, false);
     }
 	
     /**