Merge remote-tracking branch 'origin/master' into BETA_JAVA9
diff --git a/org.eclipse.jdt.debug.jdi.tests/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.jdt.debug.jdi.tests/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d211d32..0000000
--- a/org.eclipse.jdt.debug.jdi.tests/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.jdt.debug.tests/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.jdt.debug.tests/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d211d32..0000000
--- a/org.eclipse.jdt.debug.tests/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.jdt.debug.ui/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.jdt.debug.ui/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d211d32..0000000
--- a/org.eclipse.jdt.debug.ui/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
index d43372b..d505bb5 100644
--- a/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
@@ -38,7 +38,7 @@
  org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.jdt.core;bundle-version="[3.8.0,4.0.0)",
  org.eclipse.debug.ui;bundle-version="[3.10.0,4.0.0)",
- org.eclipse.jdt.debug;bundle-version="[3.7.100,4.0.0)",
+ org.eclipse.jdt.debug;bundle-version="[3.10.0,4.0.0)",
  org.eclipse.jdt.launching;bundle-version="[3.7.0,4.0.0)",
  org.eclipse.jdt.ui;bundle-version="[3.8.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
diff --git a/org.eclipse.jdt.debug.ui/plugin.xml b/org.eclipse.jdt.debug.ui/plugin.xml
index ef6a15c..d25b659 100644
--- a/org.eclipse.jdt.debug.ui/plugin.xml
+++ b/org.eclipse.jdt.debug.ui/plugin.xml
@@ -3379,7 +3379,7 @@
             <consolePatternMatchListener
             class="org.eclipse.jdt.internal.debug.ui.console.JavaExceptionConsoleTracker"
             regex="\w[^\(\s]+Exception[\s|:]"
-            qualifier="Exception"
+            qualifier="Exception[\s|:]"
             id="org.eclipse.jdt.debug.ui.JavaExceptionConsoleTracker">
          <enablement>
             <or>
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
index 2e4985f..2783787 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -70,6 +70,7 @@
 	public static String JavaDebugPreferencePage_20;
 
 	public static String JavaDebugPreferencePage_only_include_exported_entries;
+	public static String JavaDebugPreferencePage_filterUnrelatedBreakpoints;
 	public static String JavaDebugPreferencePage_promptWhenDeletingCondidtionalBreakpoint;
 
 
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
index 117031a..a99afe6 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2013 IBM Corporation and others.
+# Copyright (c) 2000, 2016 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
@@ -299,6 +299,7 @@
 JavaDebugPreferencePage_promptWhenDeletingCondidtionalBreakpoint=&Prompt for confirmation when deleting a conditional breakpoint from editor
 JavaDebugPreferencePage_0=See <a>''{0}''</a> for general debug settings.
 JavaDebugPreferencePage_only_include_exported_entries=Onl&y include exported classpath entries when launching
+JavaDebugPreferencePage_filterUnrelatedBreakpoints=&Do not install breakpoints from unrelated projects
 JavaVariableLabelProvider_0=unavailable
 EditLogicalStructureDialog_0=Qualified type &name:
 EditLogicalStructureDialog_1=&Browse...
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
index 8e6f26a..46bcbc6 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -79,6 +79,7 @@
 	private Button fOpenInspector;
 	private Button fPromptUnableToInstallBreakpoint;
 	private Button fPromptDeleteConditionalBreakpoint;
+	private Button fFilterUnrelatedBreakpoints;
 	private Button fOnlyIncludeExportedEntries;
 	private Combo fSuspendVMorThread;
 	private Combo fWatchpoint;
@@ -159,6 +160,7 @@
 		SWTFactory.createVerticalSpacer(composite, 1);
 		fPromptUnableToInstallBreakpoint = SWTFactory.createCheckButton(composite, DebugUIMessages.JavaDebugPreferencePage_19, null, false, 1);
 		fPromptDeleteConditionalBreakpoint= SWTFactory.createCheckButton(composite, DebugUIMessages.JavaDebugPreferencePage_promptWhenDeletingCondidtionalBreakpoint, null, false, 1);
+		fFilterUnrelatedBreakpoints = SWTFactory.createCheckButton(composite, DebugUIMessages.JavaDebugPreferencePage_filterUnrelatedBreakpoints, null, false, 1);
 		
 		SWTFactory.createVerticalSpacer(composite, 1);
 		fOnlyIncludeExportedEntries = SWTFactory.createCheckButton(composite, DebugUIMessages.JavaDebugPreferencePage_only_include_exported_entries, null, false, 1);
@@ -201,6 +203,7 @@
 			prefs.putInt(JDIDebugPlugin.PREF_DEFAULT_WATCHPOINT_SUSPEND_POLICY, fWatchpoint.getSelectionIndex());
 			prefs.putBoolean(JDIDebugModel.PREF_HCR_WITH_COMPILATION_ERRORS, fPerformHCRWithCompilationErrors.getSelection());
 			prefs.putInt(JDIDebugModel.PREF_REQUEST_TIMEOUT, fTimeoutText.getIntValue());
+			prefs.putBoolean(JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES, fFilterUnrelatedBreakpoints.getSelection());
 			try {
 				prefs.flush();
 			}
@@ -244,6 +247,7 @@
 			fWatchpoint.select(prefs.getInt(JDIDebugPlugin.PREF_DEFAULT_WATCHPOINT_SUSPEND_POLICY, 0));
 			fPerformHCRWithCompilationErrors.setSelection(prefs.getBoolean(JDIDebugModel.PREF_HCR_WITH_COMPILATION_ERRORS, true));
 			fTimeoutText.setStringValue(new Integer(prefs.getInt(JDIDebugModel.PREF_REQUEST_TIMEOUT, JDIDebugModel.DEF_REQUEST_TIMEOUT)).toString());
