KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > internal > ui > ContextHelp


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 Mountainminds GmbH & Co. KG
3  * This software is provided under the terms of the Eclipse Public License v1.0
4  * See http://www.eclipse.org/legal/epl-v10.html.
5  *
6  * $Id: $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.internal.ui;
9
10 import org.eclipse.swt.widgets.Control;
11 import org.eclipse.ui.PlatformUI;
12
13 /**
14  * Constants and utility methods for context help.
15  *
16  * @author Marc R. Hoffmann
17  * @version $Revision: $
18  */

19 public class ContextHelp {
20   
21   private static final String JavaDoc PREFIX = EclEmmaUIPlugin.ID + "."; //$NON-NLS-1$
22

23   public static final String JavaDoc COVERAGE_VIEW = PREFIX + "coverage_view_context"; //$NON-NLS-1$
24

25   public static final String JavaDoc COVERAGE_PROPERTIES = PREFIX + "coverage_properties_context"; //$NON-NLS-1$
26

27   public static final String JavaDoc COVERAGE_PREFERENCES = PREFIX + "coverage_preferences_context"; //$NON-NLS-1$
28

29   public static final String JavaDoc COVERAGE_LAUNCH = PREFIX + "coverage_launch_context"; //$NON-NLS-1$
30

31   public static final String JavaDoc COVERAGE_LAUNCH_TAB = PREFIX + "coverage_launch_tab_context"; //$NON-NLS-1$
32

33   public static final String JavaDoc MERGE_SESSIONS = PREFIX + "merge_sessions_context"; //$NON-NLS-1$
34

35   /**
36    * Assigns the given context help id to a SWT control.
37    *
38    * @param control control for this help context
39    * @param id context help id
40    */

41   public static void setHelp(Control control, String JavaDoc id) {
42     PlatformUI.getWorkbench().getHelpSystem().setHelp(control, id);
43   }
44
45 }
46
Popular Tags