01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 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;
11:
12: import org.eclipse.ui.services.IServiceLocator;
13:
14: /**
15: * <p>
16: * A service that is capable of nesting other services within itself. This
17: * allows lower level components to query for a service provider in a
18: * hierarchical fashion, and for information to be resolved in a hierarchical
19: * manner
20: * </p>
21: * <p>
22: * This interface is not intended to be implemented or extended by clients.
23: * </p>
24: *
25: * @since 2.1.3
26: * @deprecated This is now handled by {@link IServiceLocator} which can
27: * be nested.
28: */
29: public interface INestableKeyBindingService extends IKeyBindingService {
30:
31: /**
32: * Marks the service associated with <code>nestedSite</code> as active if
33: * one exists. If there is no service associated, then nothing changes.
34: * Calling this method with <code>null</code> forces deactivation of the
35: * current service.
36: *
37: * @param nestedSite The site whose service should be activated;
38: * <code>null</code> if the current service should be deactivated.
39: * @return <code>true</code> if a service is activated (or deactivated, in
40: * the case of a <code>null</code> parameter); <code>false</code> if
41: * nothing changed.
42: */
43: public boolean activateKeyBindingService(IWorkbenchSite nestedSite);
44:
45: /**
46: * An accessor for the nested key binding service associated with a
47: * particular site. If the key binding service does not exist for this
48: * <code>nestedSite</code> already, then a new one should be constructed.
49: *
50: * @param nestedSite The site for which the service should be found;
51: * should not be <code>null</code>.
52: * @return The associated service, if any; or a new associated service, if
53: * none existed previously.
54: */
55: public IKeyBindingService getKeyBindingService(
56: 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: }
|