@Override
  protected String evaluateExpression(String expression) {
    IFrameDMContext frame = getFrame();
    if (frame == null) {
      return null;
    }

    String sessionId = frame.getSessionId();
    DsfServicesTracker dsfServicesTracker =
        new DsfServicesTracker(DsfUIPlugin.getBundleContext(), sessionId);
    try {
      GetExpressionValueQuery query =
          new GetExpressionValueQuery(frame, expression, dsfServicesTracker);
      DsfSession session = DsfSession.getSession(sessionId);
      if (session != null) {
        session.getExecutor().execute(query);
        try {
          FormattedValueDMData data = query.get();
          if (data != null) return data.getFormattedValue();
        } catch (Exception e) {
        }
      }
    } finally {
      dsfServicesTracker.dispose();
    }
    return null;
  }
  @Override
  @After
  public void doAfterTest() throws Exception {
    Runnable runnable =
        new Runnable() {
          @Override
          public void run() {
            fSession.removeServiceEventListener(GDBConsoleBreakpointsTest.this);
          }
        };
    fSession.getExecutor().submit(runnable).get();
    fBreakpointEvents.clear();
    fServicesTracker.dispose();
    fServicesTracker = null;

    super.doAfterTest();

    deleteAllPlatformBreakpoints();
  }
  @Override
  @After
  public void doAfterTest() throws Exception {
    if (fSession != null) {
      fSession
          .getExecutor()
          .submit(() -> fSession.removeServiceEventListener(GDBConsoleBreakpointsTest.this))
          .get();
    }

    fBreakpointEvents.clear();
    if (fServicesTracker != null) {
      fServicesTracker.dispose();
      fServicesTracker = null;
    }

    super.doAfterTest();

    deleteAllPlatformBreakpoints();
  }
Exemple #4
0
 public void dispose() {
   fTracker.dispose();
 }
 /**
  * Cleanup now that the sequence has been run.
  *
  * @since 4.0
  */
 @Execute
 public void stepCleanupBaseSequence(RequestMonitor rm) {
   fTracker.dispose();
   fTracker = null;
   rm.done();
 }
 /**
  * Rollback method for {@link #stepInitializeBaseSequence()}
  *
  * @since 4.0
  */
 @RollBack("stepInitializeBaseSequence")
 public void rollBackInitializeBaseSequence(RequestMonitor rm) {
   if (fTracker != null) fTracker.dispose();
   fTracker = null;
   rm.done();
 }
Exemple #7
0
 @After
 public void tearDown() {
   fServicesTracker.dispose();
   fRegService = null;
 }
  @Override
  public void doAfterTest() throws Exception {
    super.doAfterTest();

    if (fServicesTracker != null) fServicesTracker.dispose();
  }