Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 9525

Summary: junit pref page: filters ui should look like debug step filter ui [JUnit]
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P4 Keywords: helpwanted
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
fix
none
showing the new preference page none

Description Adam Kiezun CLA 2002-02-13 05:01:36 EST
junit pref page: filters ui should look like debug step filter ui

it should use checkbox table with package icons
and offer:
'add filter'
'add type'
'add package'
'remove'
Comment 1 Erich Gamma CLA 2002-04-14 10:06:29 EDT
defer
Comment 2 Sebastian Davids CLA 2002-12-08 10:15:45 EST
Created attachment 2706 [details]
fix

Implementation notes:

@@ JUnitPreferencePage @@

I completely rewrote JUnitPreferencePage by copying
JavaStepFilterPreferencePage.

Then inlining Filter, FilterViewerSorter, StackFilterContentProvider,
FilterLabelProvider and serializeList(String[])/parseList(String) from
JavaDebugOptionsManager.

I placed the preference relevant constants into a new interface named
IJUnitPreferenceConstants.

I adjusted FilterLabelProvider so that only classes in the default package or
in a fully-qualified package are labeled w/ the C-icon; other filters (e.g.
method filters) will not show an icon.

FailureTraceView (notes s.b.) has a more clever filter mechanism now; i.e. one
can actually use a classes name to _only_ filter that class not all classes
starting w/ the class name (refers to Assert/AssertionFailure etc.).

The filteres are stored differently in the preference store now (previously one
key/value-pair for each filter) -- a comma-seperated String for the active and
inactive filters each is stored (consistent w/ JavaStepFilterPreferencePage).

@@ IJUnitPreferenceConstants @@

The keys for the different properties have been adjusted so they use the same
pattern as Debug.

@@ FailureTraceView @@

- packages have a trailing .* -> need to strip the *
- fully qualified classes start w/ a uppercase letter after a .
- first char of pattern upper case -> class in default package

"Exotic" classes starting w/ a lowercase letter cannot be filtered because it
would clash w/ a method-name-filter or a subexpression-filter.

@@ JUnitPlugin @@

Placed createAllPackagesDialog(Shell, IJavaProject[], boolean) here for
consistency w/ JDIDebugUIPlugin.
Comment 3 Sebastian Davids CLA 2002-12-08 10:16:14 EST
Created attachment 2707 [details]
showing the new preference page
Comment 4 Erich Gamma CLA 2002-12-14 17:25:27 EST
thought having this kind of UI is an overkill for this particular case, but it 
is a nice fix and good improvement.
applied patch