|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 15-20
Link Here
|
| 15 |
import org.eclipse.jface.preference.IPreferenceNode; |
15 |
import org.eclipse.jface.preference.IPreferenceNode; |
| 16 |
import org.eclipse.jface.preference.IPreferencePage; |
16 |
import org.eclipse.jface.preference.IPreferencePage; |
| 17 |
import org.eclipse.jface.preference.PreferenceManager; |
17 |
import org.eclipse.jface.preference.PreferenceManager; |
|
|
18 |
import org.eclipse.swt.widgets.Control; |
| 18 |
import org.eclipse.swt.widgets.Shell; |
19 |
import org.eclipse.swt.widgets.Shell; |
| 19 |
import org.eclipse.ui.IWorkbench; |
20 |
import org.eclipse.ui.IWorkbench; |
| 20 |
import org.eclipse.ui.IWorkbenchWindow; |
21 |
import org.eclipse.ui.IWorkbenchWindow; |
|
Lines 22-27
Link Here
|
| 22 |
import org.eclipse.ui.activities.WorkbenchActivityHelper; |
23 |
import org.eclipse.ui.activities.WorkbenchActivityHelper; |
| 23 |
import org.eclipse.ui.internal.IWorkbenchHelpContextIds; |
24 |
import org.eclipse.ui.internal.IWorkbenchHelpContextIds; |
| 24 |
import org.eclipse.ui.internal.WorkbenchPlugin; |
25 |
import org.eclipse.ui.internal.WorkbenchPlugin; |
|
|
26 |
import org.eclipse.ui.internal.dnd.SwtUtil; |
| 25 |
|
27 |
|
| 26 |
/** |
28 |
/** |
| 27 |
* Prefence dialog for the workbench including the ability to load/save |
29 |
* Prefence dialog for the workbench including the ability to load/save |
|
Lines 205-211
Link Here
|
| 205 |
Shell shell = getShell(); |
207 |
Shell shell = getShell(); |
| 206 |
if ((shell != null) && (!shell.isDisposed())) { |
208 |
if ((shell != null) && (!shell.isDisposed())) { |
| 207 |
shell.open(); // make the dialog visible to properly set the focus |
209 |
shell.open(); // make the dialog visible to properly set the focus |
| 208 |
selectedPage.getControl().setFocus(); |
210 |
Control control = selectedPage.getControl(); |
|
|
211 |
if (!SwtUtil.isFocusAncestor(control)) |
| 212 |
control.setFocus(); |
| 209 |
} |
213 |
} |
| 210 |
} |
214 |
} |
| 211 |
return super.open(); |
215 |
return super.open(); |