directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r522968 - in /directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main: java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ resources/org/apache/directory/ldapstudio/schemas/
Date Tue, 27 Mar 2007 15:56:35 GMT
Author: pamarcelot
Date: Tue Mar 27 08:56:34 2007
New Revision: 522968

URL: http://svn.apache.org/viewvc?view=rev&rev=522968
Log:
Modified the Used By Page of the AT Editor (Now using TableViewers, ContentProviders and LabelProviders
to display the OC using the selected AT).

Added:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByMandatoryTableContentProvider.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByOptionalTableContentProvider.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByTablesLabelProvider.java
Modified:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/messages.properties

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByMandatoryTableContentProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByMandatoryTableContentProvider.java?view=auto&rev=522968
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByMandatoryTableContentProvider.java
(added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByMandatoryTableContentProvider.java
Tue Mar 27 08:56:34 2007
@@ -0,0 +1,93 @@
+/*
+ *  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;
+
+import org.apache.directory.ldapstudio.schemas.model.AttributeType;
+import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
+import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+
+/**
+ * This class is the Content Provider for the Superiors Table of the Object Class Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATEUsedByMandatoryTableContentProvider implements IStructuredContentProvider
+{
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+     */
+    public Object[] getElements( Object inputElement )
+    {
+        if ( inputElement instanceof AttributeType )
+        {
+            List<Object> results = new ArrayList<Object>();
+            AttributeType inputAT = ( AttributeType ) inputElement;
+            SchemaPool schemaPool = SchemaPool.getInstance();
+
+            List<String> names = new ArrayList<String>();
+            for ( String name : inputAT.getNames() )
+            {
+                names.add( name.toLowerCase() );
+            }
+
+            List<ObjectClass> objectClasses = schemaPool.getObjectClasses();
+            for ( ObjectClass oc : objectClasses )
+            {
+                String[] musts = oc.getMust();
+                for ( String must : musts )
+                {
+                    if ( names.contains( must.toLowerCase() ) )
+                    {
+                        results.add( oc );
+                    }
+                }
+            }
+
+            return results.toArray();
+        }
+
+        // Default
+        return null;
+    }
+
+
+    /* (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/ATEUsedByOptionalTableContentProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByOptionalTableContentProvider.java?view=auto&rev=522968
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByOptionalTableContentProvider.java
(added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByOptionalTableContentProvider.java
Tue Mar 27 08:56:34 2007
@@ -0,0 +1,93 @@
+/*
+ *  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;
+
+import org.apache.directory.ldapstudio.schemas.model.AttributeType;
+import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
+import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+
+/**
+ * This class is the Content Provider for the Superiors Table of the Object Class Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATEUsedByOptionalTableContentProvider implements IStructuredContentProvider
+{
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+     */
+    public Object[] getElements( Object inputElement )
+    {
+        if ( inputElement instanceof AttributeType )
+        {
+            List<Object> results = new ArrayList<Object>();
+            AttributeType inputAT = ( AttributeType ) inputElement;
+            SchemaPool schemaPool = SchemaPool.getInstance();
+
+            List<String> names = new ArrayList<String>();
+            for ( String name : inputAT.getNames() )
+            {
+                names.add( name.toLowerCase() );
+            }
+
+            List<ObjectClass> objectClasses = schemaPool.getObjectClasses();
+            for ( ObjectClass oc : objectClasses )
+            {
+                String[] mays = oc.getMay();
+                for ( String may : mays )
+                {
+                    if ( names.contains( may.toLowerCase() ) )
+                    {
+                        results.add( oc );
+                    }
+                }
+            }
+
+            return results.toArray();
+        }
+
+        // Default
+        return null;
+    }
+
+
+    /* (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/ATEUsedByTablesLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByTablesLabelProvider.java?view=auto&rev=522968
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByTablesLabelProvider.java
(added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/ATEUsedByTablesLabelProvider.java
Tue Mar 27 08:56:34 2007
@@ -0,0 +1,71 @@
+/*
+ *  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.Activator;
+import org.apache.directory.ldapstudio.schemas.PluginConstants;
+import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
+import org.apache.directory.ldapstudio.schemas.view.ViewUtils;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class is the Label Provider for the Used By Tables of the Attribute Type Editor (Used
By Page).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ATEUsedByTablesLabelProvider extends LabelProvider implements ITableLabelProvider
+{
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object,
int)
+     */
+    public Image getColumnImage( Object element, int columnIndex )
+    {
+        if ( element instanceof ObjectClass )
+        {
+            return AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID, PluginConstants.IMG_OBJECT_CLASS
)
+                .createImage();
+        }
+
+        // Default
+        return null;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object,
int)
+     */
+    public String getColumnText( Object element, int columnIndex )
+    {
+        if ( element instanceof ObjectClass )
+        {
+            return ViewUtils.concateAliases( ( ( ObjectClass ) element ).getNames() );
+        }
+
+        // Default
+        return null;
+    }
+}

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java?view=diff&rev=522968&r1=522967&r2=522968
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/attributeType/AttributeTypeEditorUsedByPage.java
Tue Mar 27 08:56:34 2007
@@ -21,12 +21,6 @@
 package org.apache.directory.ldapstudio.schemas.view.editors.attributeType;
 
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.directory.ldapstudio.schemas.Activator;
-import org.apache.directory.ldapstudio.schemas.PluginConstants;
 import org.apache.directory.ldapstudio.schemas.model.AttributeType;
 import org.apache.directory.ldapstudio.schemas.model.LDAPModelEvent;
 import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
