@@ -98,11 +98,10 @@ public class FiltersConfigurationDialog extends TrayDialog {
9898 private ScrolledForm form ;
9999
100100 private Collection <FilterConfigurationArea > configAreas ;
101- private Label limitsLabel ;
102101
103102 private Object [] previouslyChecked = new Object [0 ];
104103 private Group configComposite ;
105- private Composite compositeLimits ;
104+ private Composite allConfigArea ;
106105
107106 /**
108107 * Create a new instance of the receiver on builder.
@@ -201,6 +200,8 @@ private void updateRadioButtonsFromTable() {
201200 boolean showAll = isShowAll ();
202201 allButton .setSelection (showAll );
203202 updateConfigComposite (!showAll );
203+ setEnabled (!showAll , configComposite );
204+ setEnabled (!showAll , allConfigArea );
204205 }
205206
206207 private void updateConfigComposite (boolean enabled ) {
@@ -212,7 +213,6 @@ private void updateConfigComposite(boolean enabled) {
212213 /** Update the enablement of limitText */
213214 private void updateLimitTextEnablement () {
214215 boolean useLimits = limitButton .getSelection ();
215- limitsLabel .setEnabled (useLimits );
216216 limitText .setEnabled (useLimits );
217217 }
218218
@@ -221,6 +221,10 @@ private void updateShowAll(boolean showAll) {
221221 updateConfigComposite (!showAll );
222222 updateLimitTextEnablement ();
223223
224+ // Disable the configurations group and limit area when showing all items
225+ setEnabled (!showAll , configComposite );
226+ setEnabled (!showAll , allConfigArea );
227+
224228 if (showAll ) {
225229 previouslyChecked = configsTable .getCheckedElements ();
226230 configsTable .setAllChecked (false );
@@ -243,39 +247,29 @@ private boolean isShowAll() {
243247 * Create the area of the dialog that apply's to all configurations.
244248 */
245249 private void createAllConfigArea (Composite parent ) {
246- compositeLimits = new Composite (parent , SWT .NONE );
247- GridLayout glCompositeLimits = new GridLayout (3 , false );
248- compositeLimits .setLayout (glCompositeLimits );
250+ allConfigArea = new Composite (parent , SWT .NONE );
251+ GridLayout layout = new GridLayout (3 , false );
252+ layout .marginHeight = 0 ;
253+ allConfigArea .setLayout (layout );
254+ allConfigArea .setLayoutData (new GridData (GridData .FILL_HORIZONTAL ));
249255
250- limitButton = new Button (compositeLimits , SWT .CHECK );
251- limitButton .setText (MarkerMessages .MarkerPreferences_MarkerLimits );
256+ limitButton = new Button (allConfigArea , SWT .CHECK );
257+ limitButton .setText (MarkerMessages .filtersDialog_limitItemsPerGroup );
252258 limitButton .addSelectionListener (new SelectionAdapter () {
253259
254260 @ Override
255261 public void widgetSelected (SelectionEvent e ) {
256262 updateLimitTextEnablement ();
257263 }
258264 });
259-
260265 GridData limitData = new GridData ();
261266 limitData .verticalIndent = 5 ;
262267 limitButton .setLayoutData (limitData );
263268
264- Composite composite = new Composite (parent , SWT .NONE );
265- GridLayout layout = new GridLayout (3 , false );
266- layout .marginWidth = 0 ;
267- layout .marginHeight = 0 ;
268- composite .setLayout (layout );
269- GridData compositeData = new GridData (GridData .FILL_HORIZONTAL );
270- compositeData .horizontalIndent = 20 ;
271- composite .setLayoutData (compositeData );
272-
273- limitsLabel = new Label (composite , SWT .NONE );
274- limitsLabel .setText (MarkerMessages .MarkerPreferences_VisibleItems );
275-
276- limitText = new Text (composite , SWT .BORDER );
269+ limitText = new Text (allConfigArea , SWT .BORDER );
277270 GridData textData = new GridData ();
278271 textData .widthHint = convertWidthInCharsToPixels (10 );
272+ textData .verticalIndent = 5 ;
279273 limitText .setLayoutData (textData );
280274 limitText .addVerifyListener (e -> {
281275 if (e .character != 0 && e .keyCode != SWT .BS
@@ -300,7 +294,7 @@ public void widgetSelected(SelectionEvent e) {
300294 }
301295 });
302296
303- Composite defaultButtonComposite = new Composite (composite , SWT .NONE );
297+ Composite defaultButtonComposite = new Composite (allConfigArea , SWT .NONE );
304298 GridLayout defaultButtonLayout = new GridLayout (1 , false );
305299 defaultButtonComposite .setLayout (defaultButtonLayout );
306300 GridData defaultButtonCompositeData = new GridData (SWT .END , SWT .END , true , false );
@@ -402,10 +396,16 @@ private void createConfigDesc(Composite parent) {
402396
403397 configAreas = generator .createFilterConfigurationFields ();
404398
399+ // Scope and severity/description are always expanded (most used)
405400 createFieldArea (toolkit , form , scopeArea , true );
406401 Iterator <FilterConfigurationArea > areas = configAreas .iterator ();
402+ boolean isFirst = true ;
407403 while (areas .hasNext ()) {
408- createFieldArea (toolkit , form , areas .next (), true );
404+ FilterConfigurationArea area = areas .next ();
405+ // First config area (severity/description) is always expanded,
406+ // subsequent areas (types) start collapsed to reduce clutter
407+ createFieldArea (toolkit , form , area , isFirst );
408+ isFirst = false ;
409409 }
410410 }
411411
0 commit comments