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.help;
11:
12: import org.eclipse.swt.events.HelpEvent;
13:
14: /**
15: * A content computer is used to dynamically calculate help support contexts at the
16: * time the user requests help.
17: * <p>
18: * This interface may be implemented by clients.
19: * </p>
20: * @deprecated nested contexts are no longer supported by the help support system
21: *
22: */
23: public interface IContextComputer {
24: /**
25: * Computes contexts for the help system.
26: *
27: * @param event the help event which triggered this request for help
28: * @return a mixed-type array of context ids (type <code>String</code>)
29: * and/or help contexts (type <code>IContext</code>)
30: * @see org.eclipse.help.IContext
31: */
32: public Object[] computeContexts(HelpEvent event);
33:
34: /**
35: * Returns the local contexts for this context computer.
36: * <p>
37: * Typically this method is called by other instances of
38: * <code>IContextComputer</code> in their <code>computeContexts</code>
39: * method.
40: * </p>
41: * <p>
42: * The important concept here is that the value returned by
43: * <code>computeContexts</code> represents the complete help
44: * contexts and is passed directly to the help support system.
45: * </p>
46: * <p>
47: * However the value returned by this method represents the
48: * only the contexts for the particular control with which this
49: * <code>IContextComputer</code> is associated.
50: * </p>
51: * @param event the help event which triggered this request for help
52: * @return a mixed-type array of context ids (type <code>String</code>)
53: * and/or help contexts (type <code>IContext</code>)
54: * @see org.eclipse.help.IContext
55: */
56: public Object[] getLocalContexts(HelpEvent event);
57: }
|