@@ -35,6 +29,8 @@
 import org.apache.directory.ldapstudio.schemas.view.editors.objectClass.ObjectClassEditor;
 import org.apache.directory.ldapstudio.schemas.view.editors.objectClass.ObjectClassEditorInput;
 import org.apache.log4j.Logger;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.MouseAdapter;
 import org.eclipse.swt.events.MouseEvent;
@@ -42,7 +38,6 @@
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
@@ -52,7 +47,6 @@
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
 
 
 /**
@@ -66,15 +60,20 @@
     /** The page title */
     public static String TITLE = "Used By";
 
-    /** The modified object class */
+    /** The modified attribute type */
     private AttributeType modifiedAttributeType;
 
+    /** The original attribute type */
+    private AttributeType originalAttributeType;
+
     /** The Schema Pool */
     private SchemaPool schemaPool;
 
     // UI Widgets
     private Table mandatoryAttributeTable;
+    private TableViewer mandatoryAttributeTableViewer;
     private Table optionalAttibuteTable;
+    private TableViewer optionalAttibuteTableViewer;
 
     // Listeners
     /** The listener of the Mandatory Attribute Type Table*/
@@ -82,18 +81,20 @@
     {
         public void mouseDoubleClick( MouseEvent e )
         {
-            IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+            Object selectedItem = ( ( StructuredSelection ) mandatoryAttributeTableViewer.getSelection()
)
+                .getFirstElement();
 
-            ObjectClassEditorInput input = new ObjectClassEditorInput( schemaPool
-                .getObjectClass( mandatoryAttributeTable.getSelection()[0].getText() ) );
-            String editorId = ObjectClassEditor.ID;
-            try
+            if ( selectedItem instanceof ObjectClass )
             {
-                page.openEditor( input, editorId );
-            }
-            catch ( PartInitException exception )
-            {
-                Logger.getLogger( AttributeTypeEditorUsedByPage.class ).debug( "error when
opening the editor" ); //$NON-NLS-1$
+                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+                try
+                {
+                    page.openEditor( new ObjectClassEditorInput( ( ObjectClass ) selectedItem
), ObjectClassEditor.ID );
+                }
+                catch ( PartInitException exception )
+                {
+                    Logger.getLogger( AttributeTypeEditorUsedByPage.class ).debug( "error
when opening the editor" ); //$NON-NLS-1$
+                }
             }
         }
     };
@@ -103,18 +104,20 @@
     {
         public void mouseDoubleClick( MouseEvent e )
         {
-            IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+            Object selectedItem = ( ( StructuredSelection ) optionalAttibuteTableViewer.getSelection()
)
+                .getFirstElement();
 
-            ObjectClassEditorInput input = new ObjectClassEditorInput( schemaPool.getObjectClass(
optionalAttibuteTable
-                .getSelection()[0].getText() ) );
-            String editorId = ObjectClassEditor.ID;
-            try
+            if ( selectedItem instanceof ObjectClass )
             {
-                page.openEditor( input, editorId );
-            }
-            catch ( PartInitException exception )
-            {
-                Logger.getLogger( AttributeTypeEditorUsedByPage.class ).debug( "error when
opening the editor" ); //$NON-NLS-1$
+                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+                try
+                {
+                    page.openEditor( new ObjectClassEditorInput( ( ObjectClass ) selectedItem
), ObjectClassEditor.ID );
+                }
+                catch ( PartInitException exception )
+                {
+                    Logger.getLogger( AttributeTypeEditorUsedByPage.class ).debug( "error
when opening the editor" ); //$NON-NLS-1$
+                }
             }
         }
     };
@@ -139,8 +142,9 @@
      */
     protected void createFormContent( IManagedForm managedForm )
     {
-        // Getting the modified attribute type and listening to its modifications
+        // Getting the modified and original attribute types
         modifiedAttributeType = ( ( AttributeTypeEditor ) getEditor() ).getModifiedAttributeType();
+        originalAttributeType = ( ( AttributeTypeEditor ) getEditor() ).getOriginalAttributeType();
 
         // Creating the base UI
         ScrolledForm form = managedForm.getForm();
@@ -190,6 +194,9 @@
         GridData gridData = new GridData( GridData.FILL, GridData.FILL, true, true );
         gridData.heightHint = 1;
         mandatoryAttributeTable.setLayoutData( gridData );
+        mandatoryAttributeTableViewer = new TableViewer( mandatoryAttributeTable );
+        mandatoryAttributeTableViewer.setContentProvider( new ATEUsedByMandatoryTableContentProvider()
);
+        mandatoryAttributeTableViewer.setLabelProvider( new ATEUsedByTablesLabelProvider()
);
     }
 
 
@@ -221,6 +228,9 @@
         GridData gridData = new GridData( GridData.FILL, GridData.FILL, true, true );
         gridData.heightHint = 1;
         optionalAttibuteTable.setLayoutData( gridData );
+        optionalAttibuteTableViewer = new TableViewer( optionalAttibuteTable );
+        optionalAttibuteTableViewer.setContentProvider( new ATEUsedByOptionalTableContentProvider()
);
+        optionalAttibuteTableViewer.setLabelProvider( new ATEUsedByTablesLabelProvider()
);
     }
 
 
@@ -229,93 +239,8 @@
      */
     private void fillInUiFields()
     {
-        fillInMandatoryAttributeTable();
-        fillInOptionalAttributeTable();
-    }
-
-
-    /**
-     * Fills in the Mandatory Attribute Table
-     */
-    private void fillInMandatoryAttributeTable()
-    {
-        List<String> objectClasses = getOcUsingATAsMandatoryAttribute();
-        for ( Iterator iter = objectClasses.iterator(); iter.hasNext(); )
-        {
-            TableItem item = new TableItem( mandatoryAttributeTable, SWT.NONE );
-            item.setImage( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
-                PluginConstants.IMG_OBJECT_CLASS ).createImage() );
-            item.setText( ( String ) iter.next() );
-        }
-    }
-
-
-    /**
-     * Returns a List of object classes using this attribute type a mandatory attribute.
-     *
-     * @return
-     *       a List of object classes using this attribute type a mandatory attribute
-     */
-    private List<String> getOcUsingATAsMandatoryAttribute()
-    {
-        List<String> ocList = new ArrayList<String>();
-
-        List<ObjectClass> objectClasses = schemaPool.getObjectClasses();
-        for ( ObjectClass oc : objectClasses )
-        {
-            String[] musts = oc.getMust();
-            for ( int j = 0; j < musts.length; j++ )
-            {
-                // TODO Match all aliases
-                if ( modifiedAttributeType.getNames()[0].equals( musts[j] ) )
-                {
-                    ocList.add( oc.getNames()[0] );
-                }
-            }
-        }
-        return ocList;
-    }
-
-
-    /**
-     * fills in the Optional Attribute Table.
-     */
-    private void fillInOptionalAttributeTable()
-    {
-        List<String> objectClasses = getOcUsingATAsOptionalAttribute();
-        for ( Iterator iter = objectClasses.iterator(); iter.hasNext(); )
-        {
-            TableItem item = new TableItem( optionalAttibuteTable, SWT.NONE );
-            item.setImage( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
-                PluginConstants.IMG_OBJECT_CLASS ).createImage() );
-            item.setText( ( String ) iter.next() );
-        }
-    }
-
-
-    /**
-     * Returns a List of object classes using this attribute type a optional attribute.
-     *
-     * @return
-     *       a List of object classes using this attribute type a optional attribute
-     */
-    private List<String> getOcUsingATAsOptionalAttribute()
-    {
-        List<String> ocList = new ArrayList<String>();
-
-        List<ObjectClass> objectClasses = schemaPool.getObjectClasses();
-        for ( ObjectClass oc : objectClasses )
-        {
-            String[] mays = oc.getMay();
-            for ( int j = 0; j < mays.length; j++ )
-            {
-                if ( modifiedAttributeType.getNames()[0].equals( mays[j] ) )
-                {
-                    ocList.add( oc.getNames()[0] );
-                }
-            }
-        }
-        return ocList;
+        mandatoryAttributeTableViewer.setInput( originalAttributeType );
+        optionalAttibuteTableViewer.setInput( originalAttributeType );
     }
 
 
@@ -329,25 +254,13 @@
     }
 
 
