01: /*******************************************************************************
02: * Copyright (c) 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.internal.services;
11:
12: /**
13: * </p>
14: * A service which can appear on a component which is wholly contained with
15: * another component. The component on which it appears can be active or
16: * inactive -- depending on the state of the application. For example, a
17: * workbench part is a component which appears within a workbench window. This
18: * workbench part can either be active or inactive, depending on what the user
19: * is doing.
20: * </p>
21: * <p>
22: * Services implement this interface, and are then notified by the component
23: * when the activation changes. It is the responsibility of the component to
24: * notify such services when the activation changes.
25: * </p>
26: * <p>
27: * This class is not intended for use outside of the
28: * <code>org.eclipse.ui.workbench</code> plug-in.
29: * </p>
30: * <p>
31: * <strong>PROVISIONAL</strong>. This class or interface has been added as part
32: * of a work in progress. There is a guarantee neither that this API will work
33: * nor that it will remain the same. Please do not use this API without
34: * consulting with the Platform/UI team.
35: * </p>
36: * <p>
37: * This class should eventually move to <code>org.eclipse.ui.services</code>.
38: * </p>
39: *
40: * @since 3.2
41: */
42: public interface INestable {
43:
44: /**
45: * Notifies this service that the component within which it exists has
46: * become active. The service should modify its state as appropriate.
47: *
48: */
49: public void activate();
50:
51: /**
52: * Notifies this service that the component within which it exists has
53: * become inactive. The service should modify its state as appropriate.
54: */
55: public void deactivate();
56: }
|