KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > viewers > AsynchronousTreeNavigationDialog


1 /*******************************************************************************
2  * Copyright (c) 2005, 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.debug.internal.ui.viewers;
12
13 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
14 import org.eclipse.jface.viewers.ILabelProvider;
15 import org.eclipse.swt.widgets.Composite;
16 import org.eclipse.swt.widgets.Control;
17 import org.eclipse.swt.widgets.Shell;
18 import org.eclipse.ui.PlatformUI;
19 import org.eclipse.ui.dialogs.ElementListSelectionDialog;
20
21 /**
22  * A dialog used to navigate to an element in an asynchronous
23  * tree viewer. Must be created on corresponding label provider.
24  *
25  * @since 3.2
26  *
27  */

28 public class AsynchronousTreeNavigationDialog extends ElementListSelectionDialog {
29     
30     /**
31      * Constructs a dialog to navigate to an element in the given viewer.
32      *
33      * @param viewer
34      * @param provider
35      */

36     public AsynchronousTreeNavigationDialog(Shell shell, ILabelProvider provider, Object JavaDoc[] elements) {
37         super(shell, provider);
38         setElements(elements);
39         setMultipleSelection(false);
40     }
41
42     /* (non-Javadoc)
43      * @see org.eclipse.ui.dialogs.ElementListSelectionDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
44      */

45     protected Control createDialogArea(Composite parent) {
46         Control comp = super.createDialogArea(parent);
47         PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.FIND_ELEMENT_DIALOG);
48         return comp;
49     }
50     
51 }
52
Popular Tags