1 11 package org.eclipse.ui.internal.ide.dialogs; 12 13 import org.eclipse.swt.SWT; 14 import org.eclipse.swt.layout.GridData; 15 import org.eclipse.swt.widgets.Composite; 16 import org.eclipse.swt.widgets.Control; 17 import org.eclipse.ui.dialogs.PreferenceLinkArea; 18 import org.eclipse.ui.internal.dialogs.EditorsPreferencePage; 19 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; 20 import org.eclipse.ui.internal.tweaklets.TabBehaviour; 21 import org.eclipse.ui.internal.tweaklets.Tweaklets; 22 import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; 23 24 30 public class IDEEditorsPreferencePage extends EditorsPreferencePage { 31 32 protected Control createContents(Composite parent) { 33 Composite composite = createComposite(parent); 34 35 PreferenceLinkArea fileEditorsArea = new PreferenceLinkArea(composite, SWT.NONE, 36 "org.eclipse.ui.preferencePages.FileEditors", IDEWorkbenchMessages.IDEEditorsPreferencePage_WorkbenchPreference_FileEditorsRelatedLink, (IWorkbenchPreferenceContainer) getContainer(),null); 38 39 GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); 40 fileEditorsArea.getControl().setLayoutData(data); 41 42 PreferenceLinkArea contentTypeArea = new PreferenceLinkArea(composite, SWT.NONE, 43 "org.eclipse.ui.preferencePages.ContentTypes", IDEWorkbenchMessages.IDEEditorsPreferencePage_WorkbenchPreference_contentTypesRelatedLink, (IWorkbenchPreferenceContainer) getContainer(),null); 45 46 data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); 47 contentTypeArea.getControl().setLayoutData(data); 48 49 PreferenceLinkArea appearanceArea = new PreferenceLinkArea(composite, SWT.NONE, 50 "org.eclipse.ui.preferencePages.Views", IDEWorkbenchMessages.IDEEditorsPreferencePage_WorkbenchPreference_viewsRelatedLink, (IWorkbenchPreferenceContainer) getContainer(),null); 52 53 data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); 54 appearanceArea.getControl().setLayoutData(data); 55 56 createEditorHistoryGroup(composite); 57 58 createSpace(composite); 59 createShowMultipleEditorTabsPref(composite); 60 createUseIPersistablePref(composite); 61 createPromptWhenStillOpenPref(composite); 62 createEditorReuseGroup(composite); 63 ((TabBehaviour)Tweaklets.get(TabBehaviour.KEY)).setPreferenceVisibility(editorReuseGroup, showMultipleEditorTabs); 64 65 applyDialogFont(composite); 66 67 super.setHelpContext(parent); 68 69 return composite; 70 } 71 72 } 73 | Popular Tags |