Example #1
0
  @Override
  public void initialize(URL url, ResourceBundle r) {
    modFuncContextMenu = new ModFuncContextMenu(dbgController);
    modulesTree
        .getSelectionModel()
        .selectedItemProperty()
        .addListener(
            (o, old, newItem) -> {
              modFuncContextMenu.selectedTreeItemProperty().set(newItem);
              if (newItem != null)
                modFuncContextMenu.selectedItemProperty().set(newItem.getValue());
            });

    sortedTreeModules.setComparator(treeItemModFuncComparator());

    SplitPane.setResizableWithParent(modulesBox, Boolean.FALSE);

    ErlyBerly.nodeAPI().connectedProperty().addListener(this::onConnected);

    modulesTree.setCellFactory(new ModFuncTreeCellFactory(dbgController));
    /*modulesTree.setOnKeyPressed(this::onKeyPressInModuleTree);*/
    modulesTree.setContextMenu(modFuncContextMenu);

    addModulesFloatySearchControl();

    dbgController.initialize(url, r);

    dbgSplitPane.getItems().add(new DbgTraceView(dbgController));
  }
Example #2
0
  private void onConnected(Observable o) {
    boolean connected = ErlyBerly.nodeAPI().connectedProperty().get();

    // disable buttons when not connected
    /*seqTraceMenuItem.setDisable(!connected);*/

    if (connected) {
      refreshModules();
      dbgController.reapplyTraces();
    } else {
      treeModules.clear();
    }
  }