KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > help > IContextComputer


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.help;
12
13 import org.eclipse.swt.events.HelpEvent;
14
15 /**
16  * A content computer is used to dynamically calculate help support contexts at the
17  * time the user requests help.
18  * <p>
19  * This interface may be implemented by clients.
20  * </p>
21  * @deprecated nested contexts are no longer supported by the help support system
22  *
23  */

24 public interface IContextComputer {
25     /**
26      * Computes contexts for the help system.
27      *
28      * @param event the help event which triggered this request for help
29      * @return a mixed-type array of context ids (type <code>String</code>)
30      * and/or help contexts (type <code>IContext</code>)
31      * @see org.eclipse.help.IContext
32      */

33     public Object JavaDoc[] computeContexts(HelpEvent event);
34
35     /**
36      * Returns the local contexts for this context computer.
37      * <p>
38      * Typically this method is called by other instances of
39      * <code>IContextComputer</code> in their <code>computeContexts</code>
40      * method.
41      * </p>
42      * <p>
43      * The important concept here is that the value returned by
44      * <code>computeContexts</code> represents the complete help
45      * contexts and is passed directly to the help support system.
46      * </p>
47      * <p>
48      * However the value returned by this method represents the
49      * only the contexts for the particular control with which this
50      * <code>IContextComputer</code> is associated.
51      * </p>
52      * @param event the help event which triggered this request for help
53      * @return a mixed-type array of context ids (type <code>String</code>)
54      * and/or help contexts (type <code>IContext</code>)
55      * @see org.eclipse.help.IContext
56      */

57     public Object JavaDoc[] getLocalContexts(HelpEvent event);
58 }
59
Popular Tags