You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2007/09/14 15:44:46 UTC
svn commit: r575676 - in /directory/studio/trunk/studio-schemaeditor: ./
src/main/java/org/apache/directory/studio/schemaeditor/
src/main/java/org/apache/directory/studio/schemaeditor/controller/
src/main/java/org/apache/directory/studio/schemaeditor/c...
Author: pamarcelot
Date: Fri Sep 14 06:44:43 2007
New Revision: 575676
URL: http://svn.apache.org/viewvc?rev=575676&view=rev
Log:
Fixed DIRSTUDIO-195 (Add key bindings to the Schema Editor).
Modified:
directory/studio/trunk/studio-schemaeditor/plugin.xml
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginConstants.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsViewController.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteProjectAction.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewAttributeTypeAction.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewObjectClassAction.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewProjectAction.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewSchemaAction.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenElementAction.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java
directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameProjectAction.java
Modified: directory/studio/trunk/studio-schemaeditor/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/plugin.xml?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/plugin.xml (original)
+++ directory/studio/trunk/studio-schemaeditor/plugin.xml Fri Sep 14 06:44:43 2007
@@ -294,5 +294,138 @@
id="org.apache.directory.studio.schemaeditor.schemaConnectors.apacheDirectoryServer"
description="A SchemaConnector for Apache Directory Server."
class="org.apache.directory.studio.schemaeditor.model.io.ApacheDsSchemaConnector"/>
- </extension>
+ </extension>
+ <extension
+ point="org.eclipse.ui.contexts">
+ <context
+ description="In Projects View of Schema Editor"
+ id="org.apache.directory.studio.schemaeditor.contexts.projectsView"
+ name="In Projects View of Schema Editor"
+ parentId="org.eclipse.ui.contexts.window">
+ </context>
+ <context
+ description="In Schema View of Schema Editor"
+ id="org.apache.directory.studio.schemaeditor.contexts.schemaView"
+ name="In Schema View of Schema Editor"
+ parentId="org.eclipse.ui.contexts.window">
+ </context>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.apache.directory.studio.schemaeditor.commands"
+ name="Schema Editor">
+ </category>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Creates a new project"
+ id="org.apache.directory.studio.schemaeditor.commands.newProject"
+ name="New Project">
+ </command>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Renames the selected project"
+ id="org.apache.directory.studio.schemaeditor.commands.renameProject"
+ name="Rename Project">
+ </command>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Deletes the selected project(s)"
+ id="org.apache.directory.studio.schemaeditor.commands.deleteProject"
+ name="Delete Project">
+ </command>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Creates a new schema"
+ id="org.apache.directory.studio.schemaeditor.commands.newSchema"
+ name="New Schema">
+ </command>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Creates a new attribute type"
+ id="org.apache.directory.studio.schemaeditor.commands.newAttributeType"
+ name="New Attribute Type">
+ </command>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Creates a new object class"
+ id="org.apache.directory.studio.schemaeditor.commands.newObjectClass"
+ name="New Object Class">
+ </command>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Opens the selected element"
+ id="org.apache.directory.studio.schemaeditor.commands.openElement"
+ name="Open Element">
+ </command>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Opens the selected element in Type Hierarchy"
+ id="org.apache.directory.studio.schemaeditor.commands.openTypeHierarchy"
+ name="Open Type Hierarchy">
+ </command>
+ <command
+ categoryId="org.apache.directory.studio.schemaeditor.commands"
+ description="Delete the selected schema elements"
+ id="org.apache.directory.studio.schemaeditor.commands.deleteSchemaElement"
+ name="Delete Schema Element">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.newProject"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.projectsView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+R">
+ </key>
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.renameProject"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.projectsView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F2">
+ </key>
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.deleteProject"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.projectsView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="DEL">
+ </key>
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.newSchema"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.schemaView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+E">
+ </key>
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.newAttributeType"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.schemaView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+T">
+ </key>
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.newObjectClass"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.schemaView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+B">
+ </key>
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.openElement"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.schemaView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F3">
+ </key>
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.openTypeHierarchy"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.schemaView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F4">
+ </key>
+ <key
+ commandId="org.apache.directory.studio.schemaeditor.commands.deleteSchemaElement"
+ contextId="org.apache.directory.studio.schemaeditor.contexts.schemaView"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="DEL">
+ </key>
+ </extension>
</plugin>
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginConstants.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginConstants.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginConstants.java Fri Sep 14 06:44:43 2007
@@ -319,4 +319,9 @@
/** The preference ID for Search View Display Secondary Label */
public static final String PREFS_SEARCH_VIEW_SCHEMA_LABEL_DISPLAY = SearchViewPreferencePage.ID
+ ".schemaLabel.display"; //$NON-NLS-1$
+
+ /** The Context for the SchemaView */
+ public static final String CONTEXT_SCHEMA_VIEW = Activator.PLUGIN_ID + ".contexts.schemaView"; //$NON-NLS-1$
+ /** The Context for the SchemaView */
+ public static final String CONTEXT_PROJECTS_VIEW = Activator.PLUGIN_ID + ".contexts.projectsView"; //$NON-NLS-1$
}
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsViewController.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsViewController.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsViewController.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProjectsViewController.java Fri Sep 14 06:44:43 2007
@@ -21,6 +21,7 @@
import org.apache.directory.studio.schemaeditor.Activator;
+import org.apache.directory.studio.schemaeditor.PluginConstants;
import org.apache.directory.studio.schemaeditor.controller.actions.CloseProjectAction;
import org.apache.directory.studio.schemaeditor.controller.actions.DeleteProjectAction;
import org.apache.directory.studio.schemaeditor.controller.actions.ExportProjectsAction;
@@ -39,13 +40,20 @@
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.commands.ActionHandler;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPartReference;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.contexts.IContextActivation;
+import org.eclipse.ui.contexts.IContextService;
/**
@@ -68,6 +76,9 @@
/** The ProjectsHandler */
private ProjectsHandler projectsHandler;
+ /** Token used to activate and deactivate shortcuts in the view */
+ private IContextActivation contextActivation;
+
// The Actions
private NewProjectAction newProject;
private OpenProjectAction openProject;
@@ -96,6 +107,7 @@
initContextMenu();
initViewer();
initDoubleClickListener();
+ initPartListener();
}
@@ -203,6 +215,96 @@
}
}
}
+ } );
+ }
+
+
+ /**
+ * Initializes the PartListener.
+ */
+ private void initPartListener()
+ {
+ view.getSite().getPage().addPartListener( new IPartListener2()
+ {
+ /**
+ * This implementation deactivates the shortcuts when the part is deactivated.
+ */
+ public void partDeactivated( IWorkbenchPartReference partRef )
+ {
+ if ( partRef.getPart( false ) == view && contextActivation != null )
+ {
+ ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+ ICommandService.class );
+ if ( commandService != null )
+ {
+ commandService.getCommand( newProject.getActionDefinitionId() ).setHandler( null );
+ commandService.getCommand( renameProject.getActionDefinitionId() ).setHandler( null );
+ commandService.getCommand( deleteProject.getActionDefinitionId() ).setHandler( null );
+ }
+
+ IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
+ IContextService.class );
+ contextService.deactivateContext( contextActivation );
+ contextActivation = null;
+ }
+ }
+
+
+ /**
+ * This implementation activates the shortcuts when the part is activated.
+ */
+ public void partActivated( IWorkbenchPartReference partRef )
+ {
+ if ( partRef.getPart( false ) == view )
+ {
+ IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
+ IContextService.class );
+ contextActivation = contextService.activateContext( PluginConstants.CONTEXT_PROJECTS_VIEW );
+
+ ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+ ICommandService.class );
+ if ( commandService != null )
+ {
+ commandService.getCommand( newProject.getActionDefinitionId() ).setHandler(
+ new ActionHandler( newProject ) );
+ commandService.getCommand( renameProject.getActionDefinitionId() ).setHandler(
+ new ActionHandler( renameProject ) );
+ commandService.getCommand( deleteProject.getActionDefinitionId() ).setHandler(
+ new ActionHandler( deleteProject ) );
+ }
+ }
+ }
+
+
+ public void partBroughtToTop( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partClosed( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partHidden( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partInputChanged( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partOpened( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partVisible( IWorkbenchPartReference partRef )
+ {
+ }
+
} );
}
}
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java Fri Sep 14 06:44:43 2007
@@ -62,6 +62,7 @@
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.commands.ActionHandler;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -70,10 +71,15 @@
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.contexts.IContextActivation;
+import org.eclipse.ui.contexts.IContextService;
/**
@@ -340,6 +346,9 @@
}
};
+ /** Token used to activate and deactivate shortcuts in the view */
+ private IContextActivation contextActivation;
+
// The Actions
private NewSchemaAction newSchema;
private NewAttributeTypeAction newAttributeType;
@@ -356,9 +365,10 @@
private OpenSchemaViewSortingDialogAction openSchemaViewSortingDialog;
private OpenSchemaViewPreferenceAction openSchemaViewPreference;
private LinkWithEditorSchemaViewAction linkWithEditor;
-// private CommitChangesAction commitChanges;
+ // private CommitChangesAction commitChanges;
+
/**
* Creates a new instance of SchemasViewController.
*
@@ -379,6 +389,7 @@
initAuthorizedPrefs();
initPreferencesListener();
initState();
+ initPartListener();
}
@@ -402,7 +413,7 @@
openSchemaViewSortingDialog = new OpenSchemaViewSortingDialogAction();
openSchemaViewPreference = new OpenSchemaViewPreferenceAction();
linkWithEditor = new LinkWithEditorSchemaViewAction( view );
-// commitChanges = new CommitChangesAction();
+ // commitChanges = new CommitChangesAction();
}
@@ -415,8 +426,8 @@
toolbar.add( newSchema );
toolbar.add( newAttributeType );
toolbar.add( newObjectClass );
-// toolbar.add( new Separator() );
-// toolbar.add( commitChanges );
+ // toolbar.add( new Separator() );
+ // toolbar.add( commitChanges );
toolbar.add( new Separator() );
toolbar.add( collapseAll );
toolbar.add( linkWithEditor );
@@ -506,7 +517,7 @@
linkWithEditor.setEnabled( true );
openSchemaViewSortingDialog.setEnabled( true );
openSchemaViewPreference.setEnabled( true );
-// commitChanges.setEnabled( true );
+ // commitChanges.setEnabled( true );
addSchemaHandlerListener( newProject );
view.reloadViewer();
@@ -522,7 +533,7 @@
linkWithEditor.setEnabled( false );
openSchemaViewSortingDialog.setEnabled( false );
openSchemaViewPreference.setEnabled( false );
-// commitChanges.setEnabled( false );
+ // commitChanges.setEnabled( false );
}
}
} );
@@ -834,7 +845,7 @@
linkWithEditor.setEnabled( true );
openSchemaViewSortingDialog.setEnabled( true );
openSchemaViewPreference.setEnabled( true );
-// commitChanges.setEnabled( true );
+ // commitChanges.setEnabled( true );
addSchemaHandlerListener( project );
view.reloadViewer();
@@ -849,7 +860,106 @@
linkWithEditor.setEnabled( false );
openSchemaViewSortingDialog.setEnabled( false );
openSchemaViewPreference.setEnabled( false );
-// commitChanges.setEnabled( false );
+ // commitChanges.setEnabled( false );
}
+ }
+
+
+ /**
+ * Initializes the PartListener.
+ */
+ private void initPartListener()
+ {
+ view.getSite().getPage().addPartListener( new IPartListener2()
+ {
+ /**
+ * This implementation deactivates the shortcuts when the part is deactivated.
+ */
+ public void partDeactivated( IWorkbenchPartReference partRef )
+ {
+ if ( partRef.getPart( false ) == view && contextActivation != null )
+ {
+ ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+ ICommandService.class );
+ if ( commandService != null )
+ {
+ commandService.getCommand( newSchema.getActionDefinitionId() ).setHandler( null );
+ commandService.getCommand( newAttributeType.getActionDefinitionId() ).setHandler( null );
+ commandService.getCommand( newObjectClass.getActionDefinitionId() ).setHandler( null );
+ commandService.getCommand( openElement.getActionDefinitionId() ).setHandler( null );
+ commandService.getCommand( openTypeHierarchy.getActionDefinitionId() ).setHandler( null );
+ commandService.getCommand( deleteSchemaElement.getActionDefinitionId() ).setHandler( null );
+ }
+
+ IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
+ IContextService.class );
+ contextService.deactivateContext( contextActivation );
+ contextActivation = null;
+ }
+ }
+
+
+ /**
+ * This implementation activates the shortcuts when the part is activated.
+ */
+ public void partActivated( IWorkbenchPartReference partRef )
+ {
+ if ( partRef.getPart( false ) == view )
+ {
+ IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
+ IContextService.class );
+ contextActivation = contextService.activateContext( PluginConstants.CONTEXT_SCHEMA_VIEW );
+
+ ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+ ICommandService.class );
+ if ( commandService != null )
+ {
+ commandService.getCommand( newSchema.getActionDefinitionId() ).setHandler(
+ new ActionHandler( newSchema ) );
+ commandService.getCommand( newAttributeType.getActionDefinitionId() ).setHandler(
+ new ActionHandler( newAttributeType ) );
+ commandService.getCommand( newObjectClass.getActionDefinitionId() ).setHandler(
+ new ActionHandler( newObjectClass ) );
+ commandService.getCommand( openElement.getActionDefinitionId() ).setHandler(
+ new ActionHandler( openElement ) );
+ commandService.getCommand( openTypeHierarchy.getActionDefinitionId() ).setHandler(
+ new ActionHandler( openTypeHierarchy ) );
+ commandService.getCommand( deleteSchemaElement.getActionDefinitionId() ).setHandler(
+ new ActionHandler( deleteSchemaElement ) );
+ }
+ }
+ }
+
+
+ public void partBroughtToTop( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partClosed( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partHidden( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partInputChanged( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partOpened( IWorkbenchPartReference partRef )
+ {
+ }
+
+
+ public void partVisible( IWorkbenchPartReference partRef )
+ {
+ }
+
+ } );
}
}
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteProjectAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteProjectAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteProjectAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteProjectAction.java Fri Sep 14 06:44:43 2007
@@ -66,6 +66,7 @@
super( "&Delete Project" );
setToolTipText( "Delete Project" );
setId( PluginConstants.CMD_DELETE_PROJECT );
+ setActionDefinitionId( PluginConstants.CMD_DELETE_PROJECT );
setImageDescriptor( AbstractUIPlugin
.imageDescriptorFromPlugin( Activator.PLUGIN_ID, PluginConstants.IMG_DELETE ) );
setEnabled( false );
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java Fri Sep 14 06:44:43 2007
@@ -71,6 +71,7 @@
super( "&Delete" );
setToolTipText( "Delete" );
setId( PluginConstants.CMD_DELETE_SCHEMA_ELEMENT );
+ setActionDefinitionId( PluginConstants.CMD_DELETE_SCHEMA_ELEMENT );
setImageDescriptor( AbstractUIPlugin
.imageDescriptorFromPlugin( Activator.PLUGIN_ID, PluginConstants.IMG_DELETE ) );
setEnabled( true );
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewAttributeTypeAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewAttributeTypeAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewAttributeTypeAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewAttributeTypeAction.java Fri Sep 14 06:44:43 2007
@@ -58,9 +58,10 @@
*/
public NewAttributeTypeAction( TreeViewer viewer )
{
- super( "New &Attribute Type" );
+ super( "New A&ttribute Type" );
setToolTipText( "New Attribute Type" );
setId( PluginConstants.CMD_NEW_ATTRIBUTE_TYPE );
+ setActionDefinitionId( PluginConstants.CMD_NEW_ATTRIBUTE_TYPE );
setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
PluginConstants.IMG_ATTRIBUTE_TYPE_NEW ) );
setEnabled( false );
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewObjectClassAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewObjectClassAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewObjectClassAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewObjectClassAction.java Fri Sep 14 06:44:43 2007
@@ -58,9 +58,10 @@
*/
public NewObjectClassAction( TreeViewer viewer )
{
- super( "New &Object Class" );
+ super( "New O&bject Class" );
setToolTipText( "New Object Class" );
setId( PluginConstants.CMD_NEW_OBJECT_CLASS );
+ setActionDefinitionId( PluginConstants.CMD_NEW_OBJECT_CLASS );
setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
PluginConstants.IMG_OBJECT_CLASS_NEW ) );
setEnabled( false );
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewProjectAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewProjectAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewProjectAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewProjectAction.java Fri Sep 14 06:44:43 2007
@@ -50,6 +50,7 @@
super( "New Schema P&roject" );
setToolTipText( "New Schema Project" );
setId( PluginConstants.CMD_NEW_PROJECT );
+ setActionDefinitionId( PluginConstants.CMD_NEW_PROJECT );
setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
PluginConstants.IMG_PROJECT_NEW ) );
setEnabled( true );
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewSchemaAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewSchemaAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewSchemaAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/NewSchemaAction.java Fri Sep 14 06:44:43 2007
@@ -47,9 +47,10 @@
*/
public NewSchemaAction()
{
- super( "New &Schema" );
+ super( "New Sch&ema" );
setToolTipText( "New Schema" );
setId( PluginConstants.CMD_NEW_SCHEMA );
+ setActionDefinitionId( PluginConstants.CMD_NEW_SCHEMA );
setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
PluginConstants.IMG_SCHEMA_NEW ) );
setEnabled( false );
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenElementAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenElementAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenElementAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenElementAction.java Fri Sep 14 06:44:43 2007
@@ -66,6 +66,7 @@
super( "&Open" );
setToolTipText( "Open" );
setId( PluginConstants.CMD_OPEN_ELEMENT );
+ setActionDefinitionId( PluginConstants.CMD_OPEN_ELEMENT );
setEnabled( true );
this.viewer = viewer;
}
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java Fri Sep 14 06:44:43 2007
@@ -64,6 +64,7 @@
super( "Ope&n Type Hierarchy" );
setToolTipText( "Open Type Hierarchy" );
setId( PluginConstants.CMD_OPEN_TYPE_HIERARCHY );
+ setActionDefinitionId( PluginConstants.CMD_OPEN_TYPE_HIERARCHY );
setEnabled( true );
this.viewer = viewer;
this.viewer.addSelectionChangedListener( new ISelectionChangedListener()
Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameProjectAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameProjectAction.java?rev=575676&r1=575675&r2=575676&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameProjectAction.java (original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameProjectAction.java Fri Sep 14 06:44:43 2007
@@ -65,6 +65,7 @@
super( "Re&name Project..." );
setToolTipText( getText() );
setId( PluginConstants.CMD_RENAME_PROJECT );
+ setActionDefinitionId( PluginConstants.CMD_RENAME_PROJECT );
setImageDescriptor( AbstractUIPlugin
.imageDescriptorFromPlugin( Activator.PLUGIN_ID, PluginConstants.IMG_RENAME ) );
setEnabled( false );