directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r559116 - in /directory/studio/trunk/studio-apacheds-schemaeditor: plugin.xml src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/SchemaEditorSchemaCheckerLabelDecorator.java
Date Tue, 24 Jul 2007 17:18:12 GMT
Author: pamarcelot
Date: Tue Jul 24 10:18:11 2007
New Revision: 559116

URL: http://svn.apache.org/viewvc?view=rev&rev=559116
Log:
Added the SchemaWrapper in the SchemaEditorSchemaCheckerLabelDecorator.

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/SchemaEditorSchemaCheckerLabelDecorator.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml?view=diff&rev=559116&r1=559115&r2=559116
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml Tue Jul 24 10:18:11 2007
@@ -225,6 +225,9 @@
                 <objectClass
                       name="org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.ObjectClassWrapper">
                 </objectClass>
+                <objectClass
+                      name="org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.SchemaWrapper">
+                </objectClass>
              </or>
           </enablement>
           <description>

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/SchemaEditorSchemaCheckerLabelDecorator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/SchemaEditorSchemaCheckerLabelDecorator.java?view=diff&rev=559116&r1=559115&r2=559116
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/SchemaEditorSchemaCheckerLabelDecorator.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/SchemaEditorSchemaCheckerLabelDecorator.java
Tue Jul 24 10:18:11 2007
@@ -24,9 +24,11 @@
 import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants;
 import org.apache.directory.studio.apacheds.schemaeditor.model.AttributeTypeImpl;
 import org.apache.directory.studio.apacheds.schemaeditor.model.ObjectClassImpl;
+import org.apache.directory.studio.apacheds.schemaeditor.model.Schema;
 import org.apache.directory.studio.apacheds.schemaeditor.model.schemachecker.SchemaChecker;
 import org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.AttributeTypeWrapper;
 import org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.ObjectClassWrapper;
+import org.apache.directory.studio.apacheds.schemaeditor.view.wrappers.SchemaWrapper;
 import org.eclipse.jface.viewers.IDecoration;
 import org.eclipse.jface.viewers.ILightweightLabelDecorator;
 import org.eclipse.jface.viewers.LabelProvider;
@@ -81,6 +83,42 @@
             {
                 decoration.addOverlay( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
                     PluginConstants.IMG_OVERLAY_WARNING ), IDecoration.BOTTOM_LEFT );
+            }
+        }
+        else if ( element instanceof SchemaWrapper )
+        {
+            Schema schema = ( ( SchemaWrapper ) element ).getSchema();
+
+            for ( AttributeTypeImpl at : schema.getAttributeTypes() )
+            {
+                if ( schemaChecker.hasErrors( at ) )
+                {
+                    decoration.addOverlay( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+                        PluginConstants.IMG_OVERLAY_ERROR ), IDecoration.BOTTOM_LEFT );
+                    return;
+                }
+
+                if ( schemaChecker.hasWarnings( at ) )
+                {
+                    decoration.addOverlay( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+                        PluginConstants.IMG_OVERLAY_WARNING ), IDecoration.BOTTOM_LEFT );
+                }
+            }
+
+            for ( ObjectClassImpl oc : schema.getObjectClasses() )
+            {
+                if ( schemaChecker.hasErrors( oc ) )
+                {
+                    decoration.addOverlay( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+                        PluginConstants.IMG_OVERLAY_ERROR ), IDecoration.BOTTOM_LEFT );
+                    return;
+                }
+
+                if ( schemaChecker.hasWarnings( oc ) )
+                {
+                    decoration.addOverlay( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+                        PluginConstants.IMG_OVERLAY_WARNING ), IDecoration.BOTTOM_LEFT );
+                }
             }
         }
     }



Mime
View raw message