]> git.uio.no Git - ifi-stolz-refaktor.git/blame - case-study/jdt-before/ui/org/eclipse/jdt/internal/ui/dialogs/OpenTypeSelectionDialog.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-before / ui / org / eclipse / jdt / internal / ui / dialogs / OpenTypeSelectionDialog.java
CommitLineData
1b2798f6
EK
1/*******************************************************************************
2 * Copyright (c) 2000, 2011 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 *******************************************************************************/
11package org.eclipse.jdt.internal.ui.dialogs;
12
13import org.eclipse.swt.widgets.Shell;
14
15import org.eclipse.jface.dialogs.IDialogSettings;
16import org.eclipse.jface.operation.IRunnableContext;
17
18import org.eclipse.ui.PlatformUI;
19
20import org.eclipse.jdt.core.search.IJavaSearchScope;
21
22import org.eclipse.jdt.ui.dialogs.TypeSelectionExtension;
23
24import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
25import org.eclipse.jdt.internal.ui.JavaPlugin;
26
27/**
28 * A type selection dialog used for opening types.
29 */
30public class OpenTypeSelectionDialog extends FilteredTypesSelectionDialog {
31
32 private static final String DIALOG_SETTINGS= "org.eclipse.jdt.internal.ui.dialogs.OpenTypeSelectionDialog2"; //$NON-NLS-1$
33
34 public OpenTypeSelectionDialog(Shell parent, boolean multi, IRunnableContext context, IJavaSearchScope scope, int elementKinds) {
35 this(parent, multi, context, scope, elementKinds, null);
36 }
37
38 public OpenTypeSelectionDialog(Shell parent, boolean multi, IRunnableContext context, IJavaSearchScope scope, int elementKinds, TypeSelectionExtension extension) {
39 super(parent, multi, context, scope, elementKinds, extension);
40 }
41
42 /*
43 * (non-Javadoc)
44 *
45 * @see org.eclipse.ui.dialogs.SelectionStatusDialog#configureShell(org.eclipse.swt.widgets.Shell)
46 */
47 @Override
48 protected void configureShell(Shell newShell) {
49 super.configureShell(newShell);
50 PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.OPEN_TYPE_DIALOG);
51 }
52
53 /*
54 * (non-Javadoc)
55 *
56 * @see org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog#getDialogSettings()
57 */
58 @Override
59 protected IDialogSettings getDialogSettings() {
60 IDialogSettings settings= JavaPlugin.getDefault().getDialogSettings().getSection(DIALOG_SETTINGS);
61
62 if (settings == null) {
63 settings= JavaPlugin.getDefault().getDialogSettings().addNewSection(DIALOG_SETTINGS);
64 }
65
66 return settings;
67 }
68}