Task #2142

Task #690: Reorganize TXM source code to better match the RCP development plug-ins system.

Task #2141: Reorganize R stats engine into plug-in projects

R stats engine, default preferences

Added by Sebastien Jacquot about 2 years ago. Updated 8 months ago.

Status:Closed Start date:04/10/2017
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Development Spent time: -
Target version:TXM 0.8.0a (split/restructuration)

Description

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:

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

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

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

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

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

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

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

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

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

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

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

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

Values:

    preferences.putBoolean(IS_MANDATORY, false);
    preferences.put(PATH_TO_EXECUTABLE, "");
    preferences.put(SERVER_ADDRESS, "127.0.0.1");
    preferences.putBoolean(REMOTE, false);
    preferences.putBoolean(DISABLE, false);
    preferences.putBoolean(DEBUG, false);
    preferences.put(PORT, "6311");
    preferences.put(USER, "");
    preferences.put(PASSWORD, "");
    preferences.put(RARGS, "");
    preferences.put(RSERVEARGS, "");
    preferences.putBoolean(FILE_TRANSFERT, false);
    preferences.put(SVG_DEVICE, "svg");

History

#1 Updated by Sebastien Jacquot about 2 years ago

  • Description updated (diff)

#2 Updated by Sebastien Jacquot about 2 years ago

  • Description updated (diff)

#3 Updated by Sebastien Jacquot about 2 years ago

Default PATH_TO_EXECUTABLE should be set/edit here to target R since we now embed it?
Need to adjust this after the SVN branches syncho.

#4 Updated by Sebastien Jacquot about 2 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

#5 Updated by Sebastien Jacquot over 1 year ago

New location: org.txm.statsengine.r.core
+ see the fixme above:

@Override
    public void initializeDefaultPreferences() {
        Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);

        //FIXME: need to define here the PATH_TO_EXECUTABLE preference according to current OS and the current TXM install directory
        // If the paths are different according to the current OS, a good way could be to have the same projects as for CQP
        // Project: org.txm.r
        // Fragment: org.txm.r.win64
        // Fragment: org.txm.r.linux
        // and the fragment should initialize this preference
        preferences.put(PATH_TO_EXECUTABLE, "undefined");

        preferences.putBoolean(IS_MANDATORY, false);
        preferences.put(SERVER_ADDRESS, "127.0.0.1");
        preferences.putBoolean(REMOTE, false);
        preferences.putBoolean(DISABLE, false);
        preferences.putBoolean(DEBUG, false);
        preferences.put(PORT, "6311");
        preferences.put(USER, "");
        preferences.put(PASSWORD, "");
        preferences.put(RARGS, "");
        preferences.put(RSERVEARGS, "");
        preferences.putBoolean(FILE_TRANSFERT, false);
        preferences.put(SVG_DEVICE, "svg");

    }

#6 Updated by Sebastien Jacquot 8 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

Done by MD

Also available in: Atom PDF