|
Lines 54-59
Link Here
|
| 54 |
|
54 |
|
| 55 |
protected Button showMultipleEditorTabs; |
55 |
protected Button showMultipleEditorTabs; |
| 56 |
|
56 |
|
|
|
57 |
protected Button useIPersistableEditor; |
| 58 |
|
| 57 |
private Composite editorReuseIndentGroup; |
59 |
private Composite editorReuseIndentGroup; |
| 58 |
|
60 |
|
| 59 |
private Composite editorReuseThresholdGroup; |
61 |
private Composite editorReuseThresholdGroup; |
|
Lines 82-87
Link Here
|
| 82 |
createEditorHistoryGroup(composite); |
84 |
createEditorHistoryGroup(composite); |
| 83 |
|
85 |
|
| 84 |
createSpace(composite); |
86 |
createSpace(composite); |
|
|
87 |
createUseIPersistablePref(composite); |
| 85 |
createShowMultipleEditorTabsPref(composite); |
88 |
createShowMultipleEditorTabsPref(composite); |
| 86 |
createEditorReuseGroup(composite); |
89 |
createEditorReuseGroup(composite); |
| 87 |
((TabBehaviour)Tweaklets.get(TabBehaviour.class)).setPreferenceVisibility(editorReuseGroup, showMultipleEditorTabs); |
90 |
((TabBehaviour)Tweaklets.get(TabBehaviour.class)).setPreferenceVisibility(editorReuseGroup, showMultipleEditorTabs); |
|
Lines 112-117
Link Here
|
| 112 |
setButtonLayoutData(showMultipleEditorTabs); |
115 |
setButtonLayoutData(showMultipleEditorTabs); |
| 113 |
} |
116 |
} |
| 114 |
|
117 |
|
|
|
118 |
protected void createUseIPersistablePref(Composite composite) { |
| 119 |
useIPersistableEditor = new Button(composite, SWT.CHECK); |
| 120 |
useIPersistableEditor.setText(WorkbenchMessages.WorkbenchPreference_useIPersistableEditorButton); |
| 121 |
useIPersistableEditor.setFont(composite.getFont()); |
| 122 |
useIPersistableEditor.setSelection(getPreferenceStore().getBoolean( |
| 123 |
IPreferenceConstants.USE_IPERSISTABLE_EDITORS)); |
| 124 |
setButtonLayoutData(useIPersistableEditor); |
| 125 |
} |
| 126 |
|
| 115 |
protected Composite createComposite(Composite parent) { |
127 |
protected Composite createComposite(Composite parent) { |
| 116 |
Composite composite = new Composite(parent, SWT.NULL); |
128 |
Composite composite = new Composite(parent, SWT.NULL); |
| 117 |
GridLayout layout = new GridLayout(); |
129 |
GridLayout layout = new GridLayout(); |
|
Lines 131-138
Link Here
|
| 131 |
protected void performDefaults() { |
143 |
protected void performDefaults() { |
| 132 |
IPreferenceStore store = getPreferenceStore(); |
144 |
IPreferenceStore store = getPreferenceStore(); |
| 133 |
showMultipleEditorTabs |
145 |
showMultipleEditorTabs |
| 134 |
.setSelection(store |
146 |
.setSelection(store |
| 135 |
.getDefaultBoolean(IPreferenceConstants.SHOW_MULTIPLE_EDITOR_TABS)); |
147 |
.getDefaultBoolean(IPreferenceConstants.SHOW_MULTIPLE_EDITOR_TABS)); |
|
|
148 |
useIPersistableEditor |
| 149 |
.setSelection(store |
| 150 |
.getDefaultBoolean(IPreferenceConstants.USE_IPERSISTABLE_EDITORS)); |
| 136 |
reuseEditors.setSelection(store |
151 |
reuseEditors.setSelection(store |
| 137 |
.getDefaultBoolean(IPreferenceConstants.REUSE_EDITORS_BOOLEAN)); |
152 |
.getDefaultBoolean(IPreferenceConstants.REUSE_EDITORS_BOOLEAN)); |
| 138 |
dirtyEditorReuseGroup.setEnabled(reuseEditors.getSelection()); |
153 |
dirtyEditorReuseGroup.setEnabled(reuseEditors.getSelection()); |
|
Lines 154-159
Link Here
|
| 154 |
IPreferenceStore store = getPreferenceStore(); |
169 |
IPreferenceStore store = getPreferenceStore(); |
| 155 |
store.setValue(IPreferenceConstants.SHOW_MULTIPLE_EDITOR_TABS, |
170 |
store.setValue(IPreferenceConstants.SHOW_MULTIPLE_EDITOR_TABS, |
| 156 |
showMultipleEditorTabs.getSelection()); |
171 |
showMultipleEditorTabs.getSelection()); |
|
|
172 |
store.setValue(IPreferenceConstants.USE_IPERSISTABLE_EDITORS, |
| 173 |
useIPersistableEditor.getSelection()); |
| 157 |
|
174 |
|
| 158 |
// store the reuse editors setting |
175 |
// store the reuse editors setting |
| 159 |
store.setValue(IPreferenceConstants.REUSE_EDITORS_BOOLEAN, reuseEditors |
176 |
store.setValue(IPreferenceConstants.REUSE_EDITORS_BOOLEAN, reuseEditors |