-    /**
-     * Refreshes the UI.
-     */
-    public void refreshUI()
-    {
-        fillInUiFields();
-    }
-
-
     /* (non-Javadoc)
      * @see org.apache.directory.ldapstudio.schemas.model.PoolListener#poolChanged(org.apache.directory.ldapstudio.schemas.model.SchemaPool,
org.apache.directory.ldapstudio.schemas.model.LDAPModelEvent)
      */
     public void poolChanged( SchemaPool p, LDAPModelEvent e )
     {
-        mandatoryAttributeTable.removeAll();
-        mandatoryAttributeTable.setItemCount( 0 );
-        optionalAttibuteTable.removeAll();
-        optionalAttibuteTable.setItemCount( 0 );
-        fillInUiFields();
+        mandatoryAttributeTableViewer.refresh();
+        optionalAttibuteTableViewer.refresh();
     }
 
 

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=522968&r1=522967&r2=522968
==============================================================================
--- 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
Tue Mar 27 08:56:34 2007
@@ -174,6 +174,10 @@
 NonExistingAttributeType.(None)=(None)
 NonExistingAttributeType.(This_attribute_type_doesnt_exist)=(This attribute type doesn't
exist)
 
+# NonExistingObjectClass  -  org.apache.directory.ldapstudio.schemas.view.editors
+NonExistingObjectClass.(None)=(None)
+NonExistingObjectClass.(This_object_class_doesnt_exist)=(This object class 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)



Mime
View raw message