예제 #1
0
  @Override
  public void notifyStack(IProcedure model, StackNotification data) {
    // We want to keep all models updated
    String instanceId = model.getProcId();
    // There may be stack notifications coming before having a model
    // actually created
    if (!m_procId.equals(instanceId)) {
      return;
    }

    CallstackNode currentNode = m_input.getCurrentNode();
    CallstackNode newNode = m_input.notifyStack(model, data);

    switch (data.getStackType()) {
      case CALL:
        m_viewer.add(currentNode, newNode);
        m_viewer.expandToLevel(newNode, TreeViewer.ALL_LEVELS);
        break;
      case RETURN:
        m_viewer.collapseToLevel(currentNode, TreeViewer.ALL_LEVELS);
        m_viewer.update(new Object[] {currentNode, newNode}, null);
        break;
      case LINE:
        m_viewer.refresh(newNode, true);
        break;
    }
  }
예제 #2
0
  @Override
  public void notifyStatus(IProcedure model, StatusNotification data) {
    // We want to keep all models updated
    String instanceId = model.getProcId();
    // There may be stack notifications coming before having a model
    // actually created
    if (!m_procId.equals(instanceId)) {
      return;
    }

    switch (data.getStatus()) {
      case RELOADING:
        m_input.clear();
        m_viewer.refresh(true);
        break;
      default:
        break;
    }
  }
예제 #3
0
 @Override
 public Object[] getElements(Object parent) {
   return new Object[] {m_input.getRootNode()};
 }