KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > commands > IWorkbenchCommandSupport


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.commands;
13
14 import java.util.Collection JavaDoc;
15
16 /**
17  * An instance of this interface provides support for managing commands at the
18  * <code>IWorkbench</code> level.
19  * <p>
20  * This interface is not intended to be extended or implemented by clients.
21  * </p>
22  *
23  * @since 3.0
24  * @deprecated Please use <code>ICommandService</code> and
25  * <code>IHandlerService</code> instead.
26  * @see org.eclipse.ui.commands.ICommandService
27  * @see org.eclipse.ui.handlers.IHandlerService
28  */

29 public interface IWorkbenchCommandSupport {
30
31     /**
32      * Adds a single handler submissions for consideration by the workbench. The
33      * submission indicates to the workbench a set of conditions under which the
34      * handler should become active. The workbench, however, ultimately decides
35      * which handler becomes active (in the event of conflicts or changes in
36      * state). This could cause the handlers for one or more commands to change.
37      *
38      * @param handlerSubmission
39      * The submission to be added; must not be <code>null</code>.
40      */

41     void addHandlerSubmission(HandlerSubmission handlerSubmission);
42
43     /**
44      * Adds a collection of handler submissions for consideration by the
45      * workbench. The submission indicates to the workbench a set of conditions
46      * under which the handler should become active. The workbench, however,
47      * ultimately decides which handler becomes active (in the event of
48      * conflicts or changes in state). This could cause the handlers for one or
49      * more commands to change.
50      *
51      * @param handlerSubmissions
52      * The submissions to be added; must not be <code>null</code>,
53      * and must contain zero or more instances of
54      * <code>HandlerSubmission</code>.
55      */

56     void addHandlerSubmissions(Collection JavaDoc handlerSubmissions);
57
58     /**
59      * Returns the command manager for the workbench.
60      *
61      * @return the command manager for the workbench. Guaranteed not to be
62      * <code>null</code>.
63      */

64     ICommandManager getCommandManager();
65
66     /**
67      * Removes a single handler submission from consideration by the workbench.
68      * The handler submission must be the same as the one added (not just
69      * equivalent). This could cause the handlers for one or more commands to
70      * change.
71      *
72      * @param handlerSubmission
73      * The submission to be removed; must not be <code>null</code>.
74      */

75     void removeHandlerSubmission(HandlerSubmission handlerSubmission);
76
77     /**
78      * Removes a single handler submission from consideration by the workbench.
79      * The handler submission must be the same as the one added (not just
80      * equivalent). This could cause the handlers for one or more commands to
81      * change.
82      *
83      * @param handlerSubmissions
84      * The submissions to be removed; must not be <code>null</code>,
85      * and must contain instances of <code>HandlerSubmission</code>
86      * only.
87      */

88     void removeHandlerSubmissions(Collection JavaDoc handlerSubmissions);
89 }
90
Popular Tags