|
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 8-13
Link Here
|
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
| 10 |
* Dina Sayed, dsayed@eg.ibm.com, IBM - bug 269844 |
10 |
* Dina Sayed, dsayed@eg.ibm.com, IBM - bug 269844 |
|
|
11 |
* Markus Schorn (Wind River Systems) - bug 284447 |
| 11 |
*******************************************************************************/ |
12 |
*******************************************************************************/ |
| 12 |
package org.eclipse.ui.internal.ide.dialogs; |
13 |
package org.eclipse.ui.internal.ide.dialogs; |
| 13 |
|
14 |
|
|
Lines 63-68
Link Here
|
| 63 |
|
64 |
|
| 64 |
private IntegerFieldEditor saveInterval; |
65 |
private IntegerFieldEditor saveInterval; |
| 65 |
|
66 |
|
|
|
67 |
private FieldEditor workspaceName; |
| 68 |
|
| 66 |
private Button autoRefreshButton; |
69 |
private Button autoRefreshButton; |
| 67 |
|
70 |
|
| 68 |
private Button closeUnrelatedProjectButton; |
71 |
private Button closeUnrelatedProjectButton; |
|
Lines 76-81
Link Here
|
| 76 |
|
79 |
|
| 77 |
private RadioGroupFieldEditor openReferencesEditor; |
80 |
private RadioGroupFieldEditor openReferencesEditor; |
| 78 |
|
81 |
|
|
|
82 |
|
| 79 |
/* |
83 |
/* |
| 80 |
* (non-Javadoc) |
84 |
* (non-Javadoc) |
| 81 |
* |
85 |
* |
|
Lines 105-110
Link Here
|
| 105 |
|
109 |
|
| 106 |
createSpace(composite); |
110 |
createSpace(composite); |
| 107 |
createSaveIntervalGroup(composite); |
111 |
createSaveIntervalGroup(composite); |
|
|
112 |
createWindowTitleGroup(composite); |
| 108 |
createSpace(composite); |
113 |
createSpace(composite); |
| 109 |
|
114 |
|
| 110 |
createOpenPrefControls(composite); |
115 |
createOpenPrefControls(composite); |
|
Lines 217-223
Link Here
|
| 217 |
}); |
222 |
}); |
| 218 |
|
223 |
|
| 219 |
} |
224 |
} |
| 220 |
|
225 |
|
|
|
226 |
/** |
| 227 |
* Create a composite that contains entry fields specifying the workspace name |
| 228 |
* preference. |
| 229 |
* |
| 230 |
* @param composite the Composite the group is created in. |
| 231 |
*/ |
| 232 |
private void createWindowTitleGroup(Composite composite) { |
| 233 |
Composite groupComposite = new Composite(composite, SWT.LEFT); |
| 234 |
GridLayout layout = new GridLayout(); |
| 235 |
layout.numColumns = 2; |
| 236 |
groupComposite.setLayout(layout); |
| 237 |
GridData gd = new GridData(); |
| 238 |
gd.horizontalAlignment = GridData.FILL; |
| 239 |
gd.grabExcessHorizontalSpace = true; |
| 240 |
groupComposite.setLayoutData(gd); |
| 241 |
|
| 242 |
workspaceName = new StringFieldEditor( |
| 243 |
IDEInternalPreferences.WORKSPACE_NAME, IDEWorkbenchMessages.IDEWorkspacePreference_workspaceName, |
| 244 |
groupComposite); |
| 245 |
|
| 246 |
workspaceName.setPreferenceStore(getIDEPreferenceStore()); |
| 247 |
workspaceName.load(); |
| 248 |
workspaceName.setPage(this); |
| 249 |
} |
| 250 |
|
| 221 |
/** |
251 |
/** |
| 222 |
* Create the Refresh controls |
252 |
* Create the Refresh controls |
| 223 |
* |
253 |
* |
|
Lines 345-350
Link Here
|
| 345 |
.setSelection(store |
375 |
.setSelection(store |
| 346 |
.getDefaultBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); |
376 |
.getDefaultBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD)); |
| 347 |
saveInterval.loadDefault(); |
377 |
saveInterval.loadDefault(); |
|
|
378 |
workspaceName.loadDefault(); |
| 348 |
|
379 |
|
| 349 |
boolean closeUnrelatedProj = store.getDefaultBoolean(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS); |
380 |
boolean closeUnrelatedProj = store.getDefaultBoolean(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS); |
| 350 |
closeUnrelatedProjectButton.setSelection(closeUnrelatedProj); |
381 |
closeUnrelatedProjectButton.setSelection(closeUnrelatedProj); |
|
Lines 413-418
Link Here
|
| 413 |
} |
444 |
} |
| 414 |
} |
445 |
} |
| 415 |
|
446 |
|
|
|
447 |
workspaceName.store(); |
| 448 |
|
| 416 |
Preferences preferences = ResourcesPlugin.getPlugin() |
449 |
Preferences preferences = ResourcesPlugin.getPlugin() |
| 417 |
.getPluginPreferences(); |
450 |
.getPluginPreferences(); |
| 418 |
|
451 |
|