Bug 401217

Summary: [JUnit] JUnit view doesn't abbreviate package names
Product: [Eclipse Project] JDT Reporter: David Harkness <dharkness>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, markus.kell.r
Version: 4.3Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description David Harkness CLA 2013-02-19 12:26:09 EST
It would be very helpful to apply the package abbreviation/compression preferences to the JUnit view.
Comment 1 Dani Megert CLA 2013-02-20 07:55:31 EST
The view does not directly render a package like in other places, but just shows the name of the test (suite). Applying the package name compression/abbreviation could be misleading here.

Markus, I suggest to close as WONTFIX.
Comment 2 Markus Keller CLA 2013-03-05 05:26:32 EST
It's correct that test names don't have a well-defined structure. But in practice, the TestSuite constructors default to the fully-qualified type name, and our double-click/"Go to File" action also relies on that. I think we can safely assume that if a test name starts with a qualified name, it's OK to interpret it as a package name.

The implementation is in org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer.appendAbbreviatedPackageFragment(IPackageFragment) and the label provider is org.eclipse.jdt.internal.junit.ui.TestSessionLabelProvider.