directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r558663 - in /directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors: attributetype/ objectclass/
Date Mon, 23 Jul 2007 08:55:51 GMT
Author: pamarcelot
Date: Mon Jul 23 01:55:50 2007
New Revision: 558663

URL: http://svn.apache.org/viewvc?view=rev&rev=558663
Log:
Added missing strings in the ObjectClassEditor.
Code formating.

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorSuperiorsTableContentProvider.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java?view=diff&rev=558663&r1=558662&r2=558663
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
Mon Jul 23 01:55:50 2007
@@ -666,7 +666,7 @@
         // General Information Section
         Section section_general_information = toolkit.createSection( parent, Section.DESCRIPTION
| Section.EXPANDED
             | Section.TITLE_BAR );
-        section_general_information.setDescription( "Specify general information (name, OID,
etc.)." );
+        section_general_information.setDescription( "Specify general information (aliases,
OID, etc.)." );
         section_general_information.setText( "General information" );
 
         // Creating the layout of the section

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java?view=diff&rev=558663&r1=558662&r2=558663
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
Mon Jul 23 01:55:50 2007
@@ -859,8 +859,8 @@
     {
         // General Information Section
         Section section_general_information = toolkit.createSection( parent, Section.DESCRIPTION
| Section.TITLE_BAR );
-        section_general_information.setDescription( "General_Information_Section_Description"
); //TODO
-        section_general_information.setText( "General_Information_Section_Text" ); //TODO
+        section_general_information.setDescription( "Specify general information (aliases,
OID, etc.)." );
+        section_general_information.setText( "General information" );
         section_general_information.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true,
true ) );
 
         // Creating the layout of the section
@@ -870,7 +870,7 @@
         section_general_information.setClient( client_general_information );
 
         // ALIASES Button
-        toolkit.createLabel( client_general_information, "Aliases" );
+        toolkit.createLabel( client_general_information, "Aliases:" );
         aliasesLabel = toolkit.createLabel( client_general_information, "" ); //$NON-NLS-1$
         aliasesLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 )
);
         toolkit.createLabel( client_general_information, "" ); //$NON-NLS-1$
@@ -878,24 +878,24 @@
         aliasesButton.setLayoutData( new GridData( SWT.NONE, SWT.NONE, false, false, 2, 1
) );
 
         // OID Field
-        toolkit.createLabel( client_general_information, "OID" );
+        toolkit.createLabel( client_general_information, "OID:" );
         oidText = toolkit.createText( client_general_information, "" ); //$NON-NLS-1$
         oidText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
 
         // SCHEMA Field
-        schemaLink = toolkit.createHyperlink( client_general_information, "Schema", SWT.WRAP
);
+        schemaLink = toolkit.createHyperlink( client_general_information, "Schema:", SWT.WRAP
);
         schemaLabel = toolkit.createLabel( client_general_information, "" ); //$NON-NLS-1$
         schemaLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 )
);
 
         // DESCRIPTION Field
-        toolkit.createLabel( client_general_information, "Description" );
+        toolkit.createLabel( client_general_information, "Description:" );
         descriptionText = toolkit.createText( client_general_information, "", SWT.MULTI |
SWT.V_SCROLL ); //$NON-NLS-1$
         GridData descriptionGridData = new GridData( SWT.FILL, SWT.NONE, true, false, 2,
1 );
         descriptionGridData.heightHint = 42;
         descriptionText.setLayoutData( descriptionGridData );
 
         // SUPERIORS Table
-        toolkit.createLabel( client_general_information, "Superior classes" );
+        toolkit.createLabel( client_general_information, "Superior classes:" );
         superiorsTable = toolkit.createTable( client_general_information, SWT.SINGLE | SWT.V_SCROLL
);
         GridData gridData = new GridData( SWT.FILL, SWT.NONE, true, false );
         gridData.heightHint = 45;
@@ -936,8 +936,8 @@
     {
         // MANDATORY ATTRIBUTES Section
         Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR
);
-        section.setText( "Mandatory_Attribute_Section_Text" ); //TODO
-        section.setDescription( "Mandatory_Attribute_Section_Description" ); //TODO
+        section.setText( "Mandatory attributes" );
+        section.setDescription( "Specify the mandatory attribute types." );
         section.setExpanded( true );
         Composite client = toolkit.createComposite( section );
         section.setClient( client );
@@ -981,8 +981,8 @@
     {
         // OPTIONAL ATTRIBUTES Section
         Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR
);
-        section.setText( "Optionnal_Attributes_Section_Text" ); //TODO
-        section.setDescription( "Optionnal_Attributes_Section_Description" ); //TODO
+        section.setText( "Optional attributes" );
+        section.setDescription( "Specify the optional attribute types." );
         section.setExpanded( true );
         Composite client = toolkit.createComposite( section );
         section.setClient( client );

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorSuperiorsTableContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorSuperiorsTableContentProvider.java?view=diff&rev=558663&r1=558662&r2=558663
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorSuperiorsTableContentProvider.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/editors/objectclass/ObjectClassEditorSuperiorsTableContentProvider.java
Mon Jul 23 01:55:50 2007
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.studio.apacheds.schemaeditor.view.editors.objectclass;
 
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -31,6 +32,7 @@
 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.
