directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r521798 - in /directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main: java/org/apache/directory/ldapstudio/schemas/model/ java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ resources/org/apache/directory/ldapstu...
Date Fri, 23 Mar 2007 16:29:53 GMT
Author: pamarcelot
Date: Fri Mar 23 09:29:51 2007
New Revision: 521798

URL: http://svn.apache.org/viewvc?view=rev&rev=521798
Log:
Improved Equality, Ordering and Substring Matching Rule Selection in the Attribute Type Editor.

Added:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEEqualityComboContentProvider.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboComparator.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboInput.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboLabelProvider.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEOrderingComboContentProvider.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATESubstringComboContentProvider.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingMatchingRule.java
Modified:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/MatchingRules.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorOverviewPage.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingAttributeType.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/messages.properties

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/MatchingRules.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/MatchingRules.java?view=diff&rev=521798&r1=521797&r2=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/MatchingRules.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/MatchingRules.java Fri Mar 23 09:29:51 2007
@@ -34,13 +34,21 @@
  * This class allows to get the list of all matching rules
  * (which is initialized once parsing a XML file)
  * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class MatchingRules
 {
+    /** The Equality Matching Rules */
     private static final ArrayList<MatchingRule> equalityMatchingRules;
+
+    /** The Ordering Matching Rules */
     private static final ArrayList<MatchingRule> orderingMatchingRules;
+
+    /** The Substring Matching Rules */
     private static final ArrayList<MatchingRule> substringMatchingRules;
 
+    // Equality Matching Rules Initialization
     static
     {
         try
@@ -72,6 +80,7 @@
         }
     }
 
+    // Ordering Matching Rules Initialization
     static
     {
         try
@@ -104,6 +113,7 @@
         }
     }
 
