directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r561743 - /directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/ProblemsView.java
Date Wed, 01 Aug 2007 09:37:24 GMT
Author: pamarcelot
Date: Wed Aug  1 02:37:20 2007
New Revision: 561743

URL: http://svn.apache.org/viewvc?view=rev&rev=561743
Log:
Improved errors and warnings reporting in the Problems View.

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/ProblemsView.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/ProblemsView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/ProblemsView.java?view=diff&rev=561743&r1=561742&r2=561743
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/ProblemsView.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/ProblemsView.java
Wed Aug  1 02:37:20 2007
@@ -167,7 +167,33 @@
      */
     public void setErrorsAndWarningsCount( int errors, int warnings )
     {
-        overviewLabel.setText( String.format( "%d error(s), %d warning(s)", errors, warnings
) );
+        StringBuffer sb = new StringBuffer();
+
+        sb.append( errors );
+        sb.append( " " );
+        if ( errors > 0 )
+        {
+            sb.append( "errors" );
+        }
+        else
+        {
+            sb.append( "error" );
+        }
+
+        sb.append( ", " );
+
+        sb.append( warnings );
+        sb.append( " " );
+        if ( warnings > 0 )
+        {
+            sb.append( "warnings" );
+        }
+        else
+        {
+            sb.append( "warning" );
+        }
+
+        overviewLabel.setText( sb.toString() );
     }
 
 }



Mime
View raw message