KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > UpdateMergePreferencePage


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.internal.ccvs.ui;
12
13 import org.eclipse.jface.preference.RadioGroupFieldEditor;
14
15 public class UpdateMergePreferencePage extends CVSFieldEditorPreferencePage {
16
17     private RadioGroupFieldEditor updateStyle;
18     private RadioGroupFieldEditor updatePreviewStyle;
19
20     protected String JavaDoc getPageHelpContextId() {
21         return IHelpContextIds.UPDATE_MERGE_PREFERENCE_PAGE;
22     }
23
24     protected String JavaDoc getPageDescription() {
25         return null;
26     }
27
28     protected void createFieldEditors() {
29         
30         updateStyle = new RadioGroupFieldEditor(
31                         ICVSUIConstants.PREF_UPDATE_HANDLING,
32                         CVSUIMessages.WorkInProgressPage_0,
33                         1,
34                         new String JavaDoc[][] {
35                             new String JavaDoc[] {CVSUIMessages.WorkInProgressPage_1, ICVSUIConstants.PREF_UPDATE_HANDLING_PREVIEW},
36                             new String JavaDoc[] {CVSUIMessages.WorkInProgressPage_2, ICVSUIConstants.PREF_UPDATE_HANDLING_PERFORM},
37                             new String JavaDoc[] {CVSUIMessages.UpdateMergePreferencePage_0, ICVSUIConstants.PREF_UPDATE_HANDLING_TRADITIONAL}
38                         },
39                         getFieldEditorParent(),
40                         true);
41         addField(updateStyle);
42         
43         updatePreviewStyle = new RadioGroupFieldEditor(
44                 ICVSUIConstants.PREF_UPDATE_PREVIEW,
45                 CVSUIMessages.UpdateMergePreferencePage_1,
46                 1,
47                 new String JavaDoc[][] {
48                     new String JavaDoc[] {CVSUIMessages.UpdateMergePreferencePage_2, ICVSUIConstants.PREF_UPDATE_PREVIEW_IN_DIALOG},
49                     new String JavaDoc[] {CVSUIMessages.UpdateMergePreferencePage_3, ICVSUIConstants.PREF_UPDATE_PREVIEW_IN_SYNCVIEW}
50                 },
51                 getFieldEditorParent(),
52                 true);
53         addField(updatePreviewStyle);
54         
55         // TODO: Add option for sync and compare to use old or new (add to sync compare page)
56

57     }
58
59 }
60
Popular Tags