@@ -38,89 +40,102 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ObjectClassEditorSuperiorsTableContentProvider implements
-		IStructuredContentProvider {
-	/** The SchemaHandler */
-	private SchemaHandler schemaHandler;
-
-	/**
-	 * Creates a new instance of
-	 * ObjectClassFormEditorSuperiorsTableContentProvider.
-	 */
-	public ObjectClassEditorSuperiorsTableContentProvider() {
-		schemaHandler = Activator.getDefault().getSchemaHandler();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-	 */
-	public Object[] getElements(Object inputElement) {
-		if (inputElement instanceof String[]) {
-			List<Object> results = new ArrayList<Object>();
-
-			String[] superiors = (String[]) inputElement;
-			for (String superior : superiors) {
-				ObjectClassImpl oc = schemaHandler.getObjectClass(superior);
-				if (oc != null) {
-					results.add(oc);
-				} else {
-					results.add(new NonExistingObjectClass(superior));
-				}
-			}
-
-			// Sorting Elements
-			Collections.sort(results, new Comparator<Object>() {
-				public int compare(Object o1, Object o2) {
-					if (o1 instanceof ObjectClassImpl
-							&& o2 instanceof ObjectClassImpl) {
-						return ((ObjectClassImpl) o1).getNames()[0]
-								.compareToIgnoreCase(((ObjectClassImpl) o2)
-										.getNames()[0]);
-					} else if (o1 instanceof ObjectClassImpl
-							&& o2 instanceof NonExistingObjectClass) {
-						return ((ObjectClassImpl) o1).getNames()[0]
-								.compareToIgnoreCase(((NonExistingObjectClass) o2)
-										.getName());
-					} else if (o1 instanceof NonExistingObjectClass
-							&& o2 instanceof ObjectClassImpl) {
-						return ((NonExistingObjectClass) o1).getName()
-								.compareToIgnoreCase(
-										((ObjectClassImpl) o2).getNames()[0]);
-					} else if (o1 instanceof NonExistingObjectClass
-							&& o2 instanceof NonExistingObjectClass) {
-						return ((NonExistingObjectClass) o1)
-								.getName()
-								.compareToIgnoreCase(
-										((NonExistingObjectClass) o2).getName());
-					}
-
-					return 0;
-				}
-			});
-
-			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) {
-	}
+public class ObjectClassEditorSuperiorsTableContentProvider implements IStructuredContentProvider
+{
+    /** The SchemaHandler */
+    private SchemaHandler schemaHandler;
+
+
+    /**
+     * Creates a new instance of
+     * ObjectClassFormEditorSuperiorsTableContentProvider.
+     */
+    public ObjectClassEditorSuperiorsTableContentProvider()
+    {
+        schemaHandler = Activator.getDefault().getSchemaHandler();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+     */
+    public Object[] getElements( Object inputElement )
+    {
+        if ( inputElement instanceof String[] )
+        {
+            List<Object> results = new ArrayList<Object>();
+
+            String[] superiors = ( String[] ) inputElement;
+            for ( String superior : superiors )
+            {
+                ObjectClassImpl oc = schemaHandler.getObjectClass( superior );
+                if ( oc != null )
+                {
+                    results.add( oc );
+                }
+                else
+                {
+                    results.add( new NonExistingObjectClass( superior ) );
+                }
+            }
+
+            // Sorting Elements
+            Collections.sort( results, new Comparator<Object>()
+            {
+                public int compare( Object o1, Object o2 )
+                {
+                    if ( o1 instanceof ObjectClassImpl && o2 instanceof ObjectClassImpl
)
+                    {
+                        return ( ( ObjectClassImpl ) o1 ).getNames()[0].compareToIgnoreCase(
( ( ObjectClassImpl ) o2 )
+                            .getNames()[0] );
+                    }
+                    else if ( o1 instanceof ObjectClassImpl && o2 instanceof NonExistingObjectClass
)
+                    {
+                        return ( ( ObjectClassImpl ) o1 ).getNames()[0]
+                            .compareToIgnoreCase( ( ( NonExistingObjectClass ) o2 ).getName()
);
+                    }
+                    else if ( o1 instanceof NonExistingObjectClass && o2 instanceof
ObjectClassImpl )
+                    {
+                        return ( ( NonExistingObjectClass ) o1 ).getName().compareToIgnoreCase(
+                            ( ( ObjectClassImpl ) o2 ).getNames()[0] );
+                    }
+                    else if ( o1 instanceof NonExistingObjectClass && o2 instanceof
NonExistingObjectClass )
+                    {
+                        return ( ( NonExistingObjectClass ) o1 ).getName().compareToIgnoreCase(
+                            ( ( NonExistingObjectClass ) o2 ).getName() );
+                    }
+
+                    return 0;
+                }
+            } );
+
+            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 )
+    {
+    }
 }



Mime
View raw message