示例#1
0
 public static String trimDisplayResult(String result) {
   int max = DebugUITools.getPreferenceStore().getInt(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH);
   if (max > 0 && result.length() > max) {
     result = result.substring(0, max) + "..."; // $NON-NLS-1$
   }
   return result;
 }
示例#2
0
  /* (non-Javadoc)
   * @see org.eclipse.tcf.te.tests.CoreTestCase#initialize()
   */
  @Override
  protected void initialize() {
    // Turn off the automatic perspective switch and debug view activation to avoid
    // JFace views from interfering with the virtual viewers used in tests.
    IPreferenceStore prefs = DebugUITools.getPreferenceStore();
    prefs.setValue(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW, false);
    prefs.setValue(
        IInternalDebugUIConstants.PREF_SWITCH_PERSPECTIVE_ON_SUSPEND,
        MessageDialogWithToggle.NEVER);

    super.initialize();
    // Do not activate debug view or debug perspective, also to avoid interfering
    // with tests' virtual viewers.
    setProperty(
        IConfigurationProperties.TARGET_PERSPECTIVE,
        "org.eclipse.cdt.ui.CPerspective"); //$NON-NLS-1$
    setProperty(IConfigurationProperties.TARGET_VIEW, "org.eclipse.cdt.ui.CView"); // $NON-NLS-1$
  }