Bug 519926 - Allow custom debugger decide on filtering

Change-Id: Ic892144158a6165593c5823bb0cc51b03c087885
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
index 1a0337c..f2572fd 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
@@ -2714,9 +2714,7 @@
 
 			if (applyStepFilters() && isStepFiltersEnabled()) {
 				Location currentLocation = getOriginalStepLocation();
-				if (currentLocation == null
-						|| !JAVA_STRATUM_CONSTANT.equals(currentLocation
-								.declaringType().defaultStratum())) {
+				if (!isSupported(currentLocation)) {
 					return;
 				}
 				// Removed the fix for bug 5587, to address bug 41510
@@ -3734,4 +3732,11 @@
 		return Platform.getPreferencesService().getBoolean(JDIDebugPlugin.getUniqueIdentifier(), JDIDebugModel.PREF_SHOW_STEP_RESULT, true, null);
 	}
 
+	protected boolean isSupported(Location currentLocation) {
+		if (currentLocation == null) {
+			return false;
+		}
+		return JAVA_STRATUM_CONSTANT.equals(currentLocation.declaringType().defaultStratum());
+	}
+
 }
\ No newline at end of file