1 11 package org.eclipse.team.internal.ui.preferences; 12 13 import org.eclipse.jface.preference.FieldEditorPreferencePage; 14 import org.eclipse.jface.preference.RadioGroupFieldEditor; 15 import org.eclipse.team.internal.ui.*; 16 import org.eclipse.ui.IWorkbench; 17 import org.eclipse.ui.IWorkbenchPreferencePage; 18 19 public class ResourceModelPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceIds { 20 21 private RadioGroupFieldEditor defaultLayout; 22 23 public ResourceModelPreferencePage() { 24 super(GRID); 25 setTitle(TeamUIMessages.SynchronizationCompareAdapter_0); 26 setDescription(TeamUIMessages.ResourceModelPreferencePage_0); 27 setPreferenceStore(TeamUIPlugin.getPlugin().getPreferenceStore()); 28 } 29 30 33 protected void createFieldEditors() { 34 defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT, 35 TeamUIMessages.SyncViewerPreferencePage_0, 3, 36 new String [][] { 37 {TeamUIMessages.SyncViewerPreferencePage_1, FLAT_LAYOUT}, 38 {TeamUIMessages.SyncViewerPreferencePage_2, TREE_LAYOUT}, 39 {TeamUIMessages.SyncViewerPreferencePage_3, COMPRESSED_LAYOUT} 40 }, 41 getFieldEditorParent(), true ); 42 addField(defaultLayout); 43 } 44 45 48 public void init(IWorkbench workbench) { 49 } 51 52 55 public boolean performOk() { 56 TeamUIPlugin.getPlugin().savePluginPreferences(); 57 return super.performOk(); 58 } 59 60 } 61 | Popular Tags |