|
From: <caw...@us...> - 2007-03-26 13:21:49
|
Revision: 2223
http://svn.sourceforge.net/rubyeclipse/?rev=2223&view=rev
Author: cawilliams
Date: 2007-03-26 06:08:04 -0700 (Mon, 26 Mar 2007)
Log Message:
-----------
Don't show a category if it is empty (has no error/warning marker options)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java 2007-03-26 12:37:45 UTC (rev 2222)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java 2007-03-26 13:08:04 UTC (rev 2223)
@@ -206,14 +206,15 @@
Composite inner;
Map<String, String> categories = getErrorCategories();
- for (String categoryId : categories.keySet()) {
+ for (String categoryId : categories.keySet()) {
+ List<Error> errors = getErrors(categoryId);
+ if (errors == null || errors.isEmpty()) continue;
excomposite= createStyleSection(composite, categories.get(categoryId), nColumns);
inner= new Composite(excomposite, SWT.NONE);
inner.setFont(composite.getFont());
inner.setLayout(new GridLayout(nColumns, false));
excomposite.setClient(inner);
- List<Error> errors = getErrors(categoryId);
for (Error error : errors) {
addComboBox(inner, error.label + ':', getKey(error.getContributor(), error.getId()), errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
if (error.hasArgument()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|