Bug 578748 - [JUnit] "Add method/class/package to filter" from context menu of failure trace
Summary: [JUnit] "Add method/class/package to filter" from context menu of failure trace
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-02-14 14:54 EST by Dirk Steinkamp CLA
Modified: 2022-02-14 15:34 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Steinkamp CLA 2022-02-14 14:54:25 EST
I'm very fond of the filter-feature in the JUnit-UI, as it makes focusing on the origin of the error much easier by filtering out noise. Currently it's necessary to go to the JUnit-settings in the preferences-dialog to add classes/packages to the filter, which makes the usability somewhat cumbersome.

Here's a little suggestion to improve the usability: provide context menu items for each failure trace element that allows to add the selected class or package to the JUnit-filter.

Example:
- given the failure trace has an element "at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)"

- right-clicking on that element would open a context menu with menu items (or sub-menu-items) reading
  * add to stack filter
    > method invokeTestMethod
    > class TestMethodTestDescriptor
    > package org.junit.jupiter.engine.descriptor.*
    > package org.junit.jupiter.engine.*
    > package org.junit.jupiter.*
    > package org.junit.*
    > package org.*

Untangling the whole package hierarchy would be nice-to-have, but I would already be happy with the top three menu items :-).

BTW: why do I currently have to do a *double*-click with the right mouse button on a stack trace element to open the current context menu?