+    // Substring Matching Rules Initialization
     static
     {
         try
@@ -137,8 +147,9 @@
 
 
     /**
-     * Return the unique initialized ArrayList containing all Equality Matching Rules
-     * @return the Equality Matching Rules ArrayList
+     * Returns the unique initialized ArrayList containing all Equality Matching Rules.
+     * @return
+     *      the Equality Matching Rules ArrayList
      */
     public static ArrayList<MatchingRule> getEqualityMatchingRules()
     {
@@ -147,8 +158,10 @@
 
 
     /**
-     * Return the unique initialized ArrayList containing all Ordering Matching Rules
-     * @return the Ordering Matching Rules ArrayList
+     * Returns the unique initialized ArrayList containing all Ordering Matching Rules.
+     * 
+     * @return
+     *      the Ordering Matching Rules ArrayList
      */
     public static ArrayList<MatchingRule> getOrderingMatchingRules()
     {
@@ -157,11 +170,56 @@
 
 
     /**
-     * Return the unique initialized ArrayList containing all Substring Matching Rules
-     * @return the Substring Matching Rules ArrayList
+     * Returns the unique initialized ArrayList containing all Substring Matching Rules.
+     * 
+     * @return
+     *      the Substring Matching Rules ArrayList
      */
     public static ArrayList<MatchingRule> getSubstringMatchingRules()
     {
         return substringMatchingRules;
+    }
+
+
+    /**
+     * Gets a Matching Rule from a given name.
+     *
+     * @param name
+     *      the name of the Matching Rule
+     * @return
+     *      the corresponding Matching Rule
+     */
+    public static MatchingRule getMatchingRule( String name )
+    {
+        if ( name == null )
+        {
+            return null;
+        }
+
+        for ( MatchingRule matchingRule : equalityMatchingRules )
+        {
+            if ( name.equalsIgnoreCase( matchingRule.getName() ) )
+            {
+                return matchingRule;
+            }
+        }
+
+        for ( MatchingRule matchingRule : orderingMatchingRules )
+        {
+            if ( name.equalsIgnoreCase( matchingRule.getName() ) )
+            {
+                return matchingRule;
+            }
+        }
+
+        for ( MatchingRule matchingRule : substringMatchingRules )
+        {
+            if ( name.equalsIgnoreCase( matchingRule.getName() ) )
+            {
+                return matchingRule;
+            }
+        }
+
+        return null;
     }
 }

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEEqualityComboContentProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEEqualityComboContentProvider.java?view=auto&rev=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEEqualityComboContentProvider.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEEqualityComboContentProvider.java Fri Mar 23 09:29:51 2007
@@ -0,0 +1,90 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.ldapstudio.schemas.view.editors.attributeType;
+
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.directory.ldapstudio.schemas.model.MatchingRule;
+import org.apache.directory.ldapstudio.schemas.model.MatchingRules;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+
+/**
+ * This class implements the Content Provider for the Equality Combo of the Attribute Type Editor.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATEEqualityComboContentProvider implements IStructuredContentProvider
+{
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+     */
+    public Object[] getElements( Object inputElement )
+    {
+        if ( inputElement instanceof ATEMatchingRulesComboInput )
+        {
+            ATEMatchingRulesComboInput input = ( ATEMatchingRulesComboInput ) inputElement;
+
+            if ( input.getChildren().isEmpty() )
+            {
+                // Creating the '(None)' item
+                input.addChild( new NonExistingMatchingRule( NonExistingMatchingRule.NONE ) );
+
+                // Creating Children
+                List<MatchingRule> equalityMatchingRules = MatchingRules.getEqualityMatchingRules();
+                for ( MatchingRule matchingRule : equalityMatchingRules )
+                {
+                    input.addChild( matchingRule );
+                }
+            }
+
+            // Getting Children
+            List<Object> children = input.getChildren();
+
+            // Sorting Children
+            Collections.sort( children, new ATEMatchingRulesComboComparator() );
+
+            return children.toArray();
+        }
+
+        // Default
+        return new Object[0];
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+     */
+    public void dispose()
+    {
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+     */
+    public void inputChanged( Viewer viewer, Object oldInput, Object newInput )
+    {
+    }
+}

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboComparator.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboComparator.java?view=auto&rev=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboComparator.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboComparator.java Fri Mar 23 09:29:51 2007
@@ -0,0 +1,61 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.ldapstudio.schemas.view.editors.attributeType;
+
+
+import java.util.Comparator;
+
+import org.apache.directory.ldapstudio.schemas.model.MatchingRule;
+
+
+/**
+ * This class implements the Comparator used to compare elements in the Matching Rules Content Providers.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATEMatchingRulesComboComparator implements Comparator<Object>
+{
+    /* (non-Javadoc)
+     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+     */
+    public int compare( Object o1, Object o2 )
+    {
+        if ( o1 instanceof MatchingRule && o2 instanceof MatchingRule )
+        {
+            return ( ( MatchingRule ) o1 ).getName().compareToIgnoreCase( ( ( MatchingRule ) o2 ).getName() );
+        }
+        else if ( o1 instanceof MatchingRule && o2 instanceof NonExistingMatchingRule )
+        {
+            return ( ( MatchingRule ) o1 ).getName().compareToIgnoreCase( ( ( NonExistingMatchingRule ) o2 ).getName() );
+        }
+        else if ( o1 instanceof NonExistingMatchingRule && o2 instanceof MatchingRule )
+        {
+            return ( ( NonExistingMatchingRule ) o1 ).getName().compareToIgnoreCase( ( ( MatchingRule ) o2 ).getName() );
+        }
+        else if ( o1 instanceof NonExistingMatchingRule && o2 instanceof NonExistingMatchingRule )
+        {
+            return ( ( NonExistingMatchingRule ) o1 ).getName().compareToIgnoreCase(
+                ( ( NonExistingMatchingRule ) o2 ).getName() );
+        }
+
+        return 0;
+    }
+}

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboInput.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboInput.java?view=auto&rev=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboInput.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboInput.java Fri Mar 23 09:29:51 2007
@@ -0,0 +1,70 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.ldapstudio.schemas.view.editors.attributeType;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * This class implements the Input of the Matching Rules Combo of the Attribute Type Editor
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATEMatchingRulesComboInput
+{
+    /** The children */
+    private List<Object> children;
+
+    /**
+     * Adds a child.
+     *
+     * @param child
+     *      the child to add
+     */
+    public void addChild( Object child )
+    {
+        if ( children == null )
+        {
+            children = new ArrayList<Object>();
+        }
+
+        children.add( child );
+    }
+
+
+    /**
+     * Gets the children.
+     *
+     * @return
+     *      the children
+     */
+    public List<Object> getChildren()
+    {
+        if ( children == null )
+        {
+            children = new ArrayList<Object>();
+        }
+
+        return children;
+    }
+}

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboLabelProvider.java?view=auto&rev=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboLabelProvider.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEMatchingRulesComboLabelProvider.java Fri Mar 23 09:29:51 2007
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.ldapstudio.schemas.view.editors.attributeType;
+
+
+import org.apache.directory.ldapstudio.schemas.model.MatchingRule;
+import org.eclipse.jface.viewers.LabelProvider;
+
+
+/**
+ * This class implements the Label Provider of the Matching Rules Combo of the Attribute Type Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATEMatchingRulesComboLabelProvider extends LabelProvider
+{
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+     */
+    public String getText( Object obj )
+    {
+        if ( obj instanceof MatchingRule )
+        {
+            return ( ( MatchingRule ) obj ).getName();
+        }
+        else if ( obj instanceof NonExistingMatchingRule )
+        {
+            return ( ( NonExistingMatchingRule ) obj ).getDisplayName();
+        }
+
+        // Default
+        return null;
+    }
+}

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEOrderingComboContentProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEOrderingComboContentProvider.java?view=auto&rev=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEOrderingComboContentProvider.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEOrderingComboContentProvider.java Fri Mar 23 09:29:51 2007
@@ -0,0 +1,90 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.ldapstudio.schemas.view.editors.attributeType;
+
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.directory.ldapstudio.schemas.model.MatchingRule;
+import org.apache.directory.ldapstudio.schemas.model.MatchingRules;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+
+/**
+ * This class implements the Content Provider for the Ordering Combo of the Attribute Type Editor.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATEOrderingComboContentProvider implements IStructuredContentProvider
+{
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+     */
+    public Object[] getElements( Object inputElement )
+    {
+        if ( inputElement instanceof ATEMatchingRulesComboInput )
+        {
+            ATEMatchingRulesComboInput input = ( ATEMatchingRulesComboInput ) inputElement;
+
+            if ( input.getChildren().isEmpty() )
+            {
+                // Creating the '(None)' item
+                input.addChild( new NonExistingMatchingRule( NonExistingMatchingRule.NONE ) );
+
+                // Creating Children
+                List<MatchingRule> orderingMatchingRules = MatchingRules.getOrderingMatchingRules();
+                for ( MatchingRule orderingMatchingRule : orderingMatchingRules )
+                {
+                    input.addChild( orderingMatchingRule );
+                }
+            }
+
+            // Getting Children
+            List<Object> children = input.getChildren();
+
+            // Sorting Children
+            Collections.sort( children, new ATEMatchingRulesComboComparator() );
+
+            return children.toArray();
+        }
+
+        // Default
+        return new Object[0];
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+     */
+    public void dispose()
+    {
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+     */
+    public void inputChanged( Viewer viewer, Object oldInput, Object newInput )
+    {
+    }
+}

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATESubstringComboContentProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATESubstringComboContentProvider.java?view=auto&rev=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATESubstringComboContentProvider.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATESubstringComboContentProvider.java Fri Mar 23 09:29:51 2007
@@ -0,0 +1,90 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.ldapstudio.schemas.view.editors.attributeType;
+
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.directory.ldapstudio.schemas.model.MatchingRule;
+import org.apache.directory.ldapstudio.schemas.model.MatchingRules;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+
+/**
+ * This class implements the Content Provider for the Substring Combo of the Attribute Type Editor.
+ *  
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATESubstringComboContentProvider implements IStructuredContentProvider
+{
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+     */
+    public Object[] getElements( Object inputElement )
+    {
+        if ( inputElement instanceof ATEMatchingRulesComboInput )
+        {
+            ATEMatchingRulesComboInput input = ( ATEMatchingRulesComboInput ) inputElement;
+
+            if ( input.getChildren().isEmpty() )
+            {
+                // Creating the '(None)' item
+                input.addChild( new NonExistingMatchingRule( NonExistingMatchingRule.NONE ) );
+
+                // Creating Children
+                List<MatchingRule> substringMatchingRules = MatchingRules.getSubstringMatchingRules();
+                for ( MatchingRule substringMatchingRule : substringMatchingRules )
+                {
+                    input.addChild( substringMatchingRule );
+                }
+            }
+
+            // Getting Children
+            List<Object> children = input.getChildren();
+
+            // Sorting Children
+            Collections.sort( children, new ATEMatchingRulesComboComparator() );
+
+            return children.toArray();
+        }
+
+        // Default
+        return new Object[0];
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+     */
+    public void dispose()
+    {
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+     */
+    public void inputChanged( Viewer viewer, Object oldInput, Object newInput )
+    {
+    }
+}

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorOverviewPage.java?view=diff&rev=521798&r1=521797&r2=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorOverviewPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorOverviewPage.java Fri Mar 23 09:29:51 2007
@@ -109,8 +109,11 @@
     private Button collectiveCheckbox;
     private Button noUserModificationCheckbox;
     private Combo equalityCombo;
+    private ComboViewer equalityComboViewer;
     private Combo orderingCombo;
+    private ComboViewer orderingComboViewer;
     private Combo substringCombo;
+    private ComboViewer substringComboViewer;
 
     // Listeners
     /** The listener for the Manage Aliases Button Widget */
@@ -152,8 +155,7 @@
 
             if ( OID.isOID( oid ) )
             {
-                if ( ( originalAttributeType.getOid().equals( oid ) )
-                    || !( schemaPool.containsSchemaElement( oid ) ) )
+                if ( ( originalAttributeType.getOid().equals( oid ) ) || !( schemaPool.containsSchemaElement( oid ) ) )
                 {
                     modifiedAttributeType.setOid( oid );
                     setEditorDirty();
@@ -385,13 +387,24 @@
     {
         public void modifyText( ModifyEvent e )
         {
-            if ( equalityCombo.getItem( equalityCombo.getSelectionIndex() ).equals(
-                Messages.getString( "AttributeTypeFormEditorOverviewPage.(None)" ) ) ) { //$NON-NLS-1$
-                modifiedAttributeType.setEquality( "" ); //$NON-NLS-1$
+            Object selectedItem = ( ( StructuredSelection ) equalityComboViewer.getSelection() ).getFirstElement();
+
+            if ( selectedItem instanceof MatchingRule )
+            {
+                modifiedAttributeType.setEquality( ( ( MatchingRule ) selectedItem ).getName() );
             }
-            else
+            else if ( selectedItem instanceof NonExistingMatchingRule )
             {
-                modifiedAttributeType.setEquality( equalityCombo.getItem( equalityCombo.getSelectionIndex() ) );
+                NonExistingMatchingRule nemr = ( NonExistingMatchingRule ) selectedItem;
+
+                if ( NonExistingMatchingRule.NONE.equals( nemr.getName() ) )
+                {
+                    modifiedAttributeType.setEquality( null );
+                }
+                else
+                {
+                    modifiedAttributeType.setEquality( ( ( NonExistingMatchingRule ) selectedItem ).getName() );
+                }
             }
             setEditorDirty();
         }
@@ -402,13 +415,24 @@
     {
         public void modifyText( ModifyEvent e )
         {
-            if ( orderingCombo.getItem( orderingCombo.getSelectionIndex() ).equals(
-                Messages.getString( "AttributeTypeFormEditorOverviewPage.(None)" ) ) ) { //$NON-NLS-1$
-                modifiedAttributeType.setOrdering( "" ); //$NON-NLS-1$
+            Object selectedItem = ( ( StructuredSelection ) orderingComboViewer.getSelection() ).getFirstElement();
+
+            if ( selectedItem instanceof MatchingRule )
+            {
+                modifiedAttributeType.setOrdering( ( ( MatchingRule ) selectedItem ).getName() );
             }
-            else
+            else if ( selectedItem instanceof NonExistingMatchingRule )
             {
-                modifiedAttributeType.setOrdering( orderingCombo.getItem( orderingCombo.getSelectionIndex() ) );
+                NonExistingMatchingRule nemr = ( NonExistingMatchingRule ) selectedItem;
+
+                if ( NonExistingMatchingRule.NONE.equals( nemr.getName() ) )
+                {
+                    modifiedAttributeType.setOrdering( null );
+                }
+                else
+                {
+                    modifiedAttributeType.setOrdering( ( ( NonExistingMatchingRule ) selectedItem ).getName() );
+                }
             }
             setEditorDirty();
         }
@@ -419,13 +443,24 @@
     {
         public void modifyText( ModifyEvent e )
         {
-            if ( substringCombo.getItem( substringCombo.getSelectionIndex() ).equals(
-                Messages.getString( "AttributeTypeFormEditorOverviewPage.(None)" ) ) ) { //$NON-NLS-1$
-                modifiedAttributeType.setSubstr( "" ); //$NON-NLS-1$
+            Object selectedItem = ( ( StructuredSelection ) substringComboViewer.getSelection() ).getFirstElement();
+
+            if ( selectedItem instanceof MatchingRule )
+            {
+                modifiedAttributeType.setSubstr( ( ( MatchingRule ) selectedItem ).getName() );
             }
-            else
+            else if ( selectedItem instanceof NonExistingMatchingRule )
             {
-                modifiedAttributeType.setSubstr( substringCombo.getItem( substringCombo.getSelectionIndex() ) );
+                NonExistingMatchingRule nemr = ( NonExistingMatchingRule ) selectedItem;
+
+                if ( NonExistingMatchingRule.NONE.equals( nemr.getName() ) )
+                {
+                    modifiedAttributeType.setSubstr( null );
+                }
+                else
+                {
+                    modifiedAttributeType.setSubstr( ( ( NonExistingMatchingRule ) selectedItem ).getName() );
+                }
             }
             setEditorDirty();
         }
@@ -620,21 +655,30 @@
             .createLabel( client_matching_rules, Messages.getString( "AttributeTypeFormEditorOverviewPage.Equility" ) ); //$NON-NLS-1$
         equalityCombo = new Combo( client_matching_rules, SWT.READ_ONLY | SWT.SINGLE );
         equalityCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        initEqualityCombo();
+        equalityComboViewer = new ComboViewer( equalityCombo );
+        equalityComboViewer.setContentProvider( new ATEEqualityComboContentProvider() );
+        equalityComboViewer.setLabelProvider( new ATEMatchingRulesComboLabelProvider() );
+        equalityComboViewer.setInput( new ATEMatchingRulesComboInput() );
 
         // ORDERING Combo
         toolkit
             .createLabel( client_matching_rules, Messages.getString( "AttributeTypeFormEditorOverviewPage.Ordering" ) ); //$NON-NLS-1$
         orderingCombo = new Combo( client_matching_rules, SWT.READ_ONLY | SWT.SINGLE );
         orderingCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        initOrderingCombo();
+        orderingComboViewer = new ComboViewer( orderingCombo );
+        orderingComboViewer.setContentProvider( new ATEOrderingComboContentProvider() );
+        orderingComboViewer.setLabelProvider( new ATEMatchingRulesComboLabelProvider() );
+        orderingComboViewer.setInput( new ATEMatchingRulesComboInput() );
 
         // SUBSTRING Combo
         toolkit.createLabel( client_matching_rules, Messages
             .getString( "AttributeTypeFormEditorOverviewPage.Substring" ) ); //$NON-NLS-1$
         substringCombo = new Combo( client_matching_rules, SWT.READ_ONLY | SWT.SINGLE );
         substringCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        initSubstringCombo();
+        substringComboViewer = new ComboViewer( substringCombo );
+        substringComboViewer.setContentProvider( new ATESubstringComboContentProvider() );
+        substringComboViewer.setLabelProvider( new ATEMatchingRulesComboLabelProvider() );
+        substringComboViewer.setInput( new ATEMatchingRulesComboInput() );
     }
 
 
@@ -659,42 +703,9 @@
     }
 
 
-    private void initEqualityCombo()
-    {
-        equalityCombo.add( Messages.getString( "AttributeTypeFormEditorOverviewPage.(None)" ) ); //$NON-NLS-1$
-        equalityCombo.select( 0 );
-        ArrayList<MatchingRule> equalityMatchingRules = MatchingRules.getEqualityMatchingRules();
-        for ( MatchingRule matchingRule : equalityMatchingRules )
-        {
-            equalityCombo.add( matchingRule.getName() );
-        }
-    }
-
-
-    private void initOrderingCombo()
-    {
-        orderingCombo.add( Messages.getString( "AttributeTypeFormEditorOverviewPage.(None)" ) ); //$NON-NLS-1$
-        orderingCombo.select( 0 );
-        ArrayList<MatchingRule> orderingMatchingRules = MatchingRules.getOrderingMatchingRules();
-        for ( MatchingRule matchingRule : orderingMatchingRules )
-        {
-            orderingCombo.add( matchingRule.getName() );
-        }
-    }
-
-
-    private void initSubstringCombo()
-    {
-        substringCombo.add( Messages.getString( "AttributeTypeFormEditorOverviewPage.(None)" ) ); //$NON-NLS-1$
-        substringCombo.select( 0 );
-        ArrayList<MatchingRule> substringMatchingRules = MatchingRules.getSubstringMatchingRules();
-        for ( MatchingRule matchingRule : substringMatchingRules )
-        {
-            substringCombo.add( matchingRule.getName() );
-        }
-    }
-
-
+    /**
+     * Fills in the User Interface fields.
+     */
     private void fillInUiFields()
     {
         // ALIASES Label
@@ -760,42 +771,18 @@
         this.noUserModificationCheckbox.setSelection( modifiedAttributeType.isNoUserModification() );
 
         // EQUALITY Combo
-        if ( modifiedAttributeType.getEquality() == null )
-        {
-            fillInEqualityCombo( Messages.getString( "ObjectClassFormEditorOverviewPage.(None)" ) );
-        }
-        else
-        {
-            fillInEqualityCombo( modifiedAttributeType.getEquality() );
-        }
+        fillEqualityCombo();
 
         // ORDERING Combo
-        if ( modifiedAttributeType.getOrdering() == null )
-        {
-            fillInOrderingCombo( Messages.getString( "ObjectClassFormEditorOverviewPage.(None)" ) );
-        }
-        else
-        {
-            fillInOrderingCombo( modifiedAttributeType.getOrdering() );
-        }
+        fillOrderingCombo();
 
         // SUBSTRING Combo
-        if ( modifiedAttributeType.getSubstr() == null )
-        {
-            fillInSubstringCombo( Messages.getString( "ObjectClassFormEditorOverviewPage.(None)" ) );
-        }
-        else
-        {
-            fillInSubstringCombo( modifiedAttributeType.getSubstr() );
-        }
+        fillSubstringCombo();
     }
 
 
     /**
-     * Fills the the Sup Combo with the correct value
-     *
-     * @param name
-     *      the name to select
+     * Fills the the Sup Combo with the correct value.
      */
     private void fillSupCombo()
     {
@@ -815,8 +802,7 @@
             }
             else
             {
-                ATESuperiorComboInput input = ( ATESuperiorComboInput ) supComboViewer
-                    .getInput();
+                ATESuperiorComboInput input = ( ATESuperiorComboInput ) supComboViewer.getInput();
                 NonExistingAttributeType neat = new NonExistingAttributeType( supAtName );
                 if ( !input.getChildren().contains( neat ) )
                 {
@@ -880,60 +866,102 @@
 
 
     /**
-     * Fills the Equality Combo from the attribute type value
-     *
-     * @param name
-     *      the name to select
+     * Fills the the Equality Combo with the correct value.
      */
-    private void fillInEqualityCombo( String name )
+    private void fillEqualityCombo()
     {
-        equalityCombo.select( 0 );
-        for ( int i = 0; i < equalityCombo.getItemCount(); i++ )
+        if ( modifiedAttributeType.getEquality() == null )
+        {
+            equalityComboViewer.setSelection( new StructuredSelection( new NonExistingMatchingRule(
+                NonExistingMatchingRule.NONE ) ), true );
+        }
+        else
         {
-            if ( name.equals( equalityCombo.getItem( i ) ) )
+            String equalityName = modifiedAttributeType.getEquality();
+
+            MatchingRule matchingRule = MatchingRules.getMatchingRule( equalityName );
+            if ( matchingRule != null )
             {
-                equalityCombo.select( i );
-                return;
+                equalityComboViewer.setSelection( new StructuredSelection( matchingRule ), true );
+            }
+            else
+            {
+                ATEMatchingRulesComboInput input = ( ATEMatchingRulesComboInput ) equalityComboViewer.getInput();
+                NonExistingMatchingRule nemr = new NonExistingMatchingRule( equalityName );
+                if ( !input.getChildren().contains( nemr ) )
+                {
+                    input.addChild( nemr );
+                }
+                equalityComboViewer.refresh();
+                equalityComboViewer.setSelection( new StructuredSelection( nemr ), true );
             }
         }
     }
 
 
     /**
-     * Fills the Ordering Combo from the attribute type value
-     *
-     * @param name
-     *      the name to select
+     * Fills the the Ordering Combo with the correct value.
      */
-    private void fillInOrderingCombo( String name )
+    private void fillOrderingCombo()
     {
-        orderingCombo.select( 0 );
-        for ( int i = 0; i < orderingCombo.getItemCount(); i++ )
+        if ( modifiedAttributeType.getOrdering() == null )
+        {
+            orderingComboViewer.setSelection( new StructuredSelection( new NonExistingMatchingRule(
+                NonExistingMatchingRule.NONE ) ), true );
+        }
+        else
         {
-            if ( name.equals( orderingCombo.getItem( i ) ) )
+            String orderingName = modifiedAttributeType.getOrdering();
+
+            MatchingRule matchingRule = MatchingRules.getMatchingRule( orderingName );
+            if ( matchingRule != null )
             {
-                orderingCombo.select( i );
-                return;
+                orderingComboViewer.setSelection( new StructuredSelection( matchingRule ), true );
+            }
+            else
+            {
+                ATEMatchingRulesComboInput input = ( ATEMatchingRulesComboInput ) orderingComboViewer.getInput();
+                NonExistingMatchingRule nemr = new NonExistingMatchingRule( orderingName );
+                if ( !input.getChildren().contains( nemr ) )
+                {
+                    input.addChild( nemr );
+                }
+                orderingComboViewer.refresh();
+                orderingComboViewer.setSelection( new StructuredSelection( nemr ), true );
             }
         }
     }
 
 
     /**
-     * Fills the Substring Combo from the attribute type value
-     *
-     * @param name
-     *      the name to select
+     * Fills the the Substring Combo with the correct value.
      */
-    private void fillInSubstringCombo( String name )
+    private void fillSubstringCombo()
     {
-        substringCombo.select( 0 );
-        for ( int i = 0; i < substringCombo.getItemCount(); i++ )
+        if ( modifiedAttributeType.getSubstr() == null )
+        {
+            substringComboViewer.setSelection( new StructuredSelection( new NonExistingMatchingRule(
+                NonExistingMatchingRule.NONE ) ), true );
+        }
+        else
         {
-            if ( name.equals( substringCombo.getItem( i ) ) )
+            String substringName = modifiedAttributeType.getSubstr();
+
+            MatchingRule matchingRule = MatchingRules.getMatchingRule( substringName );
+            if ( matchingRule != null )
             {
-                substringCombo.select( i );
-                return;
+                substringComboViewer.setSelection( new StructuredSelection( matchingRule ), true );
+            }
+            else
+            {
+                ATEMatchingRulesComboInput input = ( ATEMatchingRulesComboInput ) substringComboViewer.getInput();
+                NonExistingMatchingRule nemr = new NonExistingMatchingRule( substringName );
+                if ( !input.getChildren().contains( nemr ) )
+                {
+                    input.addChild( nemr );
+                }
+                substringComboViewer.refresh();
+                substringComboViewer.setSelection( new StructuredSelection( nemr ), true );
             }
         }
     }

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingAttributeType.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingAttributeType.java?view=diff&rev=521798&r1=521797&r2=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingAttributeType.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingAttributeType.java Fri Mar 23 09:29:51 2007
@@ -75,7 +75,7 @@
         }
         else
         {
-            return name + "    " + Messages.getString( "NonExistingAttributeType.(This_attribute_type_doesnt_exist)" );
+            return name + "   " + Messages.getString( "NonExistingAttributeType.(This_attribute_type_doesnt_exist)" );
         }
     }
 
@@ -87,8 +87,7 @@
     {
         if ( obj instanceof NonExistingAttributeType )
         {
-            NonExistingAttributeType nnat = ( NonExistingAttributeType ) obj;
-            return name.equalsIgnoreCase( nnat.getName() );
+            return name.equalsIgnoreCase( ( ( NonExistingAttributeType ) obj ).getName() );
         }
 
         return false;

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingMatchingRule.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingMatchingRule.java?view=auto&rev=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingMatchingRule.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/NonExistingMatchingRule.java Fri Mar 23 09:29:51 2007
@@ -0,0 +1,95 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.ldapstudio.schemas.view.editors.attributeType;
+
+
+import org.apache.directory.ldapstudio.schemas.Messages;
+
+
+/**
+ * This class implements the Non Existing Attribute Type.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NonExistingMatchingRule
+{
+    public static final String NONE = Messages.getString( "NonExistingMatchingRule.(None)" );
+
+    /** The name */
+    private String name;
+
+
+    /**
+     * Creates a new instance of NonExistingMatchingRule.
+     *
+     * @param name
+     *      the name the NonExistingMatchingRule
+     */
+    public NonExistingMatchingRule( String name )
+    {
+        this.name = name;
+    }
+
+
+    /**
+     * Gets the name of the NonExistingMatchingRule.
+     *
+     * @return
+     *      the name of the NonExistingMatchingRule
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+
+    /**
+     * Gets the displayable name of the NonExistingMatchingRule.
+     *
+     * @return
+     *      the displayable name of the NonExistingMatchingRule
+     */
+    public String getDisplayName()
+    {
+        if ( name.equals( NONE ) )
+        {
+            return NONE;
+        }
+        else
+        {
+            return name + "   " + Messages.getString( "NonExistingMatchingRule.(This_matching_rule_doesnt_exist)" );
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals( Object obj )
+    {
+        if ( obj instanceof NonExistingMatchingRule )
+        {
+            return name.equalsIgnoreCase( (( NonExistingMatchingRule ) obj).getName() );
+        }
+
+        return false;
+    }
+}

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/messages.properties
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/messages.properties?view=diff&rev=521798&r1=521797&r2=521798
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/messages.properties (original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/messages.properties Fri Mar 23 09:29:51 2007
@@ -174,6 +174,10 @@
 NonExistingAttributeType.(None)=(None)
 NonExistingAttributeType.(This_attribute_type_doesnt_exist)=(This attribute type doesn't exist)
 
+# NonExistingMatchingRule  -  org.apache.directory.ldapstudio.schemas.view.editors
+NonExistingMatchingRule.(None)=(None)
+NonExistingMatchingRule.(This_matching_rule_doesnt_exist)=(This matching rule doesn't exist)
+
 # SchemaFormEditor  -  org.apache.directory.ldapstudio.schemas.view.editors
 SchemaFormEditor.Source_code=Source code
 



Mime
View raw message