directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r607241 - in /directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor: controller/ProblemsViewController.java view/views/ProblemsViewContentProvider.java
Date Fri, 28 Dec 2007 13:37:58 GMT
Author: pamarcelot
Date: Fri Dec 28 05:37:56 2007
New Revision: 607241

URL: http://svn.apache.org/viewvc?rev=607241&view=rev
Log:
o Fixed a bug that was causing a ConcurrentModificationException.
o Removed an unnecessary reload of the TreeViewer (the reload was done twice because the class
is already notified by the SchemaChecker to reload the TreeViewer).

Modified:
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java?rev=607241&r1=607240&r2=607241&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java
Fri Dec 28 05:37:56 2007
@@ -82,13 +82,11 @@
             if ( oldProject != null )
             {
                 removeSchemaCheckerListener( oldProject );
-
             }
 
             if ( newProject != null )
             {
                 addSchemaCheckerListener( newProject );
-                view.reloadViewer();
             }
             else
             {

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java?rev=607241&r1=607240&r2=607241&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewContentProvider.java
Fri Dec 28 05:37:56 2007
@@ -99,8 +99,8 @@
 
                 if ( schemaChecker != null )
                 {
-                    List<SchemaError> errors = schemaChecker.getErrors();
-                    if ( !errors.isEmpty() )
+                    SchemaError[] errors = schemaChecker.getErrors().toArray( new SchemaError[0]
);
+                    if ( !( errors.length == 0 ) )
                     {
                         Folder errorsFolder = new Folder( FolderType.ERROR, root );
                         root.addChild( errorsFolder );
@@ -110,8 +110,8 @@
                         }
                     }
 
-                    List<SchemaWarning> warnings = schemaChecker.getWarnings();
-                    if ( !warnings.isEmpty() )
+                    SchemaWarning[] warnings = schemaChecker.getWarnings().toArray( new SchemaWarning[0]
);
+                    if ( !( warnings.length == 0 ) )
                     {
                         Folder warningsFolder = new Folder( FolderType.WARNING, root );
                         root.addChild( warningsFolder );



Mime
View raw message