01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.commands;
11:
12: import org.eclipse.core.commands.CommandManager;
13: import org.eclipse.core.commands.contexts.ContextManager;
14: import org.eclipse.jface.bindings.BindingManager;
15:
16: /**
17: * This class allows clients to broker instances of <code>ICommandManager</code>.
18: * <p>
19: * This class is not intended to be extended by clients.
20: * </p>
21: *
22: * @since 3.0
23: */
24: public final class CommandManagerFactory {
25:
26: /**
27: * Creates a new instance of <code>IMutableCommandManager</code>.
28: *
29: * @param bindingManager
30: * The binding manager providing support for the command manager;
31: * must not be <code>null</code>.
32: * @param commandManager
33: * The command manager providing support for this command
34: * manager; must not be <code>null</code>.
35: * @param contextManager
36: * The context manager for this command manager; must not be
37: * <code>null</code>.
38: * @return a new instance of <code>IMutableCommandManager</code>. Clients
39: * should not make assumptions about the concrete implementation
40: * outside the contract of the interface. Guaranteed not to be
41: * <code>null</code>.
42: */
43: public static CommandManagerLegacyWrapper getCommandManagerWrapper(
44: final BindingManager bindingManager,
45: final CommandManager commandManager,
46: final ContextManager contextManager) {
47: return new CommandManagerLegacyWrapper(bindingManager,
48: commandManager, contextManager);
49: }
50:
51: private CommandManagerFactory() {
52: }
53: }
|