@@ -100,11 +100,10 @@ public class FiltersConfigurationDialog extends TrayDialog {
100100 private ScrolledForm form ;
101101
102102 private Collection <FilterConfigurationArea > configAreas ;
103- private Label limitsLabel ;
104103
105104 private Object [] previouslyChecked = new Object [0 ];
106105 private Group configComposite ;
107- private Composite compositeLimits ;
106+ private Composite allConfigArea ;
108107
109108 /**
110109 * Create a new instance of the receiver on builder.
@@ -213,6 +212,8 @@ private void updateRadioButtonsFromTable() {
213212 boolean showAll = isShowAll ();
214213 allButton .setSelection (showAll );
215214 updateConfigComposite (!showAll );
215+ setEnabled (!showAll , configComposite );
216+ setEnabled (!showAll , allConfigArea );
216217 }
217218
218219 private void updateConfigComposite (boolean enabled ) {
@@ -224,7 +225,6 @@ private void updateConfigComposite(boolean enabled) {
224225 /** Update the enablement of limitText */
225226 private void updateLimitTextEnablement () {
226227 boolean useLimits = limitButton .getSelection ();
227- limitsLabel .setEnabled (useLimits );
228228 limitText .setEnabled (useLimits );
229229 }
230230
@@ -233,6 +233,10 @@ private void updateShowAll(boolean showAll) {
233233 updateConfigComposite (!showAll );
234234 updateLimitTextEnablement ();
235235
236+ // Disable the configurations group and limit area when showing all items
237+ setEnabled (!showAll , configComposite );
238+ setEnabled (!showAll , allConfigArea );
239+
236240 if (showAll ) {
237241 previouslyChecked = configsTable .getCheckedElements ();
238242 configsTable .setAllChecked (false );
@@ -255,39 +259,29 @@ private boolean isShowAll() {
255259 * Create the area of the dialog that apply's to all configurations.
256260 */
257261 private void createAllConfigArea (Composite parent ) {
258- compositeLimits = new Composite (parent , SWT .NONE );
259- GridLayout glCompositeLimits = new GridLayout (3 , false );
260- compositeLimits .setLayout (glCompositeLimits );
262+ allConfigArea = new Composite (parent , SWT .NONE );
263+ GridLayout layout = new GridLayout (3 , false );
264+ layout .marginHeight = 0 ;
265+ allConfigArea .setLayout (layout );
266+ allConfigArea .setLayoutData (new GridData (GridData .FILL_HORIZONTAL ));
261267
262- limitButton = new Button (compositeLimits , SWT .CHECK );
263- limitButton .setText (MarkerMessages .MarkerPreferences_MarkerLimits );
268+ limitButton = new Button (allConfigArea , SWT .CHECK );
269+ limitButton .setText (MarkerMessages .filtersDialog_limitItemsPerGroup );
264270 limitButton .addSelectionListener (new SelectionAdapter () {
265271
266272 @ Override
267273 public void widgetSelected (SelectionEvent e ) {
268274 updateLimitTextEnablement ();
269275 }
270276 });
271-
272277 GridData limitData = new GridData ();
273278 limitData .verticalIndent = 5 ;
274279 limitButton .setLayoutData (limitData );
275280
276- Composite composite = new Composite (parent , SWT .NONE );
277- GridLayout layout = new GridLayout (3 , false );
278- layout .marginWidth = 0 ;
279- layout .marginHeight = 0 ;
280- composite .setLayout (layout );
281- GridData compositeData = new GridData (GridData .FILL_HORIZONTAL );
282- compositeData .horizontalIndent = 20 ;
283- composite .setLayoutData (compositeData );
284-
285- limitsLabel = new Label (composite , SWT .NONE );
286- limitsLabel .setText (MarkerMessages .MarkerPreferences_VisibleItems );
287-
288- limitText = new Text (composite , SWT .BORDER );
281+ limitText = new Text (allConfigArea , SWT .BORDER );
289282 GridData textData = new GridData ();
290283 textData .widthHint = convertWidthInCharsToPixels (10 );
284+ textData .verticalIndent = 5 ;
291285 limitText .setLayoutData (textData );
292286 limitText .addVerifyListener (e -> {
293287 if (e .character != 0 && e .keyCode != SWT .BS
@@ -312,7 +306,7 @@ public void widgetSelected(SelectionEvent e) {
312306 }
313307 });
314308
315- Composite defaultButtonComposite = new Composite (composite , SWT .NONE );
309+ Composite defaultButtonComposite = new Composite (allConfigArea , SWT .NONE );
316310 GridLayout defaultButtonLayout = new GridLayout (1 , false );
317311 defaultButtonComposite .setLayout (defaultButtonLayout );
318312 GridData defaultButtonCompositeData = new GridData (SWT .END , SWT .END , true , false );
@@ -414,10 +408,16 @@ private void createConfigDesc(Composite parent) {
414408
415409 configAreas = generator .createFilterConfigurationFields ();
416410
411+ // Scope and severity/description are always expanded (most used)
417412 createFieldArea (toolkit , form , scopeArea , true );
418413 Iterator <FilterConfigurationArea > areas = configAreas .iterator ();
414+ boolean isFirst = true ;
419415 while (areas .hasNext ()) {
420- createFieldArea (toolkit , form , areas .next (), true );
416+ FilterConfigurationArea area = areas .next ();
417+ // First config area (severity/description) is always expanded,
418+ // subsequent areas (types) start collapsed to reduce clutter
419+ createFieldArea (toolkit , form , area , isFirst );
420+ isFirst = false ;
421421 }
422422 }
423423
0 commit comments