directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r804259 - in /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui: ./ actions/
Date Fri, 14 Aug 2009 15:27:30 GMT
Author: pamarcelot
Date: Fri Aug 14 15:27:24 2009
New Revision: 804259

URL: http://svn.apache.org/viewvc?rev=804259&view=rev
Log:
DIRSTUDIO-516:
o Added a new OpenEntryEditorsPreferencePageAction
o Used this action in the EntryEditorMenuManager
o Added translations for strings.

Added:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/OpenEntryEditorsPreferencePageAction.java
Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/EntryEditorMenuManager.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages.properties
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_de.properties
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_fr.properties

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java?rev=804259&r1=804258&r2=804259&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/BrowserUIConstants.java
Fri Aug 14 15:27:24 2009
@@ -49,6 +49,8 @@
         "PrefPage_BrowserPreferencePage_id" ); //$NON-NLS-1$
     public static final String PREFERENCEPAGEID_ENTRYEDITOR = BrowserUIPlugin.getDefault().getPluginProperties()
         .getString( "PrefPage_EntryEditorPreferencePage_id" ); //$NON-NLS-1$
+    public static final String PREFERENCEPAGEID_ENTRYEDITORS = BrowserUIPlugin.getDefault().getPluginProperties()
+    .getString( "PrefPage_EntryEditorsPreferencePage_id" ); //$NON-NLS-1$
     public static final String PREFERENCEPAGEID_SEARCHRESULTEDITOR = BrowserUIPlugin.getDefault().getPluginProperties()
         .getString( "PrefPage_SearchResultEditorPreferencePage_id" ); //$NON-NLS-1$
     public static final String PREFERENCEPAGEID_MODIFICATIONLOGS = BrowserUIPlugin.getDefault().getPluginProperties()

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/EntryEditorMenuManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/EntryEditorMenuManager.java?rev=804259&r1=804258&r2=804259&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/EntryEditorMenuManager.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/EntryEditorMenuManager.java
Fri Aug 14 15:27:24 2009
@@ -42,7 +42,11 @@
 
 public class EntryEditorMenuManager extends MenuManager implements IMenuListener
 {
-    protected ISelectionProvider selectionProvider;
+    /** The selection provider */
+    private ISelectionProvider selectionProvider;
+
+    /** The OpenEntryEditorsPreferencePageAction */
+    private OpenEntryEditorsPreferencePageAction openEntryEditorsPreferencePageAction;
 
 
     /**
@@ -53,6 +57,7 @@
     {
         super( "Open With" );
         this.selectionProvider = selectionProvider;
+        openEntryEditorsPreferencePageAction = new OpenEntryEditorsPreferencePageAction();
         addMenuListener( this );
     }
 
@@ -78,9 +83,7 @@
         add( new Separator() );
 
         // Preferences Action
-        add( new Action( "Preferences..." )
-        {
-        } );
+        add( openEntryEditorsPreferencePageAction );
     }
 
 

Added: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/OpenEntryEditorsPreferencePageAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/OpenEntryEditorsPreferencePageAction.java?rev=804259&view=auto
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/OpenEntryEditorsPreferencePageAction.java
(added)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/OpenEntryEditorsPreferencePageAction.java
Fri Aug 14 15:27:24 2009
@@ -0,0 +1,62 @@
+/*
+ *  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.actions;
+
+
+import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+
+/**
+ * The OpenEntryEditorsPreferencePageAction is used to open the 
+ * preference dialog with the entry editors preference page.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class OpenEntryEditorsPreferencePageAction extends Action
+{
+
+    /**
+     * Creates a new instance of OpenBrowserPreferencePageAction.
+     */
+    public OpenEntryEditorsPreferencePageAction()
+    {
+        super.setText( Messages.getString( "OpenEntryEditorsPageAction.Preferences" ) );
//$NON-NLS-1$
+        setToolTipText( Messages.getString( "OpenEntryEditorsPageAction.PreferencesToolTip"
) ); //$NON-NLS-1$
+        setEnabled( true );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run()
+    {
+        Shell shell = Display.getCurrent().getActiveShell();
+        String pageId = BrowserUIConstants.PREFERENCEPAGEID_ENTRYEDITORS;
+        PreferencesUtil.createPreferenceDialogOn( shell, pageId, new String[]
+            { pageId }, null ).open();
+    }
+}

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages.properties?rev=804259&r1=804258&r2=804259&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages.properties
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages.properties
Fri Aug 14 15:27:24 2009
@@ -70,6 +70,11 @@
 NewLdifFileAction.NewLDIF=New LDIF File
 NewSearchAction.NewSearch=New Search...
 OpenEncoderDecoderDialogAction.OpenEndoderDecoder=Open Encoder/Decoder
+OpenEntryEditorAction.OpenBookmark=Open Bookmark
+OpenEntryEditorAction.OpenEntry=Open Entry
+OpenEntryEditorAction.OpenSearchResult=Open Search Result
+OpenEntryEditorsPageAction.Preferences=Preferences...
+OpenEntryEditorsPageAction.PreferencesToolTip=Preferences...
 OpenSchemaBrowserAction.AttributeDescription=Attribute Type Description
 OpenSchemaBrowserAction.EqualityDescription=Equality Matching Rule Description
 OpenSchemaBrowserAction.ObjectDescription=Object Class Description
@@ -79,7 +84,3 @@
 OpenSchemaBrowserAction.SyntaxDescription=Syntax Description
 OpenSearchAction.Search=Search...
 OpenSearchResultAction.OpenResult=Open Search Result
-
-OpenEntryEditorAction.OpenBookmark=Open Bookmark
-OpenEntryEditorAction.OpenEntry=Open Entry
-OpenEntryEditorAction.OpenSearchResult=Open Search Result

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_de.properties?rev=804259&r1=804258&r2=804259&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_de.properties
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_de.properties
Fri Aug 14 15:27:24 2009
@@ -68,6 +68,11 @@
 NewLdifFileAction.NewLDIF=Neue LDIF Datei...
 NewSearchAction.NewSearch=Neue Suche...
 OpenEncoderDecoderDialogAction.OpenEndoderDecoder=Neuer Verschl\u00FCssler/Entschl\u00FCssler
+OpenEntryEditorAction.OpenBookmark=\u00D6ffne Lesezeichen
+OpenEntryEditorAction.OpenEntry=\u00D6ffne Eintrag
+OpenEntryEditorAction.OpenSearchResult=\u00D6ffne Suchresultat
+OpenEntryEditorsPageAction.Preferences=Pr\u00E4ferenzen...
+OpenEntryEditorsPageAction.PreferencesToolTip=Pr\u00E4ferenzen...
 OpenSchemaBrowserAction.AttributeDescription=Attribut-Typ Beschreibung
 OpenSchemaBrowserAction.EqualityDescription=Gleichheits-Regel Beschreibung
 OpenSchemaBrowserAction.ObjectDescription=Objektklassen Beschreibung

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_fr.properties?rev=804259&r1=804258&r2=804259&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_fr.properties
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/messages_fr.properties
Fri Aug 14 15:27:24 2009
@@ -70,6 +70,11 @@
 NewLdifFileAction.NewLDIF=Nouveau fichier LDIF
 NewSearchAction.NewSearch=Nouvelle recherche...
 OpenEncoderDecoderDialogAction.OpenEndoderDecoder=Ouvrir l'encodeur/d\u00E9codeur
+OpenEntryEditorAction.OpenBookmark=Ouvrir le signet
+OpenEntryEditorAction.OpenEntry=Ouvrir l'entr\u00E9e
+OpenEntryEditorAction.OpenSearchResult=Ouvrir le r\u00E9sultat de recherche
+OpenEntryEditorsPageAction.Preferences=Pr\u00E9f\u00E9rences...
+OpenEntryEditorsPageAction.PreferencesToolTip=Pr\u00E9f\u00E9rences...
 OpenSchemaBrowserAction.AttributeDescription=Description de type d'attribut
 OpenSchemaBrowserAction.EqualityDescription=Description d'Equality Matching Rule
 OpenSchemaBrowserAction.ObjectDescription=Description d'object class



Mime
View raw message