Task #2142

Updated by Sebastien Jacquot about 3 years ago

Done.

Location: /org.txm.r/src/org/txm/r/core/preferences/RPreferences.java

To avoid the cyclic plug-ins dependencies a new class has been created containing the TBX R related code: /org.txm.r/src/org/txm/r/core/RStatsEngine.java

Names:

<pre>

public static final String PREFERENCES_PREFIX = "r_"; //$NON-NLS-1$

/** The Constant R_REMOTE. */
public static final String IS_MANDATORY IS_R_MANDATORY = PREFERENCES_PREFIX + "is_mandatory"; //$NON-NLS-1$

/** The Constant R_PATH_TO_EXECUTABLE. */
public static final String PATH_TO_EXECUTABLE R_PATH_TO_EXECUTABLE = PREFERENCES_PREFIX + "path_to_executable"; //$NON-NLS-1$

/** The Constant R_REMOTE. */
public static final String REMOTE R_REMOTE = PREFERENCES_PREFIX + "remote"; //$NON-NLS-1$
public static final String DEBUG R_DEBUG = PREFERENCES_PREFIX + "debug"; //$NON-NLS-1$

/** The Constant R_SERVER_ADDRESS. */
public static final String SERVER_ADDRESS R_SERVER_ADDRESS = PREFERENCES_PREFIX + "server_adress"; //$NON-NLS-1$

/** The Constant R_PORT. */
public static final String PORT R_PORT = PREFERENCES_PREFIX + "port"; //$NON-NLS-1$

/** The Constant R_USER. */
public static final String USER R_USER = PREFERENCES_PREFIX + "user"; //$NON-NLS-1$

/** The Constant R_PASSWORD. */
public static final String PASSWORD R_PASSWORD = PREFERENCES_PREFIX + "password"; //$NON-NLS-1$

/** The Constant R_PACKAGES_PATH. */
public static final String PACKAGES_PATH R_PACKAGES_PATH = PREFERENCES_PREFIX + "packages_path"; //$NON-NLS-1$

public static final String RARGS R_RARGS = PREFERENCES_PREFIX + "rargs"; //$NON-NLS-1$
public static final String RSERVEARGS R_RSERVEARGS = PREFERENCES_PREFIX + "rserveargs"; //$NON-NLS-1$

/** The Constant R_DISABLE. */
public static final String DISABLE R_DISABLE = PREFERENCES_PREFIX + "disable"; //$NON-NLS-1$

/** The Constant R_FILE_TRANSFERT. */
public static final String FILE_TRANSFERT R_FILE_TRANSFERT = PREFERENCES_PREFIX + "file_transfert"; //$NON-NLS-1$
public static final String SVG_DEVICE R_SVG_DEVICE = PREFERENCES_PREFIX + "svg_device"; //$NON-NLS-1$
</pre>

Values:

<pre>
preferences.putBoolean(IS_MANDATORY, preferences.putBoolean(IS_R_MANDATORY, false);
preferences.put(PATH_TO_EXECUTABLE, preferences.put(R_PATH_TO_EXECUTABLE, "");
preferences.put(SERVER_ADDRESS, preferences.put(R_SERVER_ADDRESS, "127.0.0.1");
preferences.putBoolean(REMOTE, preferences.putBoolean(R_REMOTE, false);
preferences.putBoolean(DISABLE, preferences.putBoolean(R_DISABLE, false);
preferences.putBoolean(DEBUG, preferences.putBoolean(R_DEBUG, false);
preferences.put(PORT, preferences.put(R_PORT, "6311");
preferences.put(USER, preferences.put(R_USER, "");
preferences.put(PASSWORD, preferences.put(R_PASSWORD, "");
preferences.put(RARGS, preferences.put(R_RARGS, "");
preferences.put(RSERVEARGS, preferences.put(R_RSERVEARGS, "");
preferences.putBoolean(FILE_TRANSFERT, preferences.putBoolean(R_FILE_TRANSFERT, false);
preferences.put(SVG_DEVICE, preferences.put(R_SVG_DEVICE, "svg");
</pre>

Back