Bug 401217 - [JUnit] JUnit view doesn't abbreviate package names
Summary: [JUnit] JUnit view doesn't abbreviate package names
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2013-02-19 12:26 EST by David Harkness CLA
Modified: 2013-03-05 05:26 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.