From 7e04a88cf9fa221f3de73318c63d2b0d42c842ea Mon Sep 17 00:00:00 2001 From: Zsombor Gegesy Date: Fri, 4 Apr 2025 00:46:41 +0200 Subject: [PATCH] Change the priority of the categorization * if marked with custom * if we have the source file - a test/prod code * platform code * synthetic methods * library code * unknown --- .../jdt/internal/debug/ui/StackFrameCategorizer.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/StackFrameCategorizer.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/StackFrameCategorizer.java index 64ceab8c92..3bad077417 100644 --- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/StackFrameCategorizer.java +++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/StackFrameCategorizer.java @@ -165,17 +165,24 @@ public IJavaStackFrame.Category categorize(IJavaStackFrame frame) { if (isEnabled(CATEGORY_CUSTOM_FILTERED) && custom.match(refTypeName)) { return CATEGORY_CUSTOM_FILTERED; } + Category category = categorizeSourceElement(frame); + // if the category is prod or test, that's the most relevant. + if (category == CATEGORY_PRODUCTION || category == CATEGORY_TEST) { + return category; + } + if (isEnabled(CATEGORY_SYNTHETIC) && frame.isSynthetic()) { return CATEGORY_SYNTHETIC; } if (isEnabled(CATEGORY_PLATFORM) && platform.match(refTypeName)) { return CATEGORY_PLATFORM; } + // Maybe comes from a library or it's unknown. + return category; } catch (DebugException de) { JDIDebugUIPlugin.log(de); + return CATEGORY_UNKNOWN; } - - return categorizeSourceElement(frame); } /**