+			fFilterUnrelatedBreakpoints.setSelection(prefs.getBoolean(JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES, true));
 		}
 		prefs = DefaultScope.INSTANCE.getNode(LaunchingPlugin.ID_PLUGIN);
 		if(prefs != null) {
@@ -275,6 +279,7 @@
 			fWatchpoint.select(prefs.getInt(JDIDebugPlugin.PREF_DEFAULT_WATCHPOINT_SUSPEND_POLICY, 0));
 			fPerformHCRWithCompilationErrors.setSelection(prefs.getBoolean(JDIDebugModel.PREF_HCR_WITH_COMPILATION_ERRORS, true));
 			fTimeoutText.setStringValue(new Integer(prefs.getInt(JDIDebugModel.PREF_REQUEST_TIMEOUT, JDIDebugModel.DEF_REQUEST_TIMEOUT)).toString());
+			fFilterUnrelatedBreakpoints.setSelection(prefs.getBoolean(JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES, true));
 		}
 		prefs = InstanceScope.INSTANCE.getNode(LaunchingPlugin.ID_PLUGIN);
 		if(prefs != null) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaLogicalStructuresPreferencePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaLogicalStructuresPreferencePage.java
index 3f223fb..aae3404 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaLogicalStructuresPreferencePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaLogicalStructuresPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -26,7 +26,6 @@
 import org.eclipse.jface.viewers.ColumnLayoutData;
 import org.eclipse.jface.viewers.ColumnWeightData;
 import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IColorProvider;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -45,13 +44,11 @@
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.KeyAdapter;
 import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Table;
