Revision 2652

tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/RCPPreferences.java (revision 2652)
7 7

  
8 8
/**
9 9
 * RCP Preferences initializer.
10
 * 
10 11
 * @author mdecorde
11 12
 * @author sjacquot
12 13
 *
13 14
 */
14 15
public class RCPPreferences extends TBXPreferences {
15

  
16 16
	
17
//	public static final String PREFERENCES_NODE = FrameworkUtil.getBundle(RCPPreferences.class).getSymbolicName();
18

  
17
	
18
	// public static final String PREFERENCES_NODE = FrameworkUtil.getBundle(RCPPreferences.class).getSymbolicName();
19
	
19 20
	/**
20 21
	 * enable/disable system notifications when TXM ends a long task
21 22
	 */
......
23 24
	
24 25
	/** Preference set with the osgi-nl parameter */
25 26
	public static final String CONFIG_LOCALE = "ui_locale"; //$NON-NLS-1$
27
	
26 28
	/** Preference set with the -Xms parameter */
27 29
	public static final String CONFIG_XMS = "config_xms"; //$NON-NLS-1$
30
	
28 31
	/** Preference set with the osgi-nl parameter */
29 32
	public static final String CONFIG_XMX = "config_xmx"; //$NON-NLS-1$
30 33
	
31 34
	/** The Constant USER_ALERT_DELETE. */
32 35
	public static final String USER_ALERT_DELETE = "user_alert_delete"; //$NON-NLS-1$
33

  
36
	
34 37
	/**
35 38
	 * To auto compute result and refresh editor when a form computing parameter is modified.
36 39
	 */
37 40
	public static final String AUTO_UPDATE_EDITOR = "auto_update_editor"; //$NON-NLS-1$
38
	public static final String AUTO_COMPUTE_ON_EDITOR_OPEN = "auto_compute_editor"; //$NON-NLS-1$
41
	// public static final String AUTO_COMPUTE_ON_EDITOR_OPEN = "auto_compute_editor"; //$NON-NLS-1$
39 42
	
40
	public static final String SHOW_SEVERE_DIALOG = "show_severe_dialog"; 
41

  
43
	public static final String SHOW_SEVERE_DIALOG = "show_severe_dialog";
44
	
42 45
	public static final String UPDATE_LEVEL = "update_level"; //$NON-NLS-1$
46
	
43 47
	/** The Constant FILES_TO_HIDE. */
44 48
	public static final String FILES_TO_HIDE = "files_to_hide"; //$NON-NLS-1$
45

  
49
	
46 50
	public static final String SHOW_HIDDEN_FILES = "show_hidden_files"; //$NON-NLS-1$
47

  
51
	
48 52
	public static final String SHOW_FOLDERS = "show_folders"; //$NON-NLS-1$
49

  
53
	
50 54
	/** The Constant NO_SESSION. */
51 55
	public static final String NO_SESSION = "script_nosession"; //$NON-NLS-1$
52

  
56
	
53 57
	public static final String SAVE_BEFORE_EXECUTION = "script_save_before_execution"; //$NON-NLS-1$
54

  
58
	
55 59
	/** The Constant N_LINE_PER_PAGE_DEFAULT. */
56 60
	public static final int N_LINE_PER_PAGE_DEFAULT = 100;
57

  
61
	
58 62
	/** The Constant LEFT_CONTEXT_SIZE_DEFAULT. */
59 63
	public static final int LEFT_CONTEXT_SIZE_DEFAULT = 15;
60

  
64
	
61 65
	/** The Constant RIGHT_CONTEXT_SIZE_DEFAULT. */
62 66
	public static final int RIGHT_CONTEXT_SIZE_DEFAULT = 15;
63

  
67
	
64 68
	public static final String UPDATESITE = "update_site"; //$NON-NLS-1$
65 69
	
66 70
	
......
69 73
	
70 74
	@Override
71 75
	public void initializeDefaultPreferences() {
72

  
76
		
73 77
		// FIXME: to store/merge and share all the prefs in the Core node
74 78
		this.commandPreferencesNodeQualifier = "org.txm.core";
75 79
		
76
		//super.initializeDefaultPreferences();
80
		// super.initializeDefaultPreferences();
77 81
		Preferences preferences = this.getDefaultPreferencesNode();
78

  
82
		
79 83
		preferences.put(TBXPreferences.EXPORT_ENCODING, System.getProperty("file.encoding")); //$NON-NLS-1$
80 84
		preferences.put(TBXPreferences.EXPORT_COL_SEPARATOR, "\t"); //$NON-NLS-1$
81 85
		preferences.put(TBXPreferences.EXPORT_TXT_SEPARATOR, ""); //$NON-NLS-1$
......
84 88
		preferences.put(UPDATE_LEVEL, "STABLE"); //$NON-NLS-1$
85 89
		
86 90
		preferences.putBoolean(AUTO_UPDATE_EDITOR, false);
87
		preferences.putBoolean(AUTO_COMPUTE_ON_EDITOR_OPEN, true);
91
		// preferences.putBoolean(AUTO_COMPUTE_ON_EDITOR_OPEN, true);
88 92
		preferences.putBoolean(SHOW_SEVERE_DIALOG, false);
89 93
		preferences.putBoolean(USER_ALERT_DELETE, false);
90 94
		preferences.putBoolean(SAVE_BEFORE_EXECUTION, false);
......
97 101
	
98 102
	/**
99 103
	 * Gets the instance.
104
	 * 
100 105
	 * @return the instance
101 106
	 */
102
	public static TXMPreferences getInstance()	{
107
	public static TXMPreferences getInstance() {
103 108
		if (!TXMPreferences.instances.containsKey(RCPPreferences.class)) {
104 109
			new RCPPreferences();
105 110
		}
tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/UserPreferencePage.java (revision 2652)
58 58
		this.addField(new BooleanFieldEditor(RCPPreferences.AUTO_UPDATE_EDITOR, TXMUIMessages.automaticRecomputingWhenChangingAParameter, BooleanFieldEditor.SEPARATE_LABEL, this
59 59
				.getFieldEditorParent()));
60 60
		
61
		this.addField(new BooleanFieldEditor(RCPPreferences.AUTO_COMPUTE_ON_EDITOR_OPEN, "Compute when opening its window", BooleanFieldEditor.SEPARATE_LABEL, this.getFieldEditorParent()));
61
		// this.addField(new BooleanFieldEditor(RCPPreferences.AUTO_COMPUTE_ON_EDITOR_OPEN, "Compute when opening its window", BooleanFieldEditor.SEPARATE_LABEL, this.getFieldEditorParent()));
62 62
		
63 63
		// Auto save each result after computing and auto load them at startup
64 64
		this.addField(new BooleanFieldEditor(TBXPreferences.AUTO_PERSISTENCE_ENABLED, TXMUIMessages.enableAutomaticSaveOfAllResultsPersistence, BooleanFieldEditor.SEPARATE_LABEL, this

Also available in: Unified diff