1 11 package org.eclipse.pde.internal.ui.preferences; 12 13 import org.eclipse.jface.dialogs.Dialog; 14 import org.eclipse.jface.preference.PreferencePage; 15 import org.eclipse.pde.internal.ui.IHelpContextIds; 16 import org.eclipse.pde.internal.ui.PDEUIMessages; 17 import org.eclipse.swt.widgets.Composite; 18 import org.eclipse.swt.widgets.Control; 19 import org.eclipse.ui.IWorkbench; 20 import org.eclipse.ui.IWorkbenchPreferencePage; 21 import org.eclipse.ui.PlatformUI; 22 23 public class CompilersPreferencePage extends PreferencePage implements 24 IWorkbenchPreferencePage { 25 26 private CompilersConfigurationTab configurationBlock; 27 28 31 public CompilersPreferencePage() { 32 super(); 33 setDescription(PDEUIMessages.CompilersPreferencePage_desc); 34 setTitle(PDEUIMessages.CompilersPreferencePage_title); 36 37 configurationBlock = new CompilersConfigurationTab(null); 38 } 39 40 45 protected Control createContents(Composite parent) { 46 Control result = configurationBlock.createContents(parent); 47 Dialog.applyDialogFont(result); 48 return result; 49 } 50 51 54 public void createControl(Composite parent) { 55 super.createControl(parent); 56 PlatformUI.getWorkbench().getHelpSystem() 57 .setHelp(getControl(), IHelpContextIds.COMPILERS_PREFERENCE_PAGE); 58 } 59 60 65 public void init(IWorkbench workbench) { 66 } 67 68 71 protected void performDefaults() { 72 configurationBlock.performDefaults(); 73 super.performDefaults(); 74 } 75 76 79 public boolean performOk() { 80 if (!configurationBlock.performOk(true)) { 81 getContainer().updateButtons(); 82 return false; 83 } 84 return super.performOk(); 85 } 86 87 } 88 | Popular Tags |