Bug 546882 - [JUnit] Provide customization for JUnit View double click on test entry
Summary: [JUnit] Provide customization for JUnit View double click on test entry
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.12   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-01 02:35 EDT by Simeon Andreev CLA
Modified: 2019-05-02 04:13 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Andreev CLA 2019-05-01 02:35:05 EDT
Clients which customize the JUnit view currently cannot change the behaviour of test entry double-click. The usual action to navigate to a passing/failing test is to double click on the respective test entry in the JUnit view; so JUnit view customization is very limited.

E.g. the xpect project contributes to the pop-up menu of the JDT JUnit view as follows:

   <extension point="org.eclipse.ui.popupMenus">
        <viewerContribution
                        id="org.eclipse.xpect.ui.junit.gotoXpectMethod"
                        targetID="org.eclipse.jdt.junit.ResultView">
                <action
                        class="org.eclipse.xpect.ui.junit.GotoXpectMethodAction"
                id="org.eclipse.xpect.ui.junit.gotoXpectMethod"
                label="Go to XPECT method"
                menubarPath="org.eclipse.jdt.junit.ResultView"/>
      </viewerContribution>
   </extension>

The user can then right click on a passing/failing test and use the extra entry to navigate to the test. Instead, a simple double-click should suffice. Ideally the double-click action can be customized with a contribution from a plugin.xml.
Comment 1 Simeon Andreev CLA 2019-05-01 03:00:32 EDT
Note that due to the nature of the xpect contribution, it is seen also in normal JUnit Java tests. This is not great; maybe we should try to improve this as well.

The source code of the xpect project is found here:

https://github.com/eclipse/Xpect

Its purpose is to allow testing xtext based DSL.
Comment 2 Simeon Andreev CLA 2019-05-01 04:11:20 EDT
Seems like a lot of infrastructure is missing in order to do this task. So I think this is either a duplicate of bug 391023 or is blocked by this bug.

Here is the experimental work done for bug 391023 by Moritz Eysholdt:

https://github.com/meysholdt/eclipse_jdt_junit_runners