Package org.eclipse.php.internal.debug.core.xdebug.dbgp

Examples of org.eclipse.php.internal.debug.core.xdebug.dbgp.DBGpPreferences


   * <li>show super globals
   *
   * @return
   */
  public static DBGpPreferences createSessionPreferences() {
    DBGpPreferences sessionPrefs = new DBGpPreferences();
    Preferences uiPrefs = getPreferences();
    int maxDepth = uiPrefs
        .getInt(XDebugPreferenceMgr.XDEBUG_PREF_ARRAYDEPTH);
    if (1 == maxDepth) {
      XDebugPreferenceMgr.setDefaults();
      maxDepth = XDebugPreferenceMgr.getDepthDefault();
    }
    sessionPrefs
        .setValue(DBGpPreferences.DBGP_MAX_DEPTH_PROPERTY, maxDepth);

    int maxChildren = uiPrefs
        .getInt(XDebugPreferenceMgr.XDEBUG_PREF_CHILDREN);
    sessionPrefs.setValue(DBGpPreferences.DBGP_MAX_CHILDREN_PROPERTY,
        maxChildren);

    int maxData = uiPrefs.getInt(XDebugPreferenceMgr.XDEBUG_PREF_DATA);
    sessionPrefs.setValue(DBGpPreferences.DBGP_MAX_DATA_PROPERTY, maxData);

    boolean getSuperGlobals = uiPrefs
        .getBoolean(XDebugPreferenceMgr.XDEBUG_PREF_SHOWSUPERGLOBALS);
    sessionPrefs.setValue(DBGpPreferences.DBGP_SHOW_GLOBALS_PROPERTY,
        getSuperGlobals);

    // ui stored values are identical to DBGp expected values so no need to
    // convert
    int captureStdout = uiPrefs
        .getInt(XDebugPreferenceMgr.XDEBUG_PREF_CAPTURESTDOUT);
    sessionPrefs.setValue(DBGpPreferences.DBGP_CAPTURE_STDOUT_PROPERTY,
        captureStdout);

    int captureStderr = uiPrefs
        .getInt(XDebugPreferenceMgr.XDEBUG_PREF_CAPTURESTDERR);
    sessionPrefs.setValue(DBGpPreferences.DBGP_CAPTURE_STDERR_PROPERTY,
        captureStderr);

    return sessionPrefs;

  }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.debug.core.xdebug.dbgp.DBGpPreferences

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.