@@ -66,11 +63,8 @@
  */
 public class JavaLogicalStructuresPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, ISelectionChangedListener, Listener {
 
-    public class LogicalStructuresListViewerLabelProvider extends LabelProvider implements IColorProvider, ITableLabelProvider {
+	public class LogicalStructuresListViewerLabelProvider extends LabelProvider implements ITableLabelProvider {
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
-         */
         @Override
 		public String getColumnText(Object element, int columnIndex) {
             JavaLogicalStructure logicalStructure= (JavaLogicalStructure) element;
@@ -94,35 +88,6 @@
             return buffer.toString();
         }
 
-		/* (non-Javadoc)
-		 * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
-		 */
-		@Override
-		public Color getForeground(Object element) {
-			if (element instanceof JavaLogicalStructure) {
-				if (((JavaLogicalStructure) element).isContributed()) {
-					return Display.getCurrent().getSystemColor(SWT.COLOR_INFO_FOREGROUND);		
-				}
-			}
-			return null;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
-		 */
-		@Override
-		public Color getBackground(Object element) {
-			if (element instanceof JavaLogicalStructure) {
-				if (((JavaLogicalStructure) element).isContributed()) {
-					return Display.getCurrent().getSystemColor(SWT.COLOR_INFO_BACKGROUND);		
-				}
-			}
-			return null;
-		}
-
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
-         */
         @Override
 		public Image getColumnImage(Object element, int columnIndex) {
             return null;
@@ -134,31 +99,22 @@
         private List<JavaLogicalStructure> fLogicalStructures;
         
         LogicalStructuresListViewerContentProvider() {
-			fLogicalStructures= new ArrayList<JavaLogicalStructure>();
+			fLogicalStructures = new ArrayList<>();
 			JavaLogicalStructure[] logicalStructures= JavaLogicalStructures.getJavaLogicalStructures();
 			for (int i= 0; i < logicalStructures.length; i++) {
 				add(logicalStructures[i]);
 			}
 		}
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-         */
         @Override
 		public Object[] getElements(Object inputElement) {
             return fLogicalStructures.toArray();
         }
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-         */
         @Override
 		public void dispose() {
         }
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
-         */
         @Override
 		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
         }
@@ -214,7 +170,7 @@
 		}
 
 		public void saveUserDefinedJavaLogicalStructures() {
-			List<JavaLogicalStructure> logicalStructures= new ArrayList<JavaLogicalStructure>();
+			List<JavaLogicalStructure> logicalStructures = new ArrayList<>();
 			for (Iterator<JavaLogicalStructure> iter = fLogicalStructures.iterator(); iter.hasNext();) {
 				JavaLogicalStructure logicalStructure= iter.next();
 				if (!logicalStructure.isContributed()) {
@@ -255,18 +211,12 @@
         setDescription(DebugUIMessages.JavaLogicalStructuresPreferencePage_11); 
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.preference.PreferencePage#createControl(org.eclipse.swt.widgets.Composite)
-	 */
 	@Override
 	public void createControl(Composite parent) {
 		super.createControl(parent);
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaDebugHelpContextIds.JAVA_LOGICAL_STRUCTURES_PAGE);
 	}
 	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
-	 */
 	@Override
 	protected Control createContents(Composite parent) {
         Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_BOTH, 0, 2);
@@ -394,15 +344,9 @@
         });
     }
 
-    /* (non-Javadoc)
-	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
-	 */
 	@Override
 	public void init(IWorkbench workbench) {}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
-	 */
 	@Override
 	public void selectionChanged(SelectionChangedEvent event) {
 		ISelection selection= event.getSelection();
@@ -462,9 +406,6 @@
 	    }
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
-	 */
 	@Override
 	public void handleEvent(Event event) {
 		Widget source= event.widget;
@@ -533,9 +474,6 @@
 		
 	}
 	
-    /* (non-Javadoc)
-	 * @see org.eclipse.jface.preference.PreferencePage#performOk()
-	 */
 	@Override
 	public boolean performOk() {
 		if (fCodeViewer != null) {
@@ -545,9 +483,6 @@
 		return super.performOk();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.preference.PreferencePage#performCancel()
-	 */
 	@Override
 	public boolean performCancel() {
 		if (fCodeViewer != null) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/ClasspathLabelProvider.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/ClasspathLabelProvider.java
index 31f25dd..9dd9cfd 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/ClasspathLabelProvider.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/ClasspathLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -13,18 +13,14 @@
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
 import org.eclipse.jdt.internal.debug.ui.launcher.RuntimeClasspathEntryLabelProvider;
-import org.eclipse.jface.viewers.IColorProvider;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
 
 /**
  * Label provider for classpath elements
  */
-public class ClasspathLabelProvider implements ILabelProvider, IColorProvider {
+public class ClasspathLabelProvider implements ILabelProvider {
 	
 	private RuntimeClasspathEntryLabelProvider runtimeClasspathLabelProvider= new RuntimeClasspathEntryLabelProvider();
 
@@ -54,30 +50,6 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
-	 */
-	@Override
-	public Color getBackground(Object element) {
-		if (element instanceof ClasspathGroup) {
-			Display display= Display.getCurrent();
-			return display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);		
-		}
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
-	 */
-	@Override
-	public Color getForeground(Object element) {
-		if (element instanceof ClasspathGroup) {
-			Display display= Display.getCurrent();
-			return display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);		
-		}
-		return null;
-	}
-
-	/* (non-Javadoc)
 	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
 	 */
 	@Override
diff --git a/org.eclipse.jdt.debug/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.jdt.debug/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d211d32..0000000
--- a/org.eclipse.jdt.debug/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
index d5544b3..76cd0b0 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -291,7 +291,7 @@
 		for (Iterator<String> iter = options.keySet().iterator(); iter.hasNext();) {
 			String key = iter.next();
 			String value = options.get(key);
-			if (JavaCore.ERROR.equals(value) || JavaCore.WARNING.equals(value)) {
+			if (JavaCore.ERROR.equals(value) || JavaCore.WARNING.equals(value) || JavaCore.INFO.equals(value)) {
 				options.put(key, JavaCore.IGNORE);
 			}
 		}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
index cf31430..c11b22d 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -94,6 +94,14 @@
 			+ ".suspend_for_breakpoints_during_evaluation"; //$NON-NLS-1$
 
 	/**
+	 * Boolean preference controlling whether to not install (filter) breakpoints for types existing multiple times
+	 * in source projects and not related to the current debug session.
+	 * @since 3.10
+	 */
+	public static final String PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES = getPluginIdentifier()
+			+ ".do_not_install_breakpoints_from_unrelated_sources"; //$NON-NLS-1$
+	
+	/**
 	 * Not to be instantiated.
 	 */
 	private JDIDebugModel() {
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugPluginPreferenceInitializer.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugPluginPreferenceInitializer.java
index 7cf10a9..5430040 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugPluginPreferenceInitializer.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugPluginPreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 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
@@ -41,5 +41,6 @@
 		node.putBoolean(JDIDebugPlugin.PREF_SHOW_REFERENCES_IN_VAR_VIEW, false);
 		node.putInt(JDIDebugPlugin.PREF_ALL_REFERENCES_MAX_COUNT, 100);
 		node.putInt(JDIDebugPlugin.PREF_ALL_INSTANCES_MAX_COUNT, 100);
+		node.putBoolean(JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES, true);
 	}
 }
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
index 08608a1..4971e50 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
@@ -8,31 +8,41 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jesper Steen Moller - enhancement 254677 - filter getters/setters
+ *     Andrey Loskutov <loskutov@gmx.de> - bug 5188 - breakpoint filtering
  *******************************************************************************/
 package org.eclipse.jdt.internal.debug.core.model;
 
 import java.io.IOException;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
-
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
-
 import org.eclipse.debug.core.DebugEvent;
 import org.eclipse.debug.core.DebugException;
 import org.eclipse.debug.core.DebugPlugin;
@@ -40,6 +50,7 @@
 import org.eclipse.debug.core.IBreakpointManagerListener;
 import org.eclipse.debug.core.IDebugEventSetListener;
 import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchListener;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.core.model.IDebugElement;
@@ -51,13 +62,22 @@
 import org.eclipse.debug.core.model.ISuspendResume;
 import org.eclipse.debug.core.model.ITerminate;
 import org.eclipse.debug.core.model.IThread;
-
 import org.eclipse.jdi.TimeoutException;
 import org.eclipse.jdi.internal.VirtualMachineImpl;
 import org.eclipse.jdi.internal.jdwp.JdwpReplyPacket;
-
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
-
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.TypeNameMatch;
+import org.eclipse.jdt.core.search.TypeNameMatchRequestor;
 import org.eclipse.jdt.debug.core.IJavaBreakpoint;
 import org.eclipse.jdt.debug.core.IJavaDebugTarget;
 import org.eclipse.jdt.debug.core.IJavaHotCodeReplaceListener;
@@ -69,7 +89,6 @@
 import org.eclipse.jdt.debug.core.JDIDebugModel;
 import org.eclipse.jdt.debug.eval.EvaluationManager;
 import org.eclipse.jdt.debug.eval.IAstEvaluationEngine;
-
 import org.eclipse.jdt.internal.debug.core.EventDispatcher;
 import org.eclipse.jdt.internal.debug.core.IJDIEventListener;
 import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
@@ -107,7 +126,7 @@
 	/**
 	 * Threads contained in this debug target. When a thread starts it is added
 	 * to the list. When a thread ends it is removed from the list.
-	 * 
+	 *
 	 * TODO investigate making this a synchronized collection, to remove all this copying
 	 * @see #getThreadIterator()
 	 */
@@ -245,21 +264,21 @@
 	/**
 	 * When a step lands in a filtered location, this indicates whether stepping
 	 * should proceed "through" to an unfiltered location or step return.
-	 * 
+	 *
 	 * @since 3.3
 	 */
 	private static final int STEP_THRU_FILTERS = 0x010;
 
 	/**
 	 * Step filter bit mask - indicates if simple getters are filtered.
-	 * 
+	 *
 	 * @since 3.7
 	 */
 	private static final int FILTER_GETTERS = 0x020;
 
 	/**
 	 * Step filter bit mask - indicates if simple setters are filtered.
-	 * 
+	 *
 	 * @since 3.7
 	 */
 	private static final int FILTER_SETTERS = 0x040;
@@ -275,14 +294,29 @@
 
 	/**
 	 * Target specific HCR listeners
-	 * 
+	 *
 	 * @since 3.6
 	 */
 	private ListenerList<IJavaHotCodeReplaceListener> fHCRListeners = new ListenerList<>();
 
 	/**
+	 * Java scope of the current launch, "null" means everything is in scope
+	 */
+	private IJavaSearchScope fScope;
+
+	/**
+	 * Java projects of the current launch, "null" means everything is in scope
+	 */
+	private Set<IProject> fProjects;
+
+	/**
+	 * Java types from breakpoints with the flag if they are in scope for current launch
+	 */
+	private Map<String, Boolean> fKnownTypes = new HashMap<>();
+
+	/**
 	 * Creates a new JDI debug target for the given virtual machine.
-	 * 
+	 *
 	 * @param jvm
 	 *            the underlying VM
 	 * @param name
@@ -316,6 +350,7 @@
 		setTerminating(false);
 		setDisconnected(false);
 		setName(name);
+		prepareBreakpointsSearchScope();
 		setBreakpoints(new ArrayList<IBreakpoint>(5));
 		setThreadList(new ArrayList<JDIThread>(5));
 		fGroups = new ArrayList<JDIThreadGroup>(5);
@@ -327,10 +362,54 @@
 				.addBreakpointManagerListener(this);
 	}
 
+
+	private void prepareBreakpointsSearchScope() {
+		boolean enableFiltering = Platform.getPreferencesService().getBoolean(
+				JDIDebugPlugin.getUniqueIdentifier(),
+				JDIDebugModel.PREF_FILTER_BREAKPOINTS_FROM_UNRELATED_SOURCES,
+				true,
+				null);
+		ILaunchConfiguration config = getLaunch().getLaunchConfiguration();
+		if (!enableFiltering || config == null) {
+			return;
+		}
+		try {
+			// See IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH
+			boolean defaultClasspath = config.getAttribute("org.eclipse.jdt.launching.DEFAULT_CLASSPATH", true); //$NON-NLS-1$
+			if(!defaultClasspath){
+				return;
+			}
+
+			IResource[] resources = config.getMappedResources();
+			if (resources != null && resources.length != 0) {
+				Set<IJavaProject> javaProjects = getJavaProjects(resources);
+				fProjects = collectReferencedJavaProjects(javaProjects);
+				fScope = createSourcesOnlyScope();
+				return;
+			}
+			// See IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME
+			String projectName = config.getAttribute("org.eclipse.jdt.launching.PROJECT_ATTR", (String)null); //$NON-NLS-1$
+			if(projectName != null){
+				Set<IJavaProject> javaProjects = getJavaProjects(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName));
+				fProjects = collectReferencedJavaProjects(javaProjects);
+				fScope = createSourcesOnlyScope();
+				return;
+			}
+		} catch (CoreException e) {
+			logError(e);
+		}
+	}
+
+	private IJavaSearchScope createSourcesOnlyScope() {
+		int includeMask = IJavaSearchScope.SOURCES;
+		Set<IJavaProject> javaProjects = getJavaProjects(ResourcesPlugin.getWorkspace().getRoot().getProjects());
+		return SearchEngine.createJavaSearchScope(javaProjects.toArray(new IJavaElement[javaProjects.size()]), includeMask);
+	}
+
 	/**
 	 * Returns the event dispatcher for this debug target. There is one event
 	 * dispatcher per debug target.
-	 * 
+	 *
 	 * @return event dispatcher
 	 */
 	public EventDispatcher getEventDispatcher() {
@@ -340,7 +419,7 @@
 	/**
 	 * Sets the event dispatcher for this debug target. Set once at
 	 * initialization.
-	 * 
+	 *
 	 * @param dispatcher
 	 *            event dispatcher
 	 * @see #initialize()
@@ -353,7 +432,7 @@
 	 * Returns an iterator over the collection of threads. The returned iterator
 	 * is made on a copy of the thread list so that it is thread safe. This
 	 * method should always be used instead of getThreadList().iterator()
-	 * 
+	 *
 	 * @return an iterator over the collection of threads
 	 */
 	private Iterator<JDIThread> getThreadIterator() {
@@ -370,7 +449,7 @@
 	 * collection on creation. Threads are added and removed as they start and
 	 * end. On termination this collection is set to the immutable singleton
 	 * empty list.
-	 * 
+	 *
 	 * @param threads
 	 *            empty list
 	 */
@@ -380,7 +459,7 @@
 
 	/**
 	 * Returns the collection of breakpoints installed in this debug target.
-	 * 
+	 *
 	 * @return list of installed breakpoints - instances of
 	 *         <code>IJavaBreakpoint</code>
 	 */
@@ -391,7 +470,7 @@
 	/**
 	 * Sets the list of breakpoints installed in this debug target. Set to an
 	 * empty list on creation.
-	 * 
+	 *
 	 * @param breakpoints
 	 *            empty list
 	 */
@@ -404,7 +483,7 @@
 	 * first event received from the VM. The VM is resumed. This event is not
 	 * generated when an attach is made to a VM that is already running (has
 	 * already started up). The VM is resumed as specified on creation.
-	 * 
+	 *
 	 * @param event
 	 *            VM start event
 	 */
@@ -540,7 +619,7 @@
 	 * reference. A creation event is fired for the thread. Returns
 	 * <code>null</code> if during the creation of the thread this target is set
 	 * to the disconnected state.
-	 * 
+	 *
 	 * @param thread
 	 *            underlying thread
 	 * @return model thread
@@ -563,7 +642,7 @@
 	/**
 	 * Factory method for creating new threads. Creates and returns a new thread
 	 * object for the underlying thread reference, or <code>null</code> if none
-	 * 
+	 *
 	 * @param reference
 	 *            thread reference
 	 * @return JDI model thread
@@ -599,7 +678,7 @@
 
 	/**
 	 * Returns whether this target has any threads which can be resumed.
-	 * 
+	 *
 	 * @return true if any thread can be resumed, false otherwise
 	 * @since 3.2
 	 */
@@ -650,7 +729,7 @@
 
 	/**
 	 * Returns whether this debug target supports disconnecting.
-	 * 
+	 *
 	 * @return whether this debug target supports disconnecting
 	 */
 	protected boolean supportsDisconnect() {
@@ -659,7 +738,7 @@
 
 	/**
 	 * Sets whether this debug target supports disconnection. Set on creation.
-	 * 
+	 *
 	 * @param supported
 	 *            <code>true</code> if this target supports disconnection,
 	 *            otherwise <code>false</code>
@@ -670,7 +749,7 @@
 
 	/**
 	 * Returns whether this debug target supports termination.
-	 * 
+	 *
 	 * @return whether this debug target supports termination
 	 */
 	protected boolean supportsTerminate() {
@@ -679,7 +758,7 @@
 
 	/**
 	 * Sets whether this debug target supports termination. Set on creation.
-	 * 
+	 *
 	 * @param supported
 	 *            <code>true</code> if this target supports termination,
 	 *            otherwise <code>false</code>
@@ -715,7 +794,7 @@
 	/**
 	 * Returns whether this debug target supports hot code replace for the J9
 	 * VM.
-	 * 
+	 *
 	 * @return whether this debug target supports J9 hot code replace
 	 */
 	public boolean supportsJ9HotCodeReplace() {
@@ -735,7 +814,7 @@
 
 	/**
 	 * Returns whether this debug target supports hot code replace for JDK VMs.
-	 * 
+	 *
 	 * @return whether this debug target supports JDK hot code replace
 	 */
 	public boolean supportsJDKHotCodeReplace() {
@@ -752,7 +831,7 @@
 
 	/**
 	 * Returns whether this debug target supports popping stack frames.
-	 * 
+	 *
 	 * @return whether this debug target supports popping stack frames.
 	 */
 	public boolean canPopFrames() {
@@ -814,7 +893,7 @@
 	/**
 	 * Returns the underlying virtual machine associated with this debug target,
 	 * or <code>null</code> if none (disconnected/terminated)
-	 * 
+	 *
 	 * @return the underlying VM or <code>null</code>
 	 */
 	@Override
@@ -825,7 +904,7 @@
 	/**
 	 * Sets the underlying VM associated with this debug target. Set on
 	 * creation.
-	 * 
+	 *
 	 * @param vm
 	 *            underlying VM
 	 */
@@ -902,7 +981,7 @@
 
 	/**
 	 * Returns whether a hot code replace attempt has failed.
-	 * 
+	 *
 	 * HCR has failed if there are any out of synch types
 	 */
 	public boolean hasHCRFailed() {
@@ -948,7 +1027,7 @@
 	/**
 	 * Finds and returns the JDI thread for the associated thread reference, or
 	 * <code>null</code> if not found.
-	 * 
+	 *
 	 * @param the
 	 *            underlying thread reference
 	 * @return the associated model thread
@@ -979,7 +1058,7 @@
 	 * Sets the name of this debug target. Set on creation, and if set to
 	 * <code>null</code> the name will be retrieved lazily from the underlying
 	 * VM.
-	 * 
+	 *
 	 * @param name
 	 *            the name of this VM or <code>null</code> if the name should be
 	 *            retrieved from the underlying VM
@@ -991,7 +1070,7 @@
 	/**
 	 * Sets the process associated with this debug target, possibly
 	 * <code>null</code>. Set on creation.
-	 * 
+	 *
 	 * @param process
 	 *            the system process associated with the underlying VM, or
 	 *            <code>null</code> if no process is associated with this debug
@@ -1012,7 +1091,7 @@
 	/**
 	 * Notification the underlying VM has died. Updates the state of this target
 	 * to be terminated.
-	 * 
+	 *
 	 * @param event
 	 *            VM death event
 	 */
@@ -1023,7 +1102,7 @@
 	/**
 	 * Notification the underlying VM has disconnected. Updates the state of
 	 * this target to be terminated.
-	 * 
+	 *
 	 * @param event
 	 *            disconnect event
 	 */
@@ -1045,7 +1124,7 @@
 
 	/**
 	 * Sets whether this VM is suspended.
-	 * 
+	 *
 	 * @param suspended
 	 *            whether this VM is suspended
 	 */
@@ -1070,7 +1149,7 @@
 
 	/**
 	 * Sets whether this debug target is terminated
-	 * 
+	 *
 	 * @param terminated
 	 *            <code>true</code> if this debug target is terminated,
 	 *            otherwise <code>false</code>
@@ -1081,7 +1160,7 @@
 
 	/**
 	 * Sets whether this debug target is disconnected
-	 * 
+	 *
 	 * @param disconnected
 	 *            <code>true</code> if this debug target is disconnected,
 	 *            otherwise <code>false</code>
@@ -1101,7 +1180,7 @@
 	/**
 	 * Creates, enables and returns a class prepare request for the specified
 	 * class name in this target.
-	 * 
+	 *
 	 * @param classPattern
 	 *            regular expression specifying the pattern of class names that
 	 *            will cause the event request to fire. Regular expressions may
@@ -1119,7 +1198,7 @@
 	 * class name in this target. Can specify a class exclusion filter as well.
 	 * This is a utility method used by event requesters that need to create
 	 * class prepare requests.
-	 * 
+	 *
 	 * @param classPattern
 	 *            regular expression specifying the pattern of class names that
 	 *            will cause the event request to fire. Regular expressions may
@@ -1143,7 +1222,7 @@
 	 * class name in this target. Can specify a class exclusion filter as well.
 	 * This is a utility method used by event requesters that need to create
 	 * class prepare requests.
-	 * 
+	 *
 	 * @param classPattern
 	 *            regular expression specifying the pattern of class names that
 	 *            will cause the event request to fire. Regular expressions may
@@ -1170,7 +1249,7 @@
 	 * class name in this target. Can specify a class exclusion filter as well.
 	 * This is a utility method used by event requesters that need to create
 	 * class prepare requests.
-	 * 
+	 *
 	 * @param classPattern
 	 *            regular expression specifying the pattern of class names that
 	 *            will cause the event request to fire. Regular expressions may
@@ -1241,7 +1320,7 @@
 
 	/**
 	 * @see ISuspendResume#resume()
-	 * 
+	 *
 	 *      Updates the state of this debug target to resumed, but does not fire
 	 *      notification of the resumption.
 	 */
@@ -1251,7 +1330,7 @@
 
 	/**
 	 * @see ISuspendResume#resume()
-	 * 
+	 *
 	 *      Updates the state of this debug target, but only fires notification
 	 *      to listeners if <code>fireNotification</code> is <code>true</code>.
 	 */
@@ -1286,14 +1365,246 @@
 	 */
 	@Override
 	public boolean supportsBreakpoint(IBreakpoint breakpoint) {
-		return breakpoint instanceof IJavaBreakpoint;
+		boolean isJava = breakpoint instanceof IJavaBreakpoint;
+		if(!isJava){
+			return false;
+		}
+		if(fScope == null){
+			// No checks, everything in scope: the filtering is disabled
+			return true;
+		}
+
+		IJavaBreakpoint jBreakpoint = (IJavaBreakpoint) breakpoint;
+
+		// Check if the breakpoint from resources in target scope
+		IMarker marker = jBreakpoint.getMarker();
+		if(marker == null) {
+			// Marker not available, so don't guess and allow the breakpoint to be set
+			return true;
+		}
+
+		IResource resource = marker.getResource();
+		// Java exception breakpoints have wsp root as resource
+		if(resource == null || resource == ResourcesPlugin.getWorkspace().getRoot()) {
+			return true;
+		}
+		Set<IProject> projects = fProjects;
+		if(projects == null){
+			return true;
+		}
+		
+		// Breakpoint from project known by the resource mapping
+		if (projects.contains(resource.getProject())) {
+			return true;
+		}
+
+		// Check if this is a resource which is linked to any of the projects
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		URI uri = resource.getLocationURI();
+		if(uri != null){
+			IFile[] files = root.findFilesForLocationURI(uri);
+			for (IFile file : files) {
+				if(projects.contains(file.getProject())){
+					return true;
+				}
+			}
+		}
+
+		Map<String, Boolean> knownTypes = fKnownTypes;
+		if(knownTypes == null){
+			return true;
+		}
+
+		// breakpoint belongs to resource outside of referenced projects?
+		// This can be also an incomplete resource mapping.
+		// Try to see if the type available multiple times in workspace
+		try {
+			String typeName = jBreakpoint.getTypeName();
+			if(typeName != null){
+				Boolean known = knownTypes.get(typeName);
+				if(known != null){
+					return known.booleanValue();
+				}
+				boolean supportedBreakpoint = !hasMultipleMatchesInWorkspace(typeName);
+				knownTypes.put(typeName, Boolean.valueOf(supportedBreakpoint));
+				return supportedBreakpoint;
+			}
+		} catch (CoreException e) {
+			logError(e);
+		}
+		// we don't know why computation failed, so let assume the breakpoint is supported.
+		return true;
+	}
+
+	private Set<IJavaProject> getJavaProjects(IResource... resources) {
+		Set<IJavaProject> projects = new LinkedHashSet<>();
+		for (IResource resource : resources) {
+			IProject project = resource.getProject();
+			if(!project.isAccessible()){
+				continue;
+			}
+			IJavaElement javaElement = JavaCore.create(project);
+			if(javaElement != null) {
+				projects.add(javaElement.getJavaProject());
+			}
+		}
+		return projects;
+	}
+
+	/**
+	 * @param javaProjects the set which will be updated with all referenced java projects
+	 * @return corresponding resource projects
+	 */
+	private Set<IProject> collectReferencedJavaProjects(Set<IJavaProject> javaProjects) {
+		Set<IProject> projects = new LinkedHashSet<>();
+		// collect all references
+		for (IJavaProject jProject : javaProjects) {
+			projects.add(jProject.getProject());
+			addReferencedProjects(jProject, projects);
+		}
+		// update java projects set with new java projects we might collected
+		for (IProject project : projects) {
+			IJavaProject jProject = JavaCore.create(project);
+			if(jProject != null){
+				javaProjects.add(jProject);
+			}
+		}
+		return projects;
+	}
+
+	private void addReferencedProjects(IJavaProject jProject, Set<IProject> projects) {
+		IClasspathEntry[] cp;
+		try {
+			// we want resolved classpath to get variables and containers resolved for us
+			cp = jProject.getResolvedClasspath(true);
+		} catch (JavaModelException e) {
+			// we don't care here
+			return;
+		}
+		for (IClasspathEntry cpe : cp) {
+			int entryKind = cpe.getEntryKind();
+			IProject project = null;
+			switch (entryKind) {
+				case IClasspathEntry.CPE_LIBRARY:
+					// we must check for external folders coming from other projects in the workspace
+					project = getProjectOfExternalFolder(cpe);
+					break;
+				case IClasspathEntry.CPE_PROJECT:
+					// we must add any projects referenced
+					project = getProject(cpe);
+					break;
+				case IClasspathEntry.CPE_SOURCE:
+					// we have the project already
+				case IClasspathEntry.CPE_VARIABLE:
+					// should not happen on resolved classpath
+				case IClasspathEntry.CPE_CONTAINER:
+					// should not happen on resolved classpath
+				default:
+					break;
+			}
+
+			if(project == null || projects.contains(project) || !project.isAccessible()){
+				continue;
+			}
+
+			IJavaProject referenced = JavaCore.create(project);
+			if (referenced != null) {
+				// we have found new project, start recursion
+				projects.add(project);
+				addReferencedProjects(referenced, projects);
+			}
+		}
+	}
+
+	private IProject getProject(IClasspathEntry cpe) {
+		IPath projectPath = cpe.getPath();
+		if (projectPath == null || projectPath.isEmpty()) {
+			return null;
+		}
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		IProject project = root.getProject(projectPath.lastSegment());
+		if (project.isAccessible()) {
+			return project;
+		}
+		return null;
+	}
+
+	private static IProject getProjectOfExternalFolder(IClasspathEntry cpe){
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		if(cpe.getContentKind() == IPackageFragmentRoot.K_BINARY){
+			IPath path = cpe.getPath();
+			if(path == null || path.isEmpty()){
+				return null;
+			}
+			IProject project = root.getProject(path.segment(0));
+			if(project.isAccessible()) {
+				return project;
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * Checks if the given type (computed from a breakpoint resource) exists multiple times in the workspace.
+	 */
+	private boolean hasMultipleMatchesInWorkspace(final String typeName) {
+		final AtomicInteger matchCount = new AtomicInteger(0);
+		String packageName = null;
+		String simpleName = typeName;
+		int lastDot = typeName.lastIndexOf('.');
+		if(lastDot > 0 && lastDot < typeName.length() - 1){
+			packageName = typeName.substring(0, lastDot);
+			simpleName = typeName.substring(lastDot + 1);
+		}
+		// get rid of inner types, use outer type name
+		final String fqName;
+		int firstDoll = simpleName.indexOf('$');
+		if(firstDoll > 0 && firstDoll < simpleName.length() - 1){
+			simpleName = simpleName.substring(0, firstDoll);
+			fqName = packageName + "." + simpleName; //$NON-NLS-1$
+		} else {
+			fqName = typeName;
+		}
+
+		final IProgressMonitor monitor = new NullProgressMonitor();
+        TypeNameMatchRequestor requestor = new TypeNameMatchRequestor() {
+			@Override
+			public void acceptTypeNameMatch(TypeNameMatch match) {
+				IType type = match.getType();
+				if(fqName.equals(type.getFullyQualifiedName())){
+					int count = matchCount.incrementAndGet();
+					if(count > 1) {
+						monitor.setCanceled(true);
+					}
+					return;
+				}
+			}
+		};
+		try {
+			SearchEngine searchEngine = new SearchEngine();
+			searchEngine.searchAllTypeNames(packageName != null? packageName.toCharArray() : null,
+					SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE,
+					simpleName.toCharArray(),
+			        SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE,
+			        IJavaSearchConstants.TYPE,
+			        fScope,
+			        requestor,
+			        IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
+			        monitor);
+		} catch (JavaModelException e) {
+			logError(e);
+			return true;
+		} catch (OperationCanceledException e){
+			// expected if we cancelled the search on second match
+		}
+		return matchCount.get() > 1;
 	}
 
 	/**
 	 * Notification a breakpoint has been added to the breakpoint manager. If
 	 * the breakpoint is a Java breakpoint and this target is not terminated,
 	 * the breakpoint is installed.
-	 * 
+	 *
 	 * @param breakpoint
 	 *            the breakpoint added to the breakpoint manager
 	 */
@@ -1327,7 +1638,7 @@
 	 * changed. If the breakpoint is a Java breakpoint, the associated event
 	 * request in the underlying VM is updated to reflect the new state of the
 	 * breakpoint.
-	 * 
+	 *
 	 * @param breakpoint
 	 *            the breakpoint that has changed
 	 */
@@ -1339,7 +1650,7 @@
 	 * Notification that the given breakpoint has been removed from the
 	 * breakpoint manager. If this target is not terminated, the breakpoint is
 	 * removed from the underlying VM.
-	 * 
+	 *
 	 * @param breakpoint
 	 *            the breakpoint has been removed from the breakpoint manager.
 	 */
@@ -1398,7 +1709,7 @@
 	/**
 	 * Prepares threads to suspend (terminates evaluations, waits for
 	 * invocations, etc.).
-	 * 
+	 *
 	 * @exception DebugException
 	 *                if a thread times out
 	 */
@@ -1431,7 +1742,7 @@
 
 	/**
 	 * Notifies this VM to update its state in preparation for a suspend.
-	 * 
+	 *
 	 * @param breakpoint
 	 *            the breakpoint that caused the suspension
 	 */
@@ -1442,7 +1753,7 @@
 
 	/**
 	 * Notifies this VM it has been suspended by the given breakpoint
-	 * 
+	 *
 	 * @param breakpoint
 	 *            the breakpoint that caused the suspension
 	 */
@@ -1457,7 +1768,7 @@
 
 	/**
 	 * Notifies this VM suspension has been cancelled
-	 * 
+	 *
 	 * @param breakpoint
 	 *            the breakpoint that caused the suspension
 	 */
@@ -1567,6 +1878,9 @@
 		setEventDispatcher(null);
 		setStepFilters(new String[0]);
 		fHCRListeners.clear();
+		fKnownTypes = null;
+		fProjects = null;
+		fScope = null;
 	}
 
 	/**
@@ -1590,7 +1904,7 @@
 	 * cleared.
 	 */
 	protected void removeAllBreakpoints() {
-		List<IBreakpoint> list = new ArrayList<IBreakpoint>(getBreakpoints()); 
+		List<IBreakpoint> list = new ArrayList<IBreakpoint>(getBreakpoints());
 		for(IBreakpoint bp : list) {
 			JavaBreakpoint breakpoint = (JavaBreakpoint) bp;
 			try {
@@ -1620,7 +1934,7 @@
 
 	/**
 	 * Returns VirtualMachine.classesByName(String), logging any JDI exceptions.
-	 * 
+	 *
 	 * @see com.sun.jdi.VirtualMachine
 	 */
 	public List<ReferenceType> jdiClassesByName(String className) {
@@ -1694,7 +2008,7 @@
 	 * Returns the CRC-32 of the entire class file contents associated with
 	 * given type, on the target VM, or <code>null</code> if the type is not
 	 * loaded, or a CRC for the type is not known.
-	 * 
+	 *
 	 * @param typeName
 	 *            fully qualified name of the type for which a CRC is required.
 	 *            For example, "com.example.Example".
@@ -1983,7 +2297,7 @@
 		 * creating the thread, a create event is fired for the model thread.
 		 * The event is ignored if the underlying thread is already marked as
 		 * collected.
-		 * 
+		 *
 		 * @param event
 		 *            a thread start event
 		 * @param target
@@ -2022,7 +2336,7 @@
 
 		/*
 		 * (non-Javadoc)
-		 * 
+		 *
 		 * @see
 		 * org.eclipse.jdt.internal.debug.core.IJDIEventListener#eventSetComplete
 		 * (com.sun.jdi.event.Event,
@@ -2085,7 +2399,7 @@
 		 * that has terminated, and removes it from the collection of threads
 		 * belonging to this debug target. A terminate event is fired for the
 		 * model thread.
-		 * 
+		 *
 		 * @param event
 		 *            a thread death event
 		 * @param target
@@ -2118,7 +2432,7 @@
 
 		/*
 		 * (non-Javadoc)
-		 * 
+		 *
 		 * @see
 		 * org.eclipse.jdt.internal.debug.core.IJDIEventListener#eventSetComplete
 		 * (com.sun.jdi.event.Event,
@@ -2144,7 +2458,7 @@
 
 		/*
 		 * (non-Javadoc)
-		 * 
+		 *
 		 * @see
 		 * org.eclipse.core.internal.jobs.InternalJob#run(org.eclipse.core.runtime
 		 * .IProgressMonitor)
@@ -2162,7 +2476,7 @@
 
 		/*
 		 * (non-Javadoc)
-		 * 
+		 *
 		 * @see org.eclipse.core.runtime.jobs.Job#shouldRun()
 		 */
 		@Override
@@ -2172,7 +2486,7 @@
 
 		/*
 		 * (non-Javadoc)
-		 * 
+		 *
 		 * @see org.eclipse.core.internal.jobs.InternalJob#shouldSchedule()
 		 */
 		@Override
@@ -2192,7 +2506,7 @@
 
 	/**
 	 * Java debug targets do not support storage retrieval.
-	 * 
+	 *
 	 * @see IMemoryBlockRetrieval#supportsStorageRetrieval()
 	 */
 	@Override
@@ -2245,7 +2559,7 @@
 	/**
 	 * Sets whether the VM should be resumed on startup. Has no effect if the VM
 	 * is already running when this target is created.
-	 * 
+	 *
 	 * @param resume
 	 *            whether the VM should be resumed on startup
 	 */
@@ -2255,7 +2569,7 @@
 
 	/**
 	 * Returns whether this VM should be resumed on startup.
-	 * 
+	 *
 	 * @return whether this VM should be resumed on startup
 	 */
 	protected synchronized boolean isResumeOnStartup() {
@@ -2296,7 +2610,7 @@
 
 	/*
 	 * (non-Javadoc) Was added in 3.3, made API in 3.5
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#isStepThruFilters()
 	 */
 	@Override
@@ -2352,7 +2666,7 @@
 
 	/*
 	 * (non-Javadoc) Was added in 3.3, made API in 3.5
-	 * 
+	 *
 	 * @see
 	 * org.eclipse.jdt.debug.core.IJavaDebugTarget#setStepThruFilters(boolean)
 	 */
@@ -2432,7 +2746,7 @@
 
 	/**
 	 * Sets the launch this target is contained in
-	 * 
+	 *
 	 * @param launch
 	 *            the launch this target is contained in
 	 */
@@ -2442,7 +2756,7 @@
 
 	/**
 	 * Returns the number of suspend events that have occurred in this target.
-	 * 
+	 *
 	 * @return the number of suspend events that have occurred in this target
 	 */
 	protected int getSuspendCount() {
@@ -2453,7 +2767,7 @@
 	 * Increments the suspend counter for this target based on the reason for
 	 * the suspend event. The suspend count is not updated for implicit
 	 * evaluations.
-	 * 
+	 *
 	 * @param eventDetail
 	 *            the reason for the suspend event
 	 */
@@ -2466,7 +2780,7 @@
 	/**
 	 * Returns an evaluation engine for the given project, creating one if
 	 * necessary.
-	 * 
+	 *
 	 * @param project
 	 *            java project
 	 * @return evaluation engine
@@ -2518,7 +2832,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * org.eclipse.jdt.debug.core.IJavaDebugTarget#supportsAccessWatchpoints()
 	 */
@@ -2533,7 +2847,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * org.eclipse.jdt.debug.core.IJavaDebugTarget#supportsModificationWatchpoints
 	 * ()
@@ -2569,7 +2883,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.debug.core.model.IStepFilters#supportsStepFilters()
 	 */
 	@Override
@@ -2603,7 +2917,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse
 	 * .debug.core.DebugEvent[])
@@ -2628,7 +2942,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
 	 */
 	@Override
@@ -2639,7 +2953,7 @@
 	/**
 	 * Adds the given thread group to the list of known thread groups. Also adds
 	 * any parent thread groups that have not already been added to the list.
-	 * 
+	 *
 	 * @param group
 	 *            thread group to add
 	 */
@@ -2674,7 +2988,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#getThreadGroups()
 	 */
 	@Override
@@ -2704,7 +3018,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#getAllThreadGroups()
 	 */
 	@Override
@@ -2717,7 +3031,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * org.eclipse.jdt.debug.core.IJavaDebugTarget#supportsInstanceRetrieval()
 	 */
@@ -2734,7 +3048,7 @@
 	 * Sends a JDWP command to the back end and returns the JDWP reply packet as
 	 * bytes. This method creates an appropriate command header and packet id,
 	 * before sending to the back end.
-	 * 
+	 *
 	 * @param commandSet
 	 *            command set identifier as defined by JDWP
 	 * @param commandId
@@ -2758,7 +3072,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#supportsForceReturn()
 	 */
 	@Override
@@ -2772,7 +3086,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#
 	 * supportsSelectiveGarbageCollection()
 	 */
@@ -2784,7 +3098,7 @@
 	/**
 	 * Sets whether this target supports selectively disabling/enabling garbage
 	 * collection of specific objects.
-	 * 
+	 *
 	 * @param enableGC
 	 *            whether this target supports selective GC
 	 */
@@ -2794,7 +3108,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#getVMName()
 	 */
 	@Override
@@ -2816,7 +3130,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#getVersion()
 	 */
 	@Override
@@ -2838,7 +3152,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#refreshState()
 	 */
 	@Override
@@ -2948,7 +3262,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#sendCommand(byte, byte,
 	 * byte[])
 	 */
@@ -2965,7 +3279,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * org.eclipse.jdt.debug.core.IJavaDebugTarget#addHotCodeReplaceListener
 	 * (org.eclipse.jdt.debug.core.IJavaHotCodeReplaceListener)
@@ -2977,7 +3291,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * org.eclipse.jdt.debug.core.IJavaDebugTarget#removeHotCodeReplaceListener
 	 * (org.eclipse.jdt.debug.core.IJavaHotCodeReplaceListener)
@@ -2990,7 +3304,7 @@
 
 	/**
 	 * Returns the current hot code replace listeners.
-	 * 
+	 *
 	 * @return registered hot code replace listeners
 	 * @since 3.10
 	 */
diff --git a/org.eclipse.jdt.launching.macosx/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.jdt.launching.macosx/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d211d32..0000000
--- a/org.eclipse.jdt.launching.macosx/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.jdt.launching.ui.macosx/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.jdt.launching.ui.macosx/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d211d32..0000000
--- a/org.eclipse.jdt.launching.ui.macosx/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.jdt.launching/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.jdt.launching/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d211d32..0000000
--- a/org.eclipse.jdt.launching/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.jdt.launching/META-INF/MANIFEST.MF b/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
index 526f7f2..a5869bc 100644
--- a/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.launching; singleton:=true
-Bundle-Version: 3.8.0.qualifier
+Bundle-Version: 3.8.100.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.launching.LaunchingPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
index 32e4b96..e995b10 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2012 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -168,6 +168,9 @@
 		if (JavaCore.WARNING.equals(value)) {
 			return IMarker.SEVERITY_WARNING;
 		}
+		if (JavaCore.INFO.equals(value)) {
+			return IMarker.SEVERITY_INFO;
+		}
 		return -1;
 	}	
 	
diff --git a/org.eclipse.jdt.launching/pom.xml b/org.eclipse.jdt.launching/pom.xml
index 851299b..85b0dee 100644
--- a/org.eclipse.jdt.launching/pom.xml
+++ b/org.eclipse.jdt.launching/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright (c) 2012, 2015 Eclipse Foundation and others.
+  Copyright (c) 2012, 2016 Eclipse Foundation and others.
   All rights reserved. This program and the accompanying materials
   are made available under the terms of the Eclipse Distribution License v1.0
   which accompanies this distribution, and is available at
@@ -18,7 +18,7 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.launching</artifactId>
-  <version>3.8.0-SNAPSHOT</version>
+  <version>3.8.100-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
   
   <build>