directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r811332 - /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/EntryEditorsPreferencePage.java
Date Fri, 04 Sep 2009 09:54:46 GMT
Author: pamarcelot
Date: Fri Sep  4 09:54:45 2009
New Revision: 811332

URL: http://svn.apache.org/viewvc?rev=811332&view=rev
Log:
o Applied code formatting
o Auto-selection of the first Entry Editor.

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/EntryEditorsPreferencePage.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/EntryEditorsPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/EntryEditorsPreferencePage.java?rev=811332&r1=811331&r2=811332&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/EntryEditorsPreferencePage.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/EntryEditorsPreferencePage.java
Fri Sep  4 09:54:45 2009
@@ -84,9 +84,9 @@
      */
     public EntryEditorsPreferencePage()
     {
-        super( Messages.getString("EntryEditorsPreferencePage.EntryEditorsPrefPageTitle")
); //$NON-NLS-1$
+        super( Messages.getString( "EntryEditorsPreferencePage.EntryEditorsPrefPageTitle"
) ); //$NON-NLS-1$
         super.setPreferenceStore( BrowserUIPlugin.getDefault().getPreferenceStore() );
-        super.setDescription( Messages.getString("EntryEditorsPreferencePage.EntryEditorsPrefPageDescription")
); //$NON-NLS-1$
+        super.setDescription( Messages.getString( "EntryEditorsPreferencePage.EntryEditorsPrefPageDescription"
) ); //$NON-NLS-1$
     }
 
 
@@ -113,27 +113,26 @@
         composite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
 
         // Open Mode Group
-        Group openModeGroup = BaseWidgetUtils.createGroup( composite, Messages.getString("EntryEditorsPreferencePage.OpenMode"),
1 ); //$NON-NLS-1$
+        Group openModeGroup = BaseWidgetUtils.createGroup( composite, Messages
+            .getString( "EntryEditorsPreferencePage.OpenMode" ), 1 ); //$NON-NLS-1$
         openModeGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Historical Behavior Button
-        historicalBehaviorButton = BaseWidgetUtils.createRadiobutton( openModeGroup,
-            Messages.getString("EntryEditorsPreferencePage.HistoricalBehavior"), 1 ); //$NON-NLS-1$
+        historicalBehaviorButton = BaseWidgetUtils.createRadiobutton( openModeGroup, Messages
+            .getString( "EntryEditorsPreferencePage.HistoricalBehavior" ), 1 ); //$NON-NLS-1$
         Composite historicalBehaviorComposite = BaseWidgetUtils.createColumnContainer( openModeGroup,
2, 1 );
         BaseWidgetUtils.createRadioIndent( historicalBehaviorComposite, 1 );
-        BaseWidgetUtils.createWrappedLabel( historicalBehaviorComposite,
-            Messages.getString("EntryEditorsPreferencePage.HistoricalBehaviorTooltip"), 1
); //$NON-NLS-1$
+        BaseWidgetUtils.createWrappedLabel( historicalBehaviorComposite, Messages
+            .getString( "EntryEditorsPreferencePage.HistoricalBehaviorTooltip" ), 1 ); //$NON-NLS-1$
 
         // Use Application Wide Open Mode Button
-        useApplicationWideOpenModeButton = BaseWidgetUtils.createRadiobutton( openModeGroup,
-            Messages.getString("EntryEditorsPreferencePage.ApplicationWideSetting"), 1 );
//$NON-NLS-1$
+        useApplicationWideOpenModeButton = BaseWidgetUtils.createRadiobutton( openModeGroup,
Messages
+            .getString( "EntryEditorsPreferencePage.ApplicationWideSetting" ), 1 ); //$NON-NLS-1$
         Composite useApplicationWideOpenModeComposite = BaseWidgetUtils.createColumnContainer(
openModeGroup, 2, 1 );
         BaseWidgetUtils.createRadioIndent( useApplicationWideOpenModeComposite, 1 );
-        Link link = BaseWidgetUtils
-            .createLink(
-                useApplicationWideOpenModeComposite,
-                Messages.getString("EntryEditorsPreferencePage.ApplicationWideSettingTooltip"),
//$NON-NLS-1$
-                1 );
+        Link link = BaseWidgetUtils.createLink( useApplicationWideOpenModeComposite, Messages
+            .getString( "EntryEditorsPreferencePage.ApplicationWideSettingTooltip" ), //$NON-NLS-1$
+            1 );
         link.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
@@ -156,7 +155,8 @@
         }
 
         // Entry Editors Group
-        Group entryEditorsGroup = BaseWidgetUtils.createGroup( composite, Messages.getString("EntryEditorsPreferencePage.EntryEditors"),
1 ); //$NON-NLS-1$
+        Group entryEditorsGroup = BaseWidgetUtils.createGroup( composite, Messages
+            .getString( "EntryEditorsPreferencePage.EntryEditors" ), 1 ); //$NON-NLS-1$
         openModeGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Entry Editors Composite
@@ -189,7 +189,8 @@
             .getEntryEditorExtensions() );
 
         // Up Button
-        upEntryEditorButton = BaseWidgetUtils.createButton( entryEditorsComposite, Messages.getString("EntryEditorsPreferencePage.Up"),
1 ); //$NON-NLS-1$
+        upEntryEditorButton = BaseWidgetUtils.createButton( entryEditorsComposite, Messages
+            .getString( "EntryEditorsPreferencePage.Up" ), 1 ); //$NON-NLS-1$
         upEntryEditorButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false,
false ) );
         upEntryEditorButton.setEnabled( false );
         upEntryEditorButton.addSelectionListener( new SelectionAdapter()
@@ -201,7 +202,8 @@
         } );
 
         // Down Button
-        downEntryEditorButton = BaseWidgetUtils.createButton( entryEditorsComposite, Messages.getString("EntryEditorsPreferencePage.Down"),
1 ); //$NON-NLS-1$
+        downEntryEditorButton = BaseWidgetUtils.createButton( entryEditorsComposite, Messages
+            .getString( "EntryEditorsPreferencePage.Down" ), 1 ); //$NON-NLS-1$
         downEntryEditorButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false,
false ) );
         downEntryEditorButton.setEnabled( false );
         downEntryEditorButton.addSelectionListener( new SelectionAdapter()
@@ -213,7 +215,8 @@
         } );
 
         // Restore Defaults Button
-        restoreDefaultsEntryEditorsButton = BaseWidgetUtils.createButton( entryEditorsComposite,
Messages.getString("EntryEditorsPreferencePage.RestoreDefaults"), 1 ); //$NON-NLS-1$
+        restoreDefaultsEntryEditorsButton = BaseWidgetUtils.createButton( entryEditorsComposite,
Messages
+            .getString( "EntryEditorsPreferencePage.RestoreDefaults" ), 1 ); //$NON-NLS-1$
         restoreDefaultsEntryEditorsButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING,
false, false ) );
         restoreDefaultsEntryEditorsButton.addSelectionListener( new SelectionAdapter()
         {
@@ -224,7 +227,8 @@
         } );
 
         // Description Label
-        BaseWidgetUtils.createLabel( entryEditorsGroup, Messages.getString("EntryEditorsPreferencePage.DescriptionColon"),
1 ); //$NON-NLS-1$
+        BaseWidgetUtils.createLabel( entryEditorsGroup, Messages
+            .getString( "EntryEditorsPreferencePage.DescriptionColon" ), 1 ); //$NON-NLS-1$
 
         // Description Text
         final Text descriptionText = new Text( entryEditorsGroup, SWT.BORDER | SWT.MULTI
| SWT.READ_ONLY );
@@ -259,6 +263,12 @@
             sortEntryEditorsByDefaultPriority();
         }
 
+        // Selecting the first entry editor
+        if ( sortedEntryEditorsList.size() > 0 )
+        {
+            entryEditorsTableViewer.setSelection( new StructuredSelection( sortedEntryEditorsList.get(
0 ) ) );
+        }
+
         return parent;
     }
 



Mime
View raw message