org.eclipse.ui.preferences.IWorkbenchPreferenceContainer Java Examples
The following examples show how to use
org.eclipse.ui.preferences.IWorkbenchPreferenceContainer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JavaEditorPropertyPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createContents(Composite parent) { final Composite composite= new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); composite.setLayout(new GridLayout()); Link link= new Link(composite, SWT.WRAP); GridData data= new GridData(SWT.FILL, SWT.BEGINNING, true, false); data.widthHint= 300; link.setLayoutData(data); link.setText(PreferencesMessages.JavaEditorPropertyPage_SaveActionLink_Text); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer)getContainer(); container.openPage(SaveParticipantPreferencePage.PROPERTY_PAGE_ID, null); } }); noDefaultAndApplyButton(); Dialog.applyDialogFont(composite); return composite; }
Example #2
Source File: ValidationPreferencePage.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
@Override public boolean performOk() { final boolean rebuild = rebuild(); final boolean reReconcile = needsReconcile(); Job buildJob = new ApplyChangesAndBuildJob(Messages.ValidationPreferencePage_RebuildJobTitle, rebuild, reReconcile); IPreferencePageContainer container = getContainer(); if (container instanceof IWorkbenchPreferenceContainer) { ((IWorkbenchPreferenceContainer) container).registerUpdateJob(buildJob); } else { buildJob.schedule(); } return true; }
Example #3
Source File: AbstractFormatterSelectionBlock.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
public AbstractFormatterSelectionBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, ProfileManager.collectPreferenceKeys(TEMP_LIST, true), container); Collections.sort(TEMP_LIST, new Comparator<IScriptFormatterFactory>() { public int compare(IScriptFormatterFactory s1, IScriptFormatterFactory s2) { return s1.getName().compareToIgnoreCase(s2.getName()); } }); factories = TEMP_LIST.toArray(new IScriptFormatterFactory[TEMP_LIST.size()]); TEMP_LIST = new ArrayList<IScriptFormatterFactory>(); sourcePreviewViewers = new ArrayList<SourceViewer>(); // Override the super preferences lookup order. // All the changes to the formatter settings should go to the instance scope (no project scope here). Only the // selected profile will be picked from the project scope and then the instance scope when requested. fLookupOrder = new IScopeContext[] { EclipseUtil.instanceScope(), EclipseUtil.defaultScope() }; }
Example #4
Source File: ComplianceConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public ComplianceConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(project != null), container); setDefaultCompilerComplianceValues(); fBlockEnableState= null; fComplianceFollowsEEControls= new ArrayList<Control>(); fComplianceControls= new ArrayList<Control>(); fComplianceChildControls= new ArrayList<Control>(); fComplianceStatus= new StatusInfo(); fRememberedUserCompliance= new String[] { // caution: order depends on IDX_* constants getValue(PREF_PB_ASSERT_AS_IDENTIFIER), getValue(PREF_PB_ENUM_AS_IDENTIFIER), getValue(PREF_SOURCE_COMPATIBILITY), getValue(PREF_CODEGEN_TARGET_PLATFORM), getValue(PREF_COMPLIANCE), getValue(PREF_CODEGEN_INLINE_JSR_BYTECODE), getValue(PREF_CODEGEN_METHOD_PARAMETERS_ATTR) }; }
Example #5
Source File: DebugPreferencePage.java From corrosion with Eclipse Public License 2.0 | 6 votes |
@Override protected Control createContents(Composite parent) { parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); Composite container = new Composite(parent, SWT.NONE); container.setLayout(new GridLayout(4, false)); container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1)); gdbInput = new InputComponent(container, Messages.DebugPreferencePage_defaultGDB, e -> isPageValid()); gdbInput.createComponent(); gdbInput.createFileSelection(); gdbInput.setValue(store.getString(CorrosionPreferenceInitializer.DEFAULT_GDB_PREFERENCE)); Link gdbLink = new Link(container, SWT.NONE); gdbLink.setText(Messages.DebugPreferencePage_seeGDBPage); gdbLink.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { IPreferencePageContainer prefContainer = getContainer(); if (prefContainer instanceof IWorkbenchPreferenceContainer) { ((IWorkbenchPreferenceContainer) prefContainer).openPage("org.eclipse.cdt.dsf.gdb.ui.preferences", //$NON-NLS-1$ null); } })); gdbLink.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1)); return parent; }
Example #6
Source File: AbstractN4JSPreferencePage.java From n4js with Eclipse Public License 1.0 | 6 votes |
@Override public boolean performOk() { IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer(); if (!processChanges(container)) { return false; } boolean retVal = super.performOk(); if (retVal && isProjectPreferencePage()) { try { IPreferenceStore preferenceStore = preferenceStoreAccessImpl.getWritablePreferenceStore(getProject()); if (preferenceStore instanceof IPersistentPreferenceStore) { ((IPersistentPreferenceStore) preferenceStore).save(); } } catch (Exception e) { System.err.println(e); retVal = false; } } return retVal; }
Example #7
Source File: CleanUpSaveParticipantPreferenceConfiguration.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private void configurePreferenceLink(Link link, final IJavaProject javaProject, final String preferenceId, final String propertyId) { link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (fContainer instanceof IWorkbenchPreferenceContainer) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer)fContainer; if (javaProject != null) { container.openPage(propertyId, null); } else { container.openPage(preferenceId, null); } } else { PreferencesUtil.createPreferenceDialogOn(fShell, preferenceId, null, null); } } }); }
Example #8
Source File: ProjectsWorkbookPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public ProjectsWorkbookPage(ListDialogField<CPListElement> classPathList, IWorkbenchPreferenceContainer pageContainer) { fClassPathList= classPathList; fPageContainer= pageContainer; fSWTControl= null; String[] buttonLabels= new String[] { NewWizardMessages.ProjectsWorkbookPage_projects_add_button, null, NewWizardMessages.ProjectsWorkbookPage_projects_edit_button, NewWizardMessages.ProjectsWorkbookPage_projects_remove_button }; ProjectsAdapter adapter= new ProjectsAdapter(); fProjectsList= new TreeListDialogField<CPListElement>(adapter, buttonLabels, new CPListLabelProvider()); fProjectsList.setDialogFieldListener(adapter); fProjectsList.setLabelText(NewWizardMessages.ProjectsWorkbookPage_projects_label); fProjectsList.enableButton(IDX_REMOVE, false); fProjectsList.enableButton(IDX_EDIT, false); fProjectsList.setViewerComparator(new CPListElementSorter()); }
Example #9
Source File: XMLPreferencePage.java From wildwebdeveloper with Eclipse Public License 2.0 | 6 votes |
@Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(1, false); layout.marginWidth = 0; layout.marginHeight = 0; composite.setLayout(layout); Link catalogsLink = new Link(composite, SWT.NONE); catalogsLink.setText(Messages.XMLPreferencesPage_XMLCatalogsLink); catalogsLink.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (getContainer() instanceof IWorkbenchPreferenceContainer) { ((IWorkbenchPreferenceContainer) getContainer()) .openPage("org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogPreferencePage", null); } } }); return composite; }
Example #10
Source File: YAMLPreferencePage.java From wildwebdeveloper with Eclipse Public License 2.0 | 6 votes |
@Override protected Control createContents(Composite parent) { parent.setLayoutData(new GridData(SWT.NONE, SWT.TOP, true, false)); Composite container = new Composite(parent, SWT.NONE); container.setLayout(new GridLayout(1, false)); Link yamlSchemasLink = new Link(container, SWT.NONE); yamlSchemasLink.setText("See <A>'Schemas'</A> to associate schemas to YAML files in the current workspace"); yamlSchemasLink.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> { if (getContainer() instanceof IWorkbenchPreferenceContainer) { ((IWorkbenchPreferenceContainer) getContainer()) .openPage("org.eclipse.wildwebdeveloper.yaml.YAMLSchemaPreferencePage", null); } })); return parent; }
Example #11
Source File: ImportOrganizePreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new ImportOrganizeConfigurationBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJavaHelpContextIds.ORGANIZE_IMPORTS_PREFERENCE_PAGE); }
Example #12
Source File: CodeTemplatePreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fCodeTemplateConfigurationBlock= new CodeTemplateBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.CODE_TEMPLATES_PREFERENCE_PAGE); }
Example #13
Source File: TodoTaskConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public TodoTaskConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); TaskTagAdapter adapter= new TaskTagAdapter(); String[] buttons= new String[] { PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_add_button, PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_edit_button, PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_remove_button, null, PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_setdefault_button, }; fTodoTasksList= new ListDialogField<TodoTask>(adapter, buttons, new TodoTaskLabelProvider()); fTodoTasksList.setDialogFieldListener(adapter); fTodoTasksList.setRemoveButtonIndex(IDX_REMOVE); String[] columnsHeaders= new String[] { PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_name_column, PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_priority_column, }; fTodoTasksList.setTableColumns(new ListDialogField.ColumnsDescription(columnsHeaders, true)); fTodoTasksList.setViewerComparator(new TodoTaskSorter()); fCaseSensitiveCheckBox= new SelectionButtonDialogField(SWT.CHECK); fCaseSensitiveCheckBox.setLabelText(PreferencesMessages.TodoTaskConfigurationBlock_casesensitive_label); fCaseSensitiveCheckBox.setDialogFieldListener(adapter); unpackTodoTasks(); if (fTodoTasksList.getSize() > 0) { fTodoTasksList.selectFirstElement(); } else { fTodoTasksList.enableButton(IDX_EDIT, false); fTodoTasksList.enableButton(IDX_DEFAULT, false); } fTaskTagsStatus= new StatusInfo(); }
Example #14
Source File: CompliancePreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new ComplianceConfigurationBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); if (isProjectPreferencePage()) { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.COMPILER_PROPERTY_PAGE); } else { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.COMPILER_PREFERENCE_PAGE); } }
Example #15
Source File: CodeStylePreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new NameConventionConfigurationBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.CODE_MANIPULATION_PREFERENCE_PAGE); }
Example #16
Source File: CodeAssistAdvancedPreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new CodeAssistAdvancedConfigurationBlock(getNewStatusChangedListener(), container); super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE); }
Example #17
Source File: JavaBuildPreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new JavaBuildConfigurationBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); if (isProjectPreferencePage()) { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_BUILD_PROPERTY_PAGE); } else { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_BUILD_PREFERENCE_PAGE); } }
Example #18
Source File: CodeAssistFavoritesPreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new CodeAssistFavoritesConfigurationBlock(getNewStatusChangedListener(), container); super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE); }
Example #19
Source File: CodeAssistAdvancedConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected boolean processChanges(IWorkbenchPreferenceContainer container) { for (Iterator<ModelElement> it= fModel.elements.iterator(); it.hasNext();) { ModelElement item= it.next(); item.update(); } return super.processChanges(container); }
Example #20
Source File: CodeAssistPreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new CodeAssistConfigurationBlock(getNewStatusChangedListener(), container); super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE); }
Example #21
Source File: LibrariesWorkbookPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public LibrariesWorkbookPage(CheckedListDialogField<CPListElement> classPathList, IWorkbenchPreferenceContainer pageContainer) { fClassPathList= classPathList; fPageContainer= pageContainer; fSWTControl= null; String[] buttonLabels= new String[] { NewWizardMessages.LibrariesWorkbookPage_libraries_addjar_button, NewWizardMessages.LibrariesWorkbookPage_libraries_addextjar_button, NewWizardMessages.LibrariesWorkbookPage_libraries_addvariable_button, NewWizardMessages.LibrariesWorkbookPage_libraries_addlibrary_button, NewWizardMessages.LibrariesWorkbookPage_libraries_addclassfolder_button, NewWizardMessages.LibrariesWorkbookPage_libraries_addextfolder_button, /* */ null, NewWizardMessages.LibrariesWorkbookPage_libraries_edit_button, NewWizardMessages.LibrariesWorkbookPage_libraries_remove_button, /* */ null, NewWizardMessages.LibrariesWorkbookPage_libraries_replace_button }; LibrariesAdapter adapter= new LibrariesAdapter(); fLibrariesList= new TreeListDialogField<CPListElement>(adapter, buttonLabels, new CPListLabelProvider()); fLibrariesList.setDialogFieldListener(adapter); fLibrariesList.setLabelText(NewWizardMessages.LibrariesWorkbookPage_libraries_label); fLibrariesList.enableButton(IDX_REMOVE, false); fLibrariesList.enableButton(IDX_EDIT, false); fLibrariesList.enableButton(IDX_REPLACE, false); fLibrariesList.setViewerComparator(new CPListElementSorter()); }
Example #22
Source File: ProblemSeveritiesConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public ProblemSeveritiesConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); // Compatibility code for the merge of the two option PB_SIGNAL_PARAMETER: if (ENABLED.equals(getValue(PREF_PB_SIGNAL_PARAMETER_IN_ABSTRACT))) { setValue(PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING, ENABLED); } }
Example #23
Source File: AbstractExtraLanguagePropertyPage.java From sarl with Apache License 2.0 | 5 votes |
@Override public void createControl(Composite parent) { final IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer(); this.builderConfigurationBlock.setProject(getProject()); this.builderConfigurationBlock.setWorkbenchPreferenceContainer(container); this.builderConfigurationBlock.setStatusChangeListener(getNewStatusChangedListener()); super.createControl(parent); }
Example #24
Source File: EditorsPreferencePage.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
private void createTextEditorLink(Composite appearanceComposite) { // Link to general text editor prefs from Eclipse - they can set tabs/spaces/whitespace drawing, etc Link link = new Link(appearanceComposite, SWT.NONE); link.setText(Messages.EditorsPreferencePage_GeneralTextEditorPrefLink); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { ((IWorkbenchPreferenceContainer) getContainer()).openPage(GENERAL_TEXT_EDITOR_PREF_ID, null); } }); }
Example #25
Source File: AbstractOptionsBlock.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public AbstractOptionsBlock(IStatusChangeListener context, IProject project, PreferenceKey[] allKeys, IWorkbenchPreferenceContainer container) { super(context, project, allKeys, container); this.bindManager = new ControlBindingManager(this, context); }
Example #26
Source File: JavaEditorCodeMiningConfigurationBlock.java From jdt-codemining with Eclipse Public License 1.0 | 5 votes |
@Override protected boolean processChanges(IWorkbenchPreferenceContainer container) { String enabled = fJavaMethodFiltersTable.getEnabled(); setValue(PREF_SHOW_METHOD_PARAMETER_FILTERS_ENABLED, enabled); String disabled = fJavaMethodFiltersTable.getDisabled(); setValue(PREF_SHOW_METHOD_PARAMETER_FILTERS_DISABLED, disabled); return super.processChanges(container); }
Example #27
Source File: AbstractConfigurationBlockPropertyAndPreferencePage.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public final void createControl(Composite parent) { // create the configuration block here so the page works as both types IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer(); block = createOptionsBlock(getNewStatusChangedListener(), getProject(), container); // calls createPreferenceContent(Composite) super.createControl(parent); String helpId = isProjectPreferencePage() ? getProjectHelpId() : getHelpId(); if (helpId != null) { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), helpId); } }
Example #28
Source File: PropertyLinkArea.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public PropertyLinkArea(Composite parent, int style, final String pageId, IAdaptable element, String message, final IWorkbenchPreferenceContainer pageContainer) { this.element = element; pageLink = new Link(parent, style); IPreferenceNode node = getPreferenceNode(pageId); String text = null; if (node == null) { text = NLS.bind(WorkbenchMessages.PreferenceNode_NotFound, pageId); } else { text = NLS.bind(message, node.getLabelText()); } pageLink.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { pageContainer.openPage(pageId, null); } }); pageLink.setText(text); }
Example #29
Source File: SVNDecoratorPreferencesPage.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * create the Label Decoration/general page * @param parent * @return */ private Control createGeneralDecoratorPage(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); composite.setLayout(layout); GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; composite.setLayoutData(data); SWTUtils.createPreferenceLink((IWorkbenchPreferenceContainer) getContainer(), composite, "org.eclipse.ui.preferencePages.Decorators", Policy.bind("SVNDecoratorPreferencesPage.labelDecorationsLink")); //$NON-NLS-1$ //$NON-NLS-2$ showDirty = createCheckBox(composite, Policy.bind("SVNDecoratorPreferencesPage.computeDeep")); //$NON-NLS-1$ enableFontDecorators = createCheckBox(composite, Policy.bind("SVNDecoratorPreferencesPage.useFontDecorators")); //$NON-NLS-1$ SWTUtils.createPreferenceLink((IWorkbenchPreferenceContainer) getContainer(), composite, "org.eclipse.ui.preferencePages.ColorsAndFonts", Policy.bind("SVNDecoratorPreferencesPage.colorsAndFontsLink")); //$NON-NLS-1$ //$NON-NLS-2$ return composite; }
Example #30
Source File: EditboxPreferencePage.java From gama with GNU General Public License v3.0 | 5 votes |
@Override protected Control createContents(final Composite parent) { noDefaultAndApplyButton(); final Composite c = new Composite(parent, SWT.NONE); c.setLayout(new GridLayout(1, false)); final Link link = new Link(c, SWT.NONE); link.setText("Turn off current line highlighting <A>here</A>."); final FontData[] fontData = link.getFont().getFontData(); for (final FontData fd : fontData) { fd.setHeight(10); fd.setStyle(SWT.BOLD); } link.setFont(new Font(getShell().getDisplay(), fontData)); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { final IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer(); container.openPage("org.eclipse.ui.preferencePages.GeneralTextEditor", null); } }); folder = new TabFolder(c, SWT.NONE); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); final TabItem ti = new TabItem(folder, SWT.NONE); ti.setText("Themes"); ti.setControl(createCategoryControl(folder)); folder.pack(); return c; }