directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1670296 [2/2] - in /directory/studio/trunk/plugins/combinededitor: ./ resources/ resources/icons/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/directory/ src/main/java/org/apache/direc...
Date Tue, 31 Mar 2015 09:56:36 GMT
Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/LdifEditorPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/LdifEditorPage.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/LdifEditorPage.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/LdifEditorPage.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,291 @@
+package org.apache.directory.studio.combinededitor.editor;
+
+
+import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
+import org.apache.directory.studio.entryeditors.EntryEditorInput;
+import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
+import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
+import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
+import org.apache.directory.studio.ldapbrowser.core.utils.CompoundModification;
+import org.apache.directory.studio.ldapbrowser.core.utils.ModelConverter;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
+import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
+import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
+import org.apache.directory.studio.ldifeditor.widgets.LdifEditorWidget;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifInvalidContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+
+import org.apache.directory.studio.combinededitor.actions.FetchOperationalAttributesAction;
+import org.apache.directory.studio.templateeditor.actions.EditorPagePropertiesAction;
+import org.apache.directory.studio.templateeditor.actions.RefreshAction;
+import org.apache.directory.studio.templateeditor.actions.SimpleActionProxy;
+
+
+/**
+ * This class implements an editor page for the LDIF Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class LdifEditorPage extends AbstractCombinedEntryEditorPage
+{
+    /** The LDIF editor widget */
+    private LdifEditorWidget ldifEditorWidget;
+
+    /** A count to know if the editor page has updated the shared working copy */
+    private int hasUpdatedSharedWorkingCopyCount = 0;
+
+    /** The modify listener for the widget */
+    private WidgetModifyListener listener = new WidgetModifyListener()
+    {
+        public void widgetModified( WidgetModifyEvent event )
+        {
+            updateSharedWorkingCopy();
+        }
+    };
+
+    /** The context menu */
+    private Menu contextMenu;
+
+
+    /**
+     * Creates a new instance of LdifEditorPage.
+     *
+     * @param editor
+     *      the associated editor
+     */
+    public LdifEditorPage( CombinedEntryEditor editor )
+    {
+        super( editor );
+
+        // Creating and assigning the tab item
+        CTabItem tabItem = new CTabItem( editor.getTabFolder(), SWT.NONE );
+        tabItem.setText( Messages.getString( "LdifEditorPage.LDIFEditor" ) ); //$NON-NLS-1$
+        tabItem.setImage( LdifEditorActivator.getDefault().getImage( LdifEditorConstants.IMG_BROWSER_LDIFEDITOR ) );
+        setTabItem( tabItem );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void init()
+    {
+        super.init();
+
+        ldifEditorWidget = new LdifEditorWidget( null, "", true ); //$NON-NLS-1$
+        ldifEditorWidget.createWidget( getEditor().getTabFolder() );
+
+        // Creating a new menu manager
+        Control sourceViewerControl = ldifEditorWidget.getSourceViewer().getControl();
+
+        MenuManager menuManager = new MenuManager();
+        contextMenu = menuManager.createContextMenu( sourceViewerControl );
+        sourceViewerControl.setMenu( contextMenu );
+
+        IEditorSite site = getEditor().getEditorSite();
+        IActionBars bars = site.getActionBars();
+
+        Action cutAction = new Action( "Cut" )
+        {
+            public void run()
+            {
+                ldifEditorWidget.getSourceViewer().doOperation( SourceViewer.CUT );
+            }
+        };
+
+        Action copyAction = new Action( "Copy" )
+        {
+            public void run()
+            {
+                ldifEditorWidget.getSourceViewer().doOperation( SourceViewer.COPY );
+            }
+        };
+
+        Action pasteAction = new Action( "Paste" )
+        {
+            public void run()
+            {
+                ldifEditorWidget.getSourceViewer().doOperation( SourceViewer.PASTE );
+            }
+        };
+
+        bars.setGlobalActionHandler( ActionFactory.CUT.getId(), cutAction );
+        bars.setGlobalActionHandler( ActionFactory.COPY.getId(), copyAction );
+        bars.setGlobalActionHandler( ActionFactory.PASTE.getId(), pasteAction );
+
+        // TODO remove this
+        menuManager.add( ActionFactory.CUT.create( PlatformUI.getWorkbench().getActiveWorkbenchWindow() ) );
+        menuManager.add( ActionFactory.COPY.create( PlatformUI.getWorkbench().getActiveWorkbenchWindow() ) );
+        menuManager.add( ActionFactory.PASTE.create( PlatformUI.getWorkbench().getActiveWorkbenchWindow() ) );
+
+        menuManager.add( new Separator() );
+        menuManager.add( new RefreshAction( getEditor() ) );
+        menuManager.add( new FetchOperationalAttributesAction( getEditor() ) );
+        menuManager.add( new Separator() );
+        menuManager.add( new SimpleActionProxy( new EditorPagePropertiesAction( getEditor() ) ) );
+
+        setInput();
+
+        getTabItem().setControl( ldifEditorWidget.getControl() );
+    }
+
+
+    /**
+     * Adds the listener.
+     */
+    private void addListener()
+    {
+        ldifEditorWidget.addWidgetModifyListener( listener );
+    }
+
+
+    /**
+     * Removes the listener.
+     */
+    private void removeListener()
+    {
+        ldifEditorWidget.removeWidgetModifyListener( listener );
+    }
+
+
+    /**
+     * Updates the shared working copy entry.
+     */
+    private void updateSharedWorkingCopy()
+    {
+        LdifFile ldifModel = ldifEditorWidget.getLdifModel();
+
+        // only continue if the LDIF model is valid
+        LdifRecord[] records = ldifModel.getRecords();
+        if ( records.length != 1 || !( records[0] instanceof LdifContentRecord ) || !records[0].isValid()
+            || !records[0].getDnLine().isValid() )
+        {
+            return;
+        }
+        for ( LdifContainer ldifContainer : ldifModel.getContainers() )
+        {
+            if ( ldifContainer instanceof LdifInvalidContainer )
+            {
+                return;
+            }
+        }
+
+        // update shared working copy
+        try
+        {
+            LdifContentRecord modifiedRecord = ( LdifContentRecord ) records[0];
+            EntryEditorInput input = getEditor().getEntryEditorInput();
+            IEntry sharedWorkingCopyEntry = input.getSharedWorkingCopy( getEditor() );
+
+            IBrowserConnection browserConnection = input.getSharedWorkingCopy( getEditor() ).getBrowserConnection();
+            DummyEntry modifiedEntry = ModelConverter.ldifContentRecordToEntry( modifiedRecord, browserConnection );
+            ( ( DummyEntry ) sharedWorkingCopyEntry ).setDn( modifiedEntry.getDn() );
+            new CompoundModification().replaceAttributes( modifiedEntry, sharedWorkingCopyEntry, this );
+
+            // Increasing the update count
+            hasUpdatedSharedWorkingCopyCount++;
+        }
+        catch ( LdapInvalidDnException e )
+        {
+            throw new RuntimeException( e );
+        }
+    }
+
+
+    /**
+     * Sets the input to the LDIF Editor widget.
+     */
+    private void setInput()
+    {
+        removeListener();
+
+        if ( ldifEditorWidget != null )
+        {
+            SourceViewer sourceViewer = ldifEditorWidget.getSourceViewer();
+            IEntry entry = getEditor().getEntryEditorInput().getSharedWorkingCopy( getEditor() );
+            if ( entry != null )
+            {
+                // Making the source viewer editable
+                sourceViewer.setEditable( true );
+
+                // Showing the context menu
+                sourceViewer.getControl().setMenu( contextMenu );
+
+                // Assigning the content to the source viewer
+                sourceViewer.getDocument().set(
+                    ModelConverter.entryToLdifContentRecord( entry )
+                        .toFormattedString( Utils.getLdifFormatParameters() ) );
+            }
+            else
+            {
+                // Making the source viewer non editable
+                sourceViewer.setEditable( false );
+
+                // Hiding the context menu
+                sourceViewer.getControl().setMenu( null );
+
+                // Assigning a blank content to the source viewer
+                sourceViewer.getDocument().set( "" ); //$NON-NLS-1$
+            }
+        }
+
+        addListener();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void update()
+    {
+        // Checking if the editor page is the source of this update
+        if ( hasUpdatedSharedWorkingCopyCount != 0 )
+        {
+            // Decreasing the number of updates to be discarded
+            hasUpdatedSharedWorkingCopyCount--;
+        }
+        else
+        {
+            // Reseting the input
+            setInput();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setFocus()
+    {
+        // Nothing to do.
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void editorInputChanged()
+    {
+        if ( isInitialized() )
+        {
+            setInput();
+        }
+    }
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/Messages.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/Messages.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/Messages.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,31 @@
+package org.apache.directory.studio.combinededitor.editor;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.studio.combinededitor.editor.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+    private Messages()
+    {
+    }
+
+
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/MultiTabCombinedEntryEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/MultiTabCombinedEntryEditor.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/MultiTabCombinedEntryEditor.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/MultiTabCombinedEntryEditor.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,18 @@
+package org.apache.directory.studio.combinededitor.editor;
+
+
+/**
+ * An entry editor the opens entries in a single editor for each entry.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class MultiTabCombinedEntryEditor extends CombinedEntryEditor
+{
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isAutoSave()
+    {
+        return false;
+    }
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/SingleTabCombinedEntryEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/SingleTabCombinedEntryEditor.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/SingleTabCombinedEntryEditor.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/SingleTabCombinedEntryEditor.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,18 @@
+package org.apache.directory.studio.combinededitor.editor;
+
+
+/**
+ * An entry editor the opens all entries in one single editor tab.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class SingleTabCombinedEntryEditor extends CombinedEntryEditor
+{
+    /**
+    * {@inheritDoc}
+    */
+    public boolean isAutoSave()
+    {
+        return false;
+    }
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TableEditorPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TableEditorPage.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TableEditorPage.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TableEditorPage.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,164 @@
+package org.apache.directory.studio.combinededitor.editor;
+
+
+import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidget;
+import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidgetConfiguration;
+import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidgetUniversalListener;
+import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
+import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
+import org.apache.directory.studio.valueeditors.ValueEditorManager;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabItem;
+
+
+/**
+ * This class implements an editor page for the Table Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class TableEditorPage extends AbstractCombinedEntryEditorPage
+{
+    /** The entry editor widget */
+    private EntryEditorWidget entryEditorWidget;
+
+    /** The listener associated with the entry editor widget */
+    private EntryEditorWidgetUniversalListener listener;
+
+
+    /**
+     * Creates a new instance of TableEditorPage.
+     *
+     * @param editor
+     *      the associated editor
+     */
+    public TableEditorPage( CombinedEntryEditor editor )
+    {
+        super( editor );
+
+        // Creating and assigning the tab item
+        CTabItem tabItem = new CTabItem( editor.getTabFolder(), SWT.NONE );
+        tabItem.setText( Messages.getString( "TableEditorPage.TableEditor" ) ); //$NON-NLS-1$
+        tabItem
+            .setImage( BrowserUIPlugin.getDefault().getImage( BrowserUIConstants.IMG_BROWSER_SINGLETAB_ENTRYEDITOR ) );
+        setTabItem( tabItem );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void init()
+    {
+        super.init();
+
+        EditorConfiguration configuration = new EditorConfiguration();
+
+        entryEditorWidget = new EntryEditorWidget( configuration );
+        entryEditorWidget.createWidget( getEditor().getTabFolder() );
+
+        TableEditorPageActionGroup entryEditorActionGroup = new TableEditorPageActionGroup( getEditor(),
+            entryEditorWidget, configuration );
+
+        entryEditorActionGroup.fillToolBar( entryEditorWidget.getToolBarManager() );
+        entryEditorActionGroup.fillMenu( entryEditorWidget.getMenuManager() );
+        entryEditorActionGroup.fillContextMenu( entryEditorWidget.getContextMenuManager() );
+
+        setInput();
+
+        getEditor().getSite().setSelectionProvider( entryEditorWidget.getViewer() );
+        listener = new EntryEditorWidgetUniversalListener( entryEditorWidget.getViewer(), configuration,
+            entryEditorActionGroup, entryEditorActionGroup.getOpenDefaultEditorAction() );
+
+        entryEditorActionGroup.setInput( getEditor().getEntryEditorInput().getSharedWorkingCopy( getEditor() ) );
+
+        getEditor().getSite().setSelectionProvider( entryEditorWidget.getViewer() );
+
+        getTabItem().setControl( entryEditorWidget.getControl() );
+    }
+
+
+    /**
+     * Sets the input to the Entry Editor Widget.
+     */
+    private void setInput()
+    {
+        if ( entryEditorWidget != null )
+        {
+            entryEditorWidget.getViewer().setInput(
+                getEditor().getEntryEditorInput().getSharedWorkingCopy( getEditor() ) );
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void update()
+    {
+        if ( entryEditorWidget != null )
+        {
+            entryEditorWidget.getViewer().refresh();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setFocus()
+    {
+        if ( entryEditorWidget != null )
+        {
+            entryEditorWidget.setFocus();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void dispose()
+    {
+        if ( entryEditorWidget != null )
+        {
+            entryEditorWidget.dispose();
+        }
+
+        if ( listener != null )
+        {
+            listener.dispose();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void editorInputChanged()
+    {
+        if ( isInitialized() )
+        {
+            setInput();
+        }
+    }
+
+    /**
+     * A special configuration for the {@link TableEditorPage}.
+     */
+    class EditorConfiguration extends EntryEditorWidgetConfiguration
+    {
+        /**
+        * {@inheritDoc}
+        */
+        public ValueEditorManager getValueEditorManager( TreeViewer viewer )
+        {
+            if ( valueEditorManager == null )
+            {
+                valueEditorManager = new ValueEditorManager( viewer.getTree(), true, false );
+            }
+
+            return valueEditorManager;
+        }
+    }
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TableEditorPageActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TableEditorPageActionGroup.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TableEditorPageActionGroup.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TableEditorPageActionGroup.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,439 @@
+/*
+ *  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.combinededitor.editor;
+
+
+import org.apache.directory.studio.connection.ui.actions.CollapseAllAction;
+import org.apache.directory.studio.connection.ui.actions.ExpandAllAction;
+import org.apache.directory.studio.entryeditors.IEntryEditor;
+import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
+import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
+import org.apache.directory.studio.ldapbrowser.common.actions.DeleteAllValuesAction;
+import org.apache.directory.studio.ldapbrowser.common.actions.FetchOperationalAttributesAction;
+import org.apache.directory.studio.ldapbrowser.common.actions.NewAttributeAction;
+import org.apache.directory.studio.ldapbrowser.common.actions.RefreshAction;
+import org.apache.directory.studio.ldapbrowser.common.actions.proxy.EntryEditorActionProxy;
+import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EditAttributeDescriptionAction;
+import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidget;
+import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidgetActionGroup;
+import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidgetConfiguration;
+import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.OpenDefaultEditorAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.CopyAttributeDescriptionAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.CopyDnAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.CopySearchFilterAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.CopyUrlAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.CopyValueAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.LocateDnInDitAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.NewBatchOperationAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.NewSearchAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.OpenSchemaBrowserAction;
+import org.apache.directory.studio.ldapbrowser.ui.editors.entry.OpenEntryEditorAction;
+import org.apache.directory.studio.ldapbrowser.ui.editors.entry.OpenEntryEditorPreferencePageAction;
+import org.apache.directory.studio.utils.ActionUtils;
+import org.apache.directory.studio.valueeditors.ValueEditorManager;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ContributionItemFactory;
+
+import org.apache.directory.studio.templateeditor.actions.EditorPagePropertiesAction;
+
+
+/**
+ * The EntryEditorWidgetActionGroup manages all actions of the entry editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class TableEditorPageActionGroup extends EntryEditorWidgetActionGroup
+{
+    /** The open entry value editor action. */
+    private EntryEditorActionProxy openEntryValueEditorActionProxy;
+
+    /** The open entry editor preference page. */
+    private OpenEntryEditorPreferencePageAction openEntryEditorPreferencePage;
+
+    /** The collapse all action. */
+    private CollapseAllAction collapseAllAction;
+
+    /** The expand all action. */
+    private ExpandAllAction expandAllAction;
+
+    /** The Constant editAttributeDescriptionAction. */
+    private static final String editAttributeDescriptionAction = "editAttributeDescriptionAction"; //$NON-NLS-1$
+
+    /** The Constant refreshAttributesAction. */
+    private static final String refreshAttributesAction = "refreshAttributesAction"; //$NON-NLS-1$
+
+    /** The Constant newAttributeAction. */
+    private static final String newAttributeAction = "newAttributeAction"; //$NON-NLS-1$
+
+    /** The Constant newSearchAction. */
+    private static final String newSearchAction = "newSearchDialogAction"; //$NON-NLS-1$
+
+    /** The Constant newBatchOperationAction. */
+    private static final String newBatchOperationAction = "newBatchOperationAction"; //$NON-NLS-1$
+
+    /** The Constant copyDnAction. */
+    private static final String copyDnAction = "copyDnAction"; //$NON-NLS-1$
+
+    /** The Constant copyUrlAction. */
+    private static final String copyUrlAction = "copyUrlAction"; //$NON-NLS-1$
+
+    /** The Constant copyAttriuteDescriptionAction. */
+    private static final String copyAttriuteDescriptionAction = "copyAttriuteDescriptionAction"; //$NON-NLS-1$
+
+    /** The Constant copyDisplayValueAction. */
+    private static final String copyDisplayValueAction = "copyDisplayValueAction"; //$NON-NLS-1$
+
+    /** The Constant copyValueUtf8Action. */
+    private static final String copyValueUtf8Action = "copyValueUtf8Action"; //$NON-NLS-1$
+
+    /** The Constant copyValueBase64Action. */
+    private static final String copyValueBase64Action = "copyValueBase64Action"; //$NON-NLS-1$
+
+    /** The Constant copyValueHexAction. */
+    private static final String copyValueHexAction = "copyValueHexAction"; //$NON-NLS-1$
+
+    /** The Constant copyValueAsLdifAction. */
+    private static final String copyValueAsLdifAction = "copyValueAsLdifAction"; //$NON-NLS-1$
+
+    /** The Constant copySearchFilterAction. */
+    private static final String copySearchFilterAction = "copySearchFilterAction"; //$NON-NLS-1$
+
+    /** The Constant copyNotSearchFilterAction. */
+    private static final String copyNotSearchFilterAction = "copyNotSearchFilterAction"; //$NON-NLS-1$
+
+    /** The Constant copyAndSearchFilterAction. */
+    private static final String copyAndSearchFilterAction = "copyAndSearchFilterAction"; //$NON-NLS-1$
+
+    /** The Constant copyOrSearchFilterAction. */
+    private static final String copyOrSearchFilterAction = "copyOrSearchFilterAction"; //$NON-NLS-1$
+
+    /** The Constant deleteAllValuesAction. */
+    private static final String deleteAllValuesAction = "deleteAllValuesAction"; //$NON-NLS-1$
+
+    /** The Constant locateDnInDitAction. */
+    private static final String locateDnInDitAction = "locateDnInDitAction"; //$NON-NLS-1$
+
+    /** The Constant showOcdAction. */
+    private static final String showOcdAction = "showOcdAction"; //$NON-NLS-1$
+
+    /** The Constant showAtdAction. */
+    private static final String showAtdAction = "showAtdAction"; //$NON-NLS-1$
+
+    /** The Constant showEqualityMrdAction. */
+    private static final String showEqualityMrdAction = "showEqualityMrdAction"; //$NON-NLS-1$
+
+    /** The Constant showSubstringMrdAction. */
+    private static final String showSubstringMrdAction = "showSubstringMrdAction"; //$NON-NLS-1$
+
+    /** The Constant showOrderingMrdAction. */
+    private static final String showOrderingMrdAction = "showOrderingMrdAction"; //$NON-NLS-1$
+
+    /** The Constant showLsdAction. */
+    private static final String showLsdAction = "showLsdAction"; //$NON-NLS-1$
+
+    /** The Constant fetchOperationalAttributesAction. */
+    private static final String fetchOperationalAttributesAction = "fetchOperationalAttributesAction"; //$NON-NLS-1$
+
+
+    /**
+     * Creates a new instance of TableEditorPageActionGroup.
+     * @param editor 
+     * 
+     * @param entryEditor the entry editor
+     * @param configuration the configuration
+     */
+    public TableEditorPageActionGroup( IEntryEditor entryEditor, EntryEditorWidget mainWidget,
+        EntryEditorWidgetConfiguration configuration )
+    {
+        super( mainWidget, configuration );
+
+        TreeViewer viewer = mainWidget.getViewer();
+        ValueEditorManager valueEditorManager = configuration.getValueEditorManager( viewer );
+
+        // create OpenDefaultEditorAction with enabled rename action flag
+        openDefaultValueEditorActionProxy.dispose();
+        openDefaultValueEditorActionProxy = new EntryEditorActionProxy( viewer, new OpenDefaultEditorAction( viewer,
+            openBestValueEditorActionProxy ) );
+
+        openEntryValueEditorActionProxy = new EntryEditorActionProxy( viewer, new OpenEntryEditorAction( viewer,
+            valueEditorManager, valueEditorManager.getEntryValueEditor(), this ) );
+
+        openEntryEditorPreferencePage = new OpenEntryEditorPreferencePageAction();
+        collapseAllAction = new CollapseAllAction( viewer );
+        expandAllAction = new ExpandAllAction( viewer );
+
+        entryEditorActionMap.put( editAttributeDescriptionAction, new EntryEditorActionProxy( viewer,
+            new EditAttributeDescriptionAction( viewer ) ) );
+
+        entryEditorActionMap.put( refreshAttributesAction, new EntryEditorActionProxy( viewer, new RefreshAction() ) );
+
+        entryEditorActionMap.put( newAttributeAction, new EntryEditorActionProxy( viewer, new NewAttributeAction() ) );
+        entryEditorActionMap.put( newSearchAction, new EntryEditorActionProxy( viewer, new NewSearchAction() ) );
+        entryEditorActionMap.put( newBatchOperationAction, new EntryEditorActionProxy( viewer,
+            new NewBatchOperationAction() ) );
+
+        entryEditorActionMap.put( locateDnInDitAction, new EntryEditorActionProxy( viewer, new LocateDnInDitAction() ) );
+        entryEditorActionMap.put( showOcdAction, new EntryEditorActionProxy( viewer, new OpenSchemaBrowserAction(
+            OpenSchemaBrowserAction.MODE_OBJECTCLASS ) ) );
+        entryEditorActionMap.put( showAtdAction, new EntryEditorActionProxy( viewer, new OpenSchemaBrowserAction(
+            OpenSchemaBrowserAction.MODE_ATTRIBUTETYPE ) ) );
+        entryEditorActionMap.put( showEqualityMrdAction, new EntryEditorActionProxy( viewer,
+            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_EQUALITYMATCHINGRULE ) ) );
+        entryEditorActionMap.put( showSubstringMrdAction, new EntryEditorActionProxy( viewer,
+            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_SUBSTRINGMATCHINGRULE ) ) );
+        entryEditorActionMap.put( showOrderingMrdAction, new EntryEditorActionProxy( viewer,
+            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_ORDERINGMATCHINGRULE ) ) );
+        entryEditorActionMap.put( showLsdAction, new EntryEditorActionProxy( viewer, new OpenSchemaBrowserAction(
+            OpenSchemaBrowserAction.MODE_SYNTAX ) ) );
+
+        entryEditorActionMap.put( copyDnAction, new EntryEditorActionProxy( viewer, new CopyDnAction() ) );
+        entryEditorActionMap.put( copyUrlAction, new EntryEditorActionProxy( viewer, new CopyUrlAction() ) );
+        entryEditorActionMap.put( copyAttriuteDescriptionAction, new EntryEditorActionProxy( viewer,
+            new CopyAttributeDescriptionAction() ) );
+        entryEditorActionMap.put( copyDisplayValueAction, new EntryEditorActionProxy( viewer, new CopyValueAction(
+            CopyValueAction.Mode.DISPLAY, valueEditorManager ) ) );
+        entryEditorActionMap.put( copyValueUtf8Action, new EntryEditorActionProxy( viewer, new CopyValueAction(
+            CopyValueAction.Mode.UTF8, valueEditorManager ) ) );
+        entryEditorActionMap.put( copyValueBase64Action, new EntryEditorActionProxy( viewer, new CopyValueAction(
+            CopyValueAction.Mode.BASE64, valueEditorManager ) ) );
+        entryEditorActionMap.put( copyValueHexAction, new EntryEditorActionProxy( viewer, new CopyValueAction(
+            CopyValueAction.Mode.HEX, valueEditorManager ) ) );
+        entryEditorActionMap.put( copyValueAsLdifAction, new EntryEditorActionProxy( viewer, new CopyValueAction(
+            CopyValueAction.Mode.LDIF, valueEditorManager ) ) );
+
+        entryEditorActionMap.put( copySearchFilterAction, new EntryEditorActionProxy( viewer,
+            new CopySearchFilterAction( CopySearchFilterAction.MODE_EQUALS ) ) );
+        entryEditorActionMap.put( copyNotSearchFilterAction, new EntryEditorActionProxy( viewer,
+            new CopySearchFilterAction( CopySearchFilterAction.MODE_NOT ) ) );
+        entryEditorActionMap.put( copyAndSearchFilterAction, new EntryEditorActionProxy( viewer,
+            new CopySearchFilterAction( CopySearchFilterAction.MODE_AND ) ) );
+        entryEditorActionMap.put( copyOrSearchFilterAction, new EntryEditorActionProxy( viewer,
+            new CopySearchFilterAction( CopySearchFilterAction.MODE_OR ) ) );
+
+        entryEditorActionMap.put( deleteAllValuesAction, new EntryEditorActionProxy( viewer,
+            new DeleteAllValuesAction() ) );
+        entryEditorActionMap.put( fetchOperationalAttributesAction, new EntryEditorActionProxy( viewer,
+            new FetchOperationalAttributesAction() ) );
+
+        entryEditorActionMap.put( propertyDialogAction, new EntryEditorActionProxy( viewer,
+            new EditorPagePropertiesAction( entryEditor ) ) );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void dispose()
+    {
+        if ( expandAllAction != null )
+        {
+            deactivateGlobalActionHandlers();
+
+            openEntryValueEditorActionProxy.dispose();
+            openEntryValueEditorActionProxy = null;
+            openEntryEditorPreferencePage = null;
+            expandAllAction.dispose();
+            expandAllAction = null;
+            collapseAllAction.dispose();
+            collapseAllAction = null;
+        }
+
+        super.dispose();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void fillToolBar( IToolBarManager toolBarManager )
+    {
+        toolBarManager.add( new Separator() );
+        toolBarManager.add( entryEditorActionMap.get( newValueAction ) );
+        toolBarManager.add( entryEditorActionMap.get( newAttributeAction ) );
+        toolBarManager.add( new Separator() );
+        toolBarManager.add( entryEditorActionMap.get( deleteAction ) );
+        toolBarManager.add( entryEditorActionMap.get( deleteAllValuesAction ) );
+        toolBarManager.add( new Separator() );
+        toolBarManager.add( entryEditorActionMap.get( refreshAttributesAction ) );
+        toolBarManager.add( new Separator() );
+        toolBarManager.add( expandAllAction );
+        toolBarManager.add( collapseAllAction );
+        toolBarManager.add( new Separator() );
+        toolBarManager.add( showQuickFilterAction );
+        toolBarManager.update( true );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void fillMenu( IMenuManager menuManager )
+    {
+        menuManager.add( openSortDialogAction );
+        menuManager.add( new Separator() );
+        menuManager.add( showDecoratedValuesAction );
+        menuManager.add( new Separator() );
+        menuManager.add( openEntryEditorPreferencePage );
+        menuManager.addMenuListener( new IMenuListener()
+        {
+            public void menuAboutToShow( IMenuManager manager )
+            {
+                showDecoratedValuesAction.setChecked( !BrowserCommonActivator.getDefault().getPreferenceStore()
+                    .getBoolean( BrowserCommonConstants.PREFERENCE_SHOW_RAW_VALUES ) );
+            }
+        } );
+        menuManager.update( true );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void contextMenuAboutToShow( IMenuManager menuManager )
+    {
+        // new
+        menuManager.add( entryEditorActionMap.get( newAttributeAction ) );
+        menuManager.add( entryEditorActionMap.get( newValueAction ) );
+        menuManager.add( entryEditorActionMap.get( newSearchAction ) );
+        menuManager.add( entryEditorActionMap.get( newBatchOperationAction ) );
+        menuManager.add( new Separator() );
+
+        // navigation
+        menuManager.add( entryEditorActionMap.get( locateDnInDitAction ) );
+        MenuManager schemaMenuManager = new MenuManager( Messages
+            .getString( "TableEditorPageActionGroup.OpenSchemaBrowser" ) ); //$NON-NLS-1$
+        schemaMenuManager.add( entryEditorActionMap.get( showOcdAction ) );
+        schemaMenuManager.add( entryEditorActionMap.get( showAtdAction ) );
+        schemaMenuManager.add( entryEditorActionMap.get( showEqualityMrdAction ) );
+        schemaMenuManager.add( entryEditorActionMap.get( showSubstringMrdAction ) );
+        schemaMenuManager.add( entryEditorActionMap.get( showOrderingMrdAction ) );
+        schemaMenuManager.add( entryEditorActionMap.get( showLsdAction ) );
+        menuManager.add( schemaMenuManager );
+        MenuManager showInSubMenu = new MenuManager( Messages.getString( "TableEditorPageActionGroup.ShowIn" ) ); //$NON-NLS-1$
+        showInSubMenu.add( ContributionItemFactory.VIEWS_SHOW_IN.create( PlatformUI.getWorkbench()
+            .getActiveWorkbenchWindow() ) );
+        menuManager.add( showInSubMenu );
+
+        menuManager.add( new Separator() );
+
+        // copy, paste, delete
+        menuManager.add( entryEditorActionMap.get( copyAction ) );
+        menuManager.add( entryEditorActionMap.get( pasteAction ) );
+        menuManager.add( entryEditorActionMap.get( deleteAction ) );
+        menuManager.add( entryEditorActionMap.get( selectAllAction ) );
+        MenuManager advancedMenuManager = new MenuManager( Messages.getString( "TableEditorPageActionGroup.Advanced" ) ); //$NON-NLS-1$
+        advancedMenuManager.add( entryEditorActionMap.get( copyDnAction ) );
+        advancedMenuManager.add( entryEditorActionMap.get( copyUrlAction ) );
+        advancedMenuManager.add( new Separator() );
+        advancedMenuManager.add( entryEditorActionMap.get( copyAttriuteDescriptionAction ) );
+        advancedMenuManager.add( new Separator() );
+        advancedMenuManager.add( entryEditorActionMap.get( copyDisplayValueAction ) );
+        advancedMenuManager.add( entryEditorActionMap.get( copyValueUtf8Action ) );
+        advancedMenuManager.add( entryEditorActionMap.get( copyValueBase64Action ) );
+        advancedMenuManager.add( entryEditorActionMap.get( copyValueHexAction ) );
+        advancedMenuManager.add( new Separator() );
+        advancedMenuManager.add( entryEditorActionMap.get( copyValueAsLdifAction ) );
+        advancedMenuManager.add( new Separator() );
+        advancedMenuManager.add( entryEditorActionMap.get( copySearchFilterAction ) );
+        advancedMenuManager.add( entryEditorActionMap.get( copyNotSearchFilterAction ) );
+        advancedMenuManager.add( entryEditorActionMap.get( copyAndSearchFilterAction ) );
+        advancedMenuManager.add( entryEditorActionMap.get( copyOrSearchFilterAction ) );
+        advancedMenuManager.add( new Separator() );
+        advancedMenuManager.add( entryEditorActionMap.get( deleteAllValuesAction ) );
+        menuManager.add( advancedMenuManager );
+        menuManager.add( new Separator() );
+
+        // edit
+        menuManager.add( entryEditorActionMap.get( editAttributeDescriptionAction ) );
+        super.addEditMenu( menuManager );
+        menuManager.add( openEntryValueEditorActionProxy );
+        menuManager.add( new Separator() );
+
+        // refresh
+        menuManager.add( entryEditorActionMap.get( refreshAttributesAction ) );
+        if ( entryEditorActionMap.get( fetchOperationalAttributesAction ).isEnabled() )
+        {
+            menuManager.add( entryEditorActionMap.get( fetchOperationalAttributesAction ) );
+        }
+        menuManager.add( new Separator() );
+
+        // additions
+        menuManager.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
+
+        // properties
+        menuManager.add( entryEditorActionMap.get( propertyDialogAction ) );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void activateGlobalActionHandlers()
+    {
+        if ( actionBars != null )
+        {
+            actionBars.setGlobalActionHandler( ActionFactory.REFRESH.getId(), entryEditorActionMap
+                .get( refreshAttributesAction ) );
+        }
+
+        super.activateGlobalActionHandlers();
+
+        IAction naa = entryEditorActionMap.get( newAttributeAction );
+        ActionUtils.activateActionHandler( naa );
+        IAction lid = entryEditorActionMap.get( locateDnInDitAction );
+        ActionUtils.activateActionHandler( lid );
+        IAction eada = entryEditorActionMap.get( editAttributeDescriptionAction );
+        ActionUtils.activateActionHandler( eada );
+        ActionUtils.activateActionHandler( openEntryValueEditorActionProxy );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void deactivateGlobalActionHandlers()
+    {
+        if ( actionBars != null )
+        {
+            actionBars.setGlobalActionHandler( ActionFactory.REFRESH.getId(), null );
+        }
+
+        super.deactivateGlobalActionHandlers();
+
+        IAction naa = entryEditorActionMap.get( newAttributeAction );
+        ActionUtils.deactivateActionHandler( naa );
+        IAction lid = entryEditorActionMap.get( locateDnInDitAction );
+        ActionUtils.deactivateActionHandler( lid );
+        IAction eada = entryEditorActionMap.get( editAttributeDescriptionAction );
+        ActionUtils.deactivateActionHandler( eada );
+        ActionUtils.deactivateActionHandler( openEntryValueEditorActionProxy );
+    }
+
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TemplateEditorPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TemplateEditorPage.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TemplateEditorPage.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/TemplateEditorPage.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,136 @@
+package org.apache.directory.studio.combinededitor.editor;
+
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabItem;
+
+import org.apache.directory.studio.templateeditor.EntryTemplatePlugin;
+import org.apache.directory.studio.templateeditor.EntryTemplatePluginConstants;
+import org.apache.directory.studio.templateeditor.editor.TemplateEditorWidget;
+import org.apache.directory.studio.templateeditor.model.Template;
+
+
+/**
+ * This class implements an editor page for the Template Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class TemplateEditorPage extends AbstractCombinedEntryEditorPage
+{
+    /** The template editor widget */
+    private TemplateEditorWidget templateEditorWidget;
+
+
+    /**
+     * Creates a new instance of TemplateEditorPage.
+     *
+     * @param editor
+     *      the associated editor
+     */
+    public TemplateEditorPage( CombinedEntryEditor editor )
+    {
+        super( editor );
+
+        // Creating and assigning the tab item
+        CTabItem tabItem = new CTabItem( editor.getTabFolder(), SWT.NONE );
+        tabItem.setText( Messages.getString( "TemplateEditorPage.TemplateEditor" ) ); //$NON-NLS-1$
+        tabItem.setImage( EntryTemplatePlugin.getDefault().getImage( EntryTemplatePluginConstants.IMG_TEMPLATE ) );
+        setTabItem( tabItem );
+
+        // Creating the template editor widget
+        templateEditorWidget = new TemplateEditorWidget( editor );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void init()
+    {
+        if ( templateEditorWidget != null )
+        {
+            // Initializing the template editor widget
+            templateEditorWidget.init( getEditor().getTabFolder() );
+
+            // Updating the editor's tab folder to force the attachment of the new form
+            getTabItem().setControl( templateEditorWidget.getForm() );
+            getEditor().getTabFolder().update();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void dispose()
+    {
+        if ( templateEditorWidget != null )
+        {
+            // Disposing the template editor widget
+            templateEditorWidget.dispose();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void update()
+    {
+        if ( templateEditorWidget != null )
+        {
+            // Updating the template editor widget
+            templateEditorWidget.update();
+
+            // Updating the editor's tab folder to force the attachment of the new form
+            getTabItem().setControl( templateEditorWidget.getForm() );
+            getEditor().getTabFolder().update();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setFocus()
+    {
+        if ( templateEditorWidget != null )
+        {
+            // Setting focus on the template editor widget
+            templateEditorWidget.setFocus();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void editorInputChanged()
+    {
+        if ( templateEditorWidget != null )
+        {
+            // Changing the editor input on the template editor widget
+            templateEditorWidget.editorInputChanged();
+
+            // Updating the editor's tab folder to force the attachment of the new form
+            getTabItem().setControl( templateEditorWidget.getForm() );
+            getEditor().getTabFolder().update();
+        }
+    }
+
+
+    /**
+     * This method is called by the editor when a 'Switch Template' event occurs.
+     *
+     * @param templateEditorWidget
+     *      the template editor widget
+     * @param template
+     *      the template
+     */
+    public void templateSwitched( TemplateEditorWidget templateEditorWidget, Template template )
+    {
+        // Updating the editor's tab folder to force the attachment of the new form
+        getTabItem().setControl( templateEditorWidget.getForm() );
+        getEditor().getTabFolder().update();
+    }
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1,12 @@
+LdifEditorPage.LDIFEditor=LDIF Editor
+
+TableEditorPage.TableEditor=Table Editor
+
+TableEditorPageActionGroup.Advanced=Advanced
+TableEditorPageActionGroup.OpenSchemaBrowser=Open Schema Browser
+TableEditorPageActionGroup.ShowIn=Show In
+
+TemplateEditorPage.NoEntrySelected=No Entry Selected
+TemplateEditorPage.NoTemplateIsMatchingThisEntry=No template is matching this entry
+TemplateEditorPage.TemplateEditor=Template Editor
+TemplateEditorPage.UnableToDisplayTheEntry=Unable to display the entry

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages_de.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages_de.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages_de.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1,13 @@
+
+LdifEditorPage.LDIFEditor=LDIF-Editor
+
+TableEditorPage.TableEditor=Tabellen-Editor
+
+TableEditorPageActionGroup.Advanced=Erweitert
+TableEditorPageActionGroup.OpenSchemaBrowser=\u00D6ffne Schema Browser
+TableEditorPageActionGroup.ShowIn  =Anzeigen in
+
+TemplateEditorPage.NoEntrySelected=Kein Eintrag ausgew\u00E4hlt
+TemplateEditorPage.NoTemplateIsMatchingThisEntry=Kein passendes Template f\u00FCr diesen Eintrag
+TemplateEditorPage.TemplateEditor =Template-Editor
+TemplateEditorPage.UnableToDisplayTheEntry=Der Eintrag kann nicht angezeigt werden

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages_fr.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages_fr.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/editor/messages_fr.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1,12 @@
+LdifEditorPage.LDIFEditor=Editeur LDIF
+
+TableEditorPage.TableEditor=Editeur Tabulaire
+
+TableEditorPageActionGroup.Advanced=Avanc\u00E9
+TableEditorPageActionGroup.OpenSchemaBrowser=Ouvrir le navigateur de sch\u00E9ma
+TableEditorPageActionGroup.ShowIn=Afficher dans
+
+TemplateEditorPage.NoEntrySelected=Aucune entrée sélectionnée
+TemplateEditorPage.NoTemplateIsMatchingThisEntry=Aucun modèle ne correspond à cette entrée
+TemplateEditorPage.TemplateEditor=Editeur Formaté
+TemplateEditorPage.UnableToDisplayTheEntry=Impossible d'afficher l'entrée
\ No newline at end of file

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1 @@
+CombinedEditorPlugin.UnableToGetPluginProperties=Unable to get the plugin properties.

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages_de.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages_de.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages_de.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1 @@
+CombinedEditorPlugin.UnableToGetPluginProperties=Plugin Eigenschaften konnten nicht geladen werden
\ No newline at end of file

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages_fr.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages_fr.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/messages_fr.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1 @@
+CombinedEditorPlugin.UnableToGetPluginProperties=Impossible de r\u00E9cup\u00E9rer les propri\u00E9t\u00E9s de ce plugin
\ No newline at end of file

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/CombinedEntryEditorPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/CombinedEntryEditorPreferencePage.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/CombinedEntryEditorPreferencePage.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/CombinedEntryEditorPreferencePage.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,407 @@
+package org.apache.directory.studio.combinededitor.preferences;
+
+
+import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+import org.apache.directory.studio.combinededitor.CombinedEditorPlugin;
+import org.apache.directory.studio.combinededitor.CombinedEditorPluginConstants;
+import org.apache.directory.studio.templateeditor.EntryTemplatePlugin;
+
+
+/**
+ * This class implements the Combined Entry Editor preference page.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class CombinedEntryEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage
+{
+    /** The preferences store */
+    private IPreferenceStore store;
+
+    // UI Fields
+    private Button defaultEditorTemplateRadioButton;
+    private Button autoSwitchToOtherEditorCheckbox;
+    private Button autoSwitchToTableEditorRadioButton;
+    private Button autoSwitchToLDIFEditorRadioButton;
+    private Label autoSwitchLabel;
+    private Button defaultEditorTableRadioButton;
+    private Button defaultEditorLDIFRadioButton;
+
+
+    /**
+     * Creates a new instance of CombinedEntryEditorPreferencePage.
+     */
+    public CombinedEntryEditorPreferencePage()
+    {
+        super();
+        super.setPreferenceStore( EntryTemplatePlugin.getDefault().getPreferenceStore() );
+        super.setDescription( Messages.getString( "CombinedEntryEditorPreferencePage.PrefPageDescription" ) ); //$NON-NLS-1$
+
+        store = CombinedEditorPlugin.getDefault().getPreferenceStore();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void init( IWorkbench workbench )
+    {
+        // Nothing to do
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Control createContents( Composite parent )
+    {
+        Composite composite = new Composite( parent, SWT.NONE );
+        composite.setLayout( new GridLayout() );
+        composite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
+
+        createUI( composite );
+        initListeners();
+        initUI();
+
+        return composite;
+    }
+
+
+    /**
+     * Creates the user interface.
+     *
+     * @param parent
+     *      the parent composite
+     */
+    private void createUI( Composite parent )
+    {
+        // Main Composite
+        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );
+
+        // Default Editor Group
+        Group defaultEditorGroup = BaseWidgetUtils.createGroup( composite, Messages
+            .getString( "CombinedEntryEditorPreferencePage.UseAsDefaultEditor" ), 1 ); //$NON-NLS-1$
+        defaultEditorGroup.setLayout( new GridLayout( 4, false ) );
+
+        // Template Editor Radio Button
+        defaultEditorTemplateRadioButton = BaseWidgetUtils.createRadiobutton( defaultEditorGroup, Messages
+            .getString( "CombinedEntryEditorPreferencePage.TemplateEditor" ), 1 ); //$NON-NLS-1$
+        defaultEditorTemplateRadioButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
+
+        // Indent
+        BaseWidgetUtils.createRadioIndent( defaultEditorGroup, 1 );
+
+        // Auto Switch Checkbox
+        autoSwitchToOtherEditorCheckbox = BaseWidgetUtils.createCheckbox( defaultEditorGroup, Messages
+            .getString( "CombinedEntryEditorPreferencePage.AutoSwitchToFollowingTabNoTemplateAvailable" ), 1 ); //$NON-NLS-1$
+        autoSwitchToOtherEditorCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 3, 1 ) );
+
+        // Indent
+        BaseWidgetUtils.createRadioIndent( defaultEditorGroup, 1 );
+
+        // Indent
+        BaseWidgetUtils.createRadioIndent( defaultEditorGroup, 1 );
+
+        // Table Editor Radio Button
+        autoSwitchToTableEditorRadioButton = BaseWidgetUtils.createRadiobutton( defaultEditorGroup, Messages
+            .getString( "CombinedEntryEditorPreferencePage.TableEditor" ), 1 ); //$NON-NLS-1$
+
+        // Table Editor Radio Button
+        autoSwitchToLDIFEditorRadioButton = BaseWidgetUtils.createRadiobutton( defaultEditorGroup, Messages
+            .getString( "CombinedEntryEditorPreferencePage.LDIFEditor" ), 1 ); //$NON-NLS-1$
+
+        // Indent
+        BaseWidgetUtils.createRadioIndent( defaultEditorGroup, 1 );
+
+        // Auto Switch Label
+        autoSwitchLabel = BaseWidgetUtils.createLabel( defaultEditorGroup, Messages
+            .getString( "CombinedEntryEditorPreferencePage.AutoSwitchNote" ), //$NON-NLS-1$
+            1 );
+        autoSwitchLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 3, 1 ) );
+
+        // Table Editor Radio Button
+        defaultEditorTableRadioButton = BaseWidgetUtils.createRadiobutton( defaultEditorGroup, Messages
+            .getString( "CombinedEntryEditorPreferencePage.TableEditor" ), 1 ); //$NON-NLS-1$
+        defaultEditorTableRadioButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
+
+        // LDIF Editor Radio Button
+        defaultEditorLDIFRadioButton = BaseWidgetUtils.createRadiobutton( defaultEditorGroup, Messages
+            .getString( "CombinedEntryEditorPreferencePage.LDIFEditor" ), 1 ); //$NON-NLS-1$
+        defaultEditorLDIFRadioButton.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
+    }
+
+
+    /**
+     * Initializes the listeners
+     */
+    private void initListeners()
+    {
+        defaultEditorTemplateRadioButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                defaultEditorTemplateAction();
+            }
+        } );
+
+        autoSwitchToOtherEditorCheckbox.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                autoSwitchToOtherEditorAction();
+            }
+        } );
+
+        autoSwitchToTableEditorRadioButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                autoSwitchToTableEditorAction();
+            }
+        } );
+
+        autoSwitchToLDIFEditorRadioButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                autoSwitchToLDIFEditorAction();
+            }
+        } );
+
+        defaultEditorTableRadioButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                defaultEditorTableAction();
+            }
+        } );
+
+        defaultEditorLDIFRadioButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                defaultEditorLDIFAction();
+            }
+        } );
+    }
+
+
+    /**
+     * This method is called when the 'Default Editor Template Radio Button' is clicked.
+     */
+    private void defaultEditorTemplateAction()
+    {
+        defaultEditorTemplateRadioButton.setSelection( true );
+        defaultEditorTableRadioButton.setSelection( false );
+        defaultEditorLDIFRadioButton.setSelection( false );
+
+        autoSwitchToOtherEditorCheckbox.setEnabled( true );
+        autoSwitchToTableEditorRadioButton.setEnabled( autoSwitchToOtherEditorCheckbox.getSelection() );
+        autoSwitchToLDIFEditorRadioButton.setEnabled( autoSwitchToOtherEditorCheckbox.getSelection() );
+        autoSwitchLabel.setEnabled( true );
+    }
+
+
+    /**
+     * This method is called when the 'Auto Switch To Other Editor Checkbox' is clicked.
+     */
+    private void autoSwitchToOtherEditorAction()
+    {
+        autoSwitchToTableEditorRadioButton.setEnabled( autoSwitchToOtherEditorCheckbox.getSelection() );
+        autoSwitchToLDIFEditorRadioButton.setEnabled( autoSwitchToOtherEditorCheckbox.getSelection() );
+        autoSwitchLabel.setEnabled( autoSwitchToOtherEditorCheckbox.getSelection() );
+    }
+
+
+    /**
+     * This method is called when the 'Auto Switch To Table Editor Radio Button' is clicked.
+     */
+    private void autoSwitchToTableEditorAction()
+    {
+        autoSwitchToTableEditorRadioButton.setSelection( true );
+        autoSwitchToLDIFEditorRadioButton.setSelection( false );
+    }
+
+
+    /**
+     * This method is called when the 'Auto Switch To LDIF Editor Radio Button' is clicked.
+     */
+    private void autoSwitchToLDIFEditorAction()
+    {
+        autoSwitchToTableEditorRadioButton.setSelection( false );
+        autoSwitchToLDIFEditorRadioButton.setSelection( true );
+    }
+
+
+    /**
+     * This method is called when the 'Default Editor Table Radio Button' is clicked.
+     */
+    private void defaultEditorTableAction()
+    {
+        defaultEditorTemplateRadioButton.setSelection( false );
+        defaultEditorTableRadioButton.setSelection( true );
+        defaultEditorLDIFRadioButton.setSelection( false );
+
+        autoSwitchToOtherEditorCheckbox.setEnabled( false );
+        autoSwitchToTableEditorRadioButton.setEnabled( false );
+        autoSwitchToLDIFEditorRadioButton.setEnabled( false );
+        autoSwitchLabel.setEnabled( false );
+    }
+
+
+    /**
+     * This method is called when the 'Default Editor LDIF Radio Button' is clicked.
+     */
+    private void defaultEditorLDIFAction()
+    {
+        defaultEditorTemplateRadioButton.setSelection( false );
+        defaultEditorTableRadioButton.setSelection( false );
+        defaultEditorLDIFRadioButton.setSelection( true );
+
+        autoSwitchToOtherEditorCheckbox.setEnabled( false );
+        autoSwitchToTableEditorRadioButton.setEnabled( false );
+        autoSwitchToLDIFEditorRadioButton.setEnabled( false );
+        autoSwitchLabel.setEnabled( false );
+    }
+
+
+    /**
+     * Initializes the User Interface.
+     */
+    private void initUI()
+    {
+        initUI( store.getInt( CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR ), store
+            .getBoolean( CombinedEditorPluginConstants.PREF_AUTO_SWITCH_TO_ANOTHER_EDITOR ), store
+            .getInt( CombinedEditorPluginConstants.PREF_AUTO_SWITCH_EDITOR ) );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void performDefaults()
+    {
+        initUI( store.getDefaultInt( CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR ), store
+            .getDefaultBoolean( CombinedEditorPluginConstants.PREF_AUTO_SWITCH_TO_ANOTHER_EDITOR ), store
+            .getDefaultInt( CombinedEditorPluginConstants.PREF_AUTO_SWITCH_EDITOR ) );
+
+        super.performDefaults();
+    }
+
+
+    /**
+     * Initializes the UI.
+     *
+     * @param defaultEditor
+     *      the default editor
+     * @param autoSwitchToOtherEditor
+     *      the auto switch to other editor
+     * @param autoSwitchEditor
+     *      the auto switch editor
+     */
+    private void initUI( int defaultEditor, boolean autoSwitchToOtherEditor, int autoSwitchEditor )
+    {
+        // Default Editor
+        if ( defaultEditor == CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_TEMPLATE )
+        {
+            defaultEditorTemplateRadioButton.setSelection( true );
+            defaultEditorTableRadioButton.setSelection( false );
+            defaultEditorLDIFRadioButton.setSelection( false );
+        }
+        else if ( defaultEditor == CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_TABLE )
+        {
+            defaultEditorTemplateRadioButton.setSelection( false );
+            defaultEditorTableRadioButton.setSelection( true );
+            defaultEditorLDIFRadioButton.setSelection( false );
+        }
+        else if ( defaultEditor == CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_LDIF )
+        {
+            defaultEditorTemplateRadioButton.setSelection( false );
+            defaultEditorTableRadioButton.setSelection( false );
+            defaultEditorLDIFRadioButton.setSelection( true );
+        }
+
+        // Auto Switch
+        autoSwitchToOtherEditorCheckbox.setEnabled( defaultEditorTemplateRadioButton.getSelection() );
+        autoSwitchToOtherEditorCheckbox.setSelection( autoSwitchToOtherEditor );
+
+        // Auto Switch Editor
+        autoSwitchToTableEditorRadioButton.setEnabled( defaultEditorTemplateRadioButton.getSelection()
+            && autoSwitchToOtherEditorCheckbox.getSelection() );
+        autoSwitchToLDIFEditorRadioButton.setEnabled( defaultEditorTemplateRadioButton.getSelection()
+            && autoSwitchToOtherEditorCheckbox.getSelection() );
+        if ( autoSwitchEditor == CombinedEditorPluginConstants.PREF_AUTO_SWITCH_EDITOR_TABLE )
+        {
+            autoSwitchToTableEditorRadioButton.setSelection( true );
+            autoSwitchToLDIFEditorRadioButton.setSelection( false );
+        }
+        else if ( autoSwitchEditor == CombinedEditorPluginConstants.PREF_AUTO_SWITCH_EDITOR_LDIF )
+        {
+            autoSwitchToTableEditorRadioButton.setSelection( false );
+            autoSwitchToLDIFEditorRadioButton.setSelection( true );
+        }
+        autoSwitchLabel.setEnabled( defaultEditorTemplateRadioButton.getSelection() );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean performOk()
+    {
+        // Default Editor
+        if ( defaultEditorTemplateRadioButton.getSelection() )
+        {
+            store.setValue( CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR,
+                CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_TEMPLATE );
+        }
+        else if ( defaultEditorTableRadioButton.getSelection() )
+        {
+            store.setValue( CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR,
+                CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_TABLE );
+        }
+        else if ( defaultEditorLDIFRadioButton.getSelection() )
+        {
+            store.setValue( CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR,
+                CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_LDIF );
+        }
+
+        if ( defaultEditorTemplateRadioButton.getSelection() )
+        {
+            store.setValue( CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR,
+                CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_TEMPLATE );
+        }
+
+        // Auto Switch
+        store.setValue( CombinedEditorPluginConstants.PREF_AUTO_SWITCH_TO_ANOTHER_EDITOR,
+            autoSwitchToOtherEditorCheckbox.getSelection() );
+
+        // Auto Switch Editor
+        if ( autoSwitchToTableEditorRadioButton.getSelection() )
+        {
+            store.setValue( CombinedEditorPluginConstants.PREF_AUTO_SWITCH_EDITOR,
+                CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_TEMPLATE );
+        }
+        else if ( autoSwitchToLDIFEditorRadioButton.getSelection() )
+        {
+            store.setValue( CombinedEditorPluginConstants.PREF_AUTO_SWITCH_EDITOR,
+                CombinedEditorPluginConstants.PREF_DEFAULT_EDITOR_TABLE );
+        }
+
+        return true;
+    }
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/Messages.java?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/Messages.java (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/Messages.java Tue Mar 31 09:56:35 2015
@@ -0,0 +1,31 @@
+package org.apache.directory.studio.combinededitor.preferences;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.studio.combinededitor.preferences.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+    private Messages()
+    {
+    }
+
+
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+}

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1,7 @@
+CombinedEntryEditorPreferencePage.AutoSwitchNote=Note: When this option is enabled, the editor automatically switches to the\ntab of your choice if the given entry does not match any enabled template.
+CombinedEntryEditorPreferencePage.AutoSwitchToFollowingTabNoTemplateAvailable=Auto switch to the following tab if no template is available:
+CombinedEntryEditorPreferencePage.LDIFEditor=LDIF Editor
+CombinedEntryEditorPreferencePage.TableEditor=Table Editor
+CombinedEntryEditorPreferencePage.TemplateEditor=Template Editor
+CombinedEntryEditorPreferencePage.UseAsDefaultEditor=Use as default editor (tab):
+CombinedEntryEditorPreferencePage.PrefPageDescription=General settings for the Combined Entry Editor:

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages_de.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages_de.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages_de.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1,7 @@
+CombinedEntryEditorPreferencePage.AutoSwitchNote=Wenn diese Option aktiviert ist schaltet der Editor automatisch zum\nausgew\u00E4hlten Tab, falls kein passendes Template verf\u00FCgbar ist.
+CombinedEntryEditorPreferencePage.AutoSwitchToFollowingTabNoTemplateAvailable=Automatisch zu folgendem Tab umschalten, falls kein passendes Templat verf\u00FCgbar ist.
+CombinedEntryEditorPreferencePage.LDIFEditor=LDIF-Editor
+CombinedEntryEditorPreferencePage.TableEditor=Tabellen-Editor
+CombinedEntryEditorPreferencePage.TemplateEditor=Template-Editor
+CombinedEntryEditorPreferencePage.UseAsDefaultEditor=Als Standard Editor verwenden (Tab):
+CombinedEntryEditorPreferencePage.PrefPageDescription=Allgemeine Einstellungen des kombinierten Eintrags-Editors:

Added: directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages_fr.properties?rev=1670296&view=auto
==============================================================================
--- directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages_fr.properties (added)
+++ directory/studio/trunk/plugins/combinededitor/src/main/java/org/apache/directory/studio/combinededitor/preferences/messages_fr.properties Tue Mar 31 09:56:35 2015
@@ -0,0 +1,7 @@
+CombinedEntryEditorPreferencePage.AutoSwitchNote=Note: Lorsque cette option est activée, l'éditeur bascule automatiquement vers\nl'onglet de votre choix si aucun modèle ne correspond à l'entrée donnée.
+CombinedEntryEditorPreferencePage.AutoSwitchToFollowingTabNoTemplateAvailable=Basculer automatiquement vers l'onglet suivant si aucun modèle n'est disponible:
+CombinedEntryEditorPreferencePage.LDIFEditor=Editeur LDIF
+CombinedEntryEditorPreferencePage.TableEditor=Editeur Tabulaire
+CombinedEntryEditorPreferencePage.TemplateEditor=Editeur Formaté
+CombinedEntryEditorPreferencePage.UseAsDefaultEditor=Utiliser comme éditeur (onglet) par défaut :
+CombinedEntryEditorPreferencePage.PrefPageDescription=Réglages généraux pour l'éditeur d'entrée combiné :



Mime
View raw message