KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > commands > CommandManagerFactory


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.internal.commands;
13
14 import org.eclipse.core.commands.CommandManager;
15 import org.eclipse.core.commands.contexts.ContextManager;
16 import org.eclipse.jface.bindings.BindingManager;
17
18 /**
19  * This class allows clients to broker instances of <code>ICommandManager</code>.
20  * <p>
21  * This class is not intended to be extended by clients.
22  * </p>
23  *
24  * @since 3.0
25  */

26 public final class CommandManagerFactory {
27
28     /**
29      * Creates a new instance of <code>IMutableCommandManager</code>.
30      *
31      * @param bindingManager
32      * The binding manager providing support for the command manager;
33      * must not be <code>null</code>.
34      * @param commandManager
35      * The command manager providing support for this command
36      * manager; must not be <code>null</code>.
37      * @param contextManager
38      * The context manager for this command manager; must not be
39      * <code>null</code>.
40      * @return a new instance of <code>IMutableCommandManager</code>. Clients
41      * should not make assumptions about the concrete implementation
42      * outside the contract of the interface. Guaranteed not to be
43      * <code>null</code>.
44      */

45     public static CommandManagerLegacyWrapper getCommandManagerWrapper(
46             final BindingManager bindingManager,
47             final CommandManager commandManager,
48             final ContextManager contextManager) {
49         return new CommandManagerLegacyWrapper(bindingManager, commandManager,
50                 contextManager);
51     }
52
53     private CommandManagerFactory() {
54     }
55 }
56
Popular Tags