KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > INestableKeyBindingService


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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 package org.eclipse.ui;
12
13 import org.eclipse.ui.services.IServiceLocator;
14
15 /**
16  * <p>
17  * A service that is capable of nesting other services within itself. This
18  * allows lower level components to query for a service provider in a
19  * hierarchical fashion, and for information to be resolved in a hierarchical
20  * manner
21  * </p>
22  * <p>
23  * This interface is not intended to be implemented or extended by clients.
24  * </p>
25  *
26  * @since 2.1.3
27  * @deprecated This is now handled by {@link IServiceLocator} which can
28  * be nested.
29  */

30 public interface INestableKeyBindingService extends IKeyBindingService {
31
32     /**
33      * Marks the service associated with <code>nestedSite</code> as active if
34      * one exists. If there is no service associated, then nothing changes.
35      * Calling this method with <code>null</code> forces deactivation of the
36      * current service.
37      *
38      * @param nestedSite The site whose service should be activated;
39      * <code>null</code> if the current service should be deactivated.
40      * @return <code>true</code> if a service is activated (or deactivated, in
41      * the case of a <code>null</code> parameter); <code>false</code> if
42      * nothing changed.
43      */

44     public boolean activateKeyBindingService(IWorkbenchSite nestedSite);
45
46     /**
47      * An accessor for the nested key binding service associated with a
48      * particular site. If the key binding service does not exist for this
49      * <code>nestedSite</code> already, then a new one should be constructed.
50      *
51      * @param nestedSite The site for which the service should be found;
52      * should not be <code>null</code>.
53      * @return The associated service, if any; or a new associated service, if
54      * none existed previously.
55      */

56     public IKeyBindingService getKeyBindingService(IWorkbenchSite nestedSite);
57
58     /**
59      * Removes a nested key binding service from this key binding service. The
60      * service to remove is determined by the <code>nestedSite</code> with
61      * which it is associated.
62      *
63      * @param nestedSite The site from which to remove the nested service.
64      * This site must not be <code>null</code>.
65      * @return <code>true</code> if the service existed and could be removed;
66      * <code>false</code> otherwise.
67      */

68     public boolean removeKeyBindingService(IWorkbenchSite nestedSite);
69
70 }
71
Popular Tags