Skip to content

Commit 5d926a5

Browse files
gzsomboriloveeclipse
authored andcommitted
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
1 parent 489a29e commit 5d926a5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/StackFrameCategorizer.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,24 @@ public IJavaStackFrame.Category categorize(IJavaStackFrame frame) {
165165
if (isEnabled(CATEGORY_CUSTOM_FILTERED) && custom.match(refTypeName)) {
166166
return CATEGORY_CUSTOM_FILTERED;
167167
}
168+
Category category = categorizeSourceElement(frame);
169+
// if the category is prod or test, that's the most relevant.
170+
if (category == CATEGORY_PRODUCTION || category == CATEGORY_TEST) {
171+
return category;
172+
}
173+
168174
if (isEnabled(CATEGORY_SYNTHETIC) && frame.isSynthetic()) {
169175
return CATEGORY_SYNTHETIC;
170176
}
171177
if (isEnabled(CATEGORY_PLATFORM) && platform.match(refTypeName)) {
172178
return CATEGORY_PLATFORM;
173179
}
180+
// Maybe comes from a library or it's unknown.
181+
return category;
174182
} catch (DebugException de) {
175183
JDIDebugUIPlugin.log(de);
184+
return CATEGORY_UNKNOWN;
176185
}
177-
178-
return categorizeSourceElement(frame);
179186
}
180187

181188
/**

0 commit comments

Comments
 (0)