directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r609052 - in /directory/studio/trunk/studio-ldapbrowser-ui: ./ src/main/java/org/apache/directory/studio/ldapbrowser/ui/ src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/
Date Fri, 04 Jan 2008 23:25:38 GMT
Author: seelmann
Date: Fri Jan  4 15:25:33 2008
New Revision: 609052

URL: http://svn.apache.org/viewvc?rev=609052&view=rev
Log:
DIRSTUDIO-119: Added preference page for modification logs view

Added:
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/ModificationLogsPreferencePage.java
  (with props)
Modified:
    directory/studio/trunk/studio-ldapbrowser-ui/plugin.xml
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIPreferencesInitializer.java

Modified: directory/studio/trunk/studio-ldapbrowser-ui/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/plugin.xml?rev=609052&r1=609051&r2=609052&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/plugin.xml (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/plugin.xml Fri Jan  4 15:25:33 2008
@@ -230,6 +230,13 @@
             name="Search Result Editor">
          <keywordReference id="org.apache.directory.studio.ldapbrowser.keyword.ldap"/>
       </page>
+      <page
+            category="org.apache.directory.studio.ldapbrowser.preferences.MainPreferencePage"
+            class="org.apache.directory.studio.ldapbrowser.ui.dialogs.preferences.ModificationLogsPreferencePage"
+            id="org.apache.directory.studio.ldapbrowser.preferences.ModificationLogsPreferencePage"
+            name="Modification Logs">
+         <keywordReference id="org.apache.directory.studio.ldapbrowser.keyword.ldap"/>
+      </page>
    </extension>
 
 	<extension

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java?rev=609052&r1=609051&r2=609052&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java
Fri Jan  4 15:25:33 2008
@@ -38,6 +38,8 @@
 
     public static final String PREFERENCE_SEARCHRESULTEDITOR_SHOW_LINKS = "searchResultEditorShowLinks";
 
+    public static final String PREFERENCE_MODIFICATIONLOGS_ENABLE = "modificationLogsEnable";
+    
     public static final String PREFERENCEPAGEID_MAIN = "org.apache.directory.studio.ldapbrowser.preferences.MainPreferencePage";
 
     public static final String PREFERENCEPAGEID_ATTRIBUTES = "org.apache.directory.studio.ldapbrowser.preferences.AttributesPreferencePage";

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIPreferencesInitializer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIPreferencesInitializer.java?rev=609052&r1=609051&r2=609052&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIPreferencesInitializer.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIPreferencesInitializer.java
Fri Jan  4 15:25:33 2008
@@ -48,6 +48,9 @@
         store.setDefault( BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN, true
);
         store.setDefault( BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_LINKS, true
);
 
+        // Modification Logs
+        store.setDefault( BrowserUIConstants.PREFERENCE_MODIFICATIONLOGS_ENABLE, true );
+
     }
 
 }

Added: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/ModificationLogsPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/ModificationLogsPreferencePage.java?rev=609052&view=auto
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/ModificationLogsPreferencePage.java
(added)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/ModificationLogsPreferencePage.java
Fri Jan  4 15:25:33 2008
@@ -0,0 +1,106 @@
+/*
+ *  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.studio.ldapbrowser.ui.dialogs.preferences;
+
+
+import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
+import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+
+/**
+ * The modification logs preference page contains settings of the 
+ * modification logs view.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ModificationLogsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage
+{
+
+    private Button enableModificationLogging;
+
+
+    /**
+     * Creates a new instance of SearchResultEditorPreferencePage.
+     */
+    public ModificationLogsPreferencePage()
+    {
+        super( "Modification Logs" );
+        super.setPreferenceStore( BrowserUIPlugin.getDefault().getPreferenceStore() );
+        super.setDescription( "General settings for the modification logs view:" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void init( IWorkbench workbench )
+    {
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Control createContents( Composite parent )
+    {
+        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );
+
+        BaseWidgetUtils.createSpacer( composite, 1 );
+        BaseWidgetUtils.createSpacer( composite, 1 );
+        enableModificationLogging = BaseWidgetUtils.createCheckbox( composite, "Enable modification
logs", 1 );
+        enableModificationLogging.setSelection( getPreferenceStore().getBoolean(
+            BrowserUIConstants.PREFERENCE_MODIFICATIONLOGS_ENABLE ) );
+
+        applyDialogFont( composite );
+        return composite;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean performOk()
+    {
+        getPreferenceStore().setValue( BrowserUIConstants.PREFERENCE_MODIFICATIONLOGS_ENABLE,
+            enableModificationLogging.getSelection() );
+        return true;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void performDefaults()
+    {
+        enableModificationLogging.setSelection( getPreferenceStore().getDefaultBoolean(
+            BrowserUIConstants.PREFERENCE_MODIFICATIONLOGS_ENABLE ) );
+        super.performDefaults();
+    }
+
+}

Propchange: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/ModificationLogsPreferencePage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message