Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2006 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2008 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 9-14
Link Here
|
9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
10 |
* Sebastian Davids <sdavids@gmx.de> - Fix for bug 19346 - Dialog |
10 |
* Sebastian Davids <sdavids@gmx.de> - Fix for bug 19346 - Dialog |
11 |
* font should be activated and used by other components. |
11 |
* font should be activated and used by other components. |
|
|
12 |
* Remy Chi Jian Suen <remy.suen@gmail.com> - Fix for bug 209565 - [Dialogs] |
13 |
* The OK button in ContainerSelectionDialog should be disabled if no |
14 |
* project is available |
12 |
*******************************************************************************/ |
15 |
*******************************************************************************/ |
13 |
|
16 |
|
14 |
package org.eclipse.ui.dialogs; |
17 |
package org.eclipse.ui.dialogs; |
Lines 18-23
Link Here
|
18 |
|
21 |
|
19 |
import org.eclipse.core.resources.IContainer; |
22 |
import org.eclipse.core.resources.IContainer; |
20 |
import org.eclipse.core.runtime.IPath; |
23 |
import org.eclipse.core.runtime.IPath; |
|
|
24 |
import org.eclipse.jface.dialogs.IDialogConstants; |
21 |
import org.eclipse.swt.SWT; |
25 |
import org.eclipse.swt.SWT; |
22 |
import org.eclipse.swt.layout.GridData; |
26 |
import org.eclipse.swt.layout.GridData; |
23 |
import org.eclipse.swt.widgets.Composite; |
27 |
import org.eclipse.swt.widgets.Composite; |
Lines 106-111
Link Here
|
106 |
} |
110 |
} |
107 |
|
111 |
|
108 |
/* (non-Javadoc) |
112 |
/* (non-Javadoc) |
|
|
113 |
* Method declared in Window. |
114 |
*/ |
115 |
protected Control createContents(Composite parent) { |
116 |
Control control = super.createContents(parent); |
117 |
// disable the 'OK' button if there are no containers to select |
118 |
getButton(IDialogConstants.OK_ID).setEnabled(group.hasContainers()); |
119 |
return control; |
120 |
} |
121 |
|
122 |
/* (non-Javadoc) |
109 |
* Method declared on Dialog. |
123 |
* Method declared on Dialog. |
110 |
*/ |
124 |
*/ |
111 |
protected Control createDialogArea(Composite parent) { |
125 |
protected Control createDialogArea(Composite parent) { |