test_class.declarator: controller
test_class.modifier: private
test_class.original_string: private SettingsDialogController controller;
test_class.type: SettingsDialogController
test_class.var_name: controller
test_class.declarator: root
test_class.modifier: private
test_class.original_string: private Node root;
test_class.type: Node
test_class.var_name: root
test_class.file: app/src/test/java/edu/wpi/first/shuffleboard/app/prefs/SettingsDialogControllerTest.java
test_class.identifier: SettingsDialogControllerTest
test_class.superclass: extends ApplicationTest
test_case.body: @Test
    public void testMultipleCategories() {
      Category categoryA = Category.of("A");
      Category categoryB = Category.of("B");
      Category categoryC = Category.of("C");
  
      FxUtils.runOnFxThread(() -> controller.setRootCategories(ImmutableList.of(categoryA, categoryB, categoryC)));
  
      waitForFxEvents();
  
      // Should be three children
      TreeView<Category> tree = lookup(".settings-categories").query();
      ObservableList<TreeItem<Category>> children = tree.getRoot().getChildren();
      assertEquals(3, children.size(), "Three children should be present");
      assertEquals(categoryA, children.get(0).getValue());
      assertEquals(categoryB, children.get(1).getValue());
      assertEquals(categoryC, children.get(2).getValue());
  
      assertEquals(children.get(0), tree.getSelectionModel().getSelectedItem(), "The first child should be selected");
    }
test_case.class_method_signature: SettingsDialogControllerTest.testMultipleCategories()
test_case.full_signature: @Test public void testMultipleCategories()
test_case.identifier: testMultipleCategories
test_case.invocations: of of of runOnFxThread setRootCategories of waitForFxEvents query lookup getChildren getRoot assertEquals size assertEquals getValue get assertEquals getValue get assertEquals getValue get assertEquals get getSelectedItem getSelectionModel
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMultipleCategories()
focal_class.declarator: root
focal_class.modifier: @FXML
    private
focal_class.original_string: @FXML
    private SplitPane root;
focal_class.type: SplitPane
focal_class.var_name: root
focal_class.declarator: categories
focal_class.modifier: @FXML
    private
focal_class.original_string: @FXML
    private TreeView<Category> categories;
focal_class.type: TreeView<Category>
focal_class.var_name: categories
focal_class.declarator: rootItem
focal_class.modifier: @FXML
    private
focal_class.original_string: @FXML
    private TreeItem<Category> rootItem;
focal_class.type: TreeItem<Category>
focal_class.var_name: rootItem
focal_class.declarator: view
focal_class.modifier: @FXML
    private
focal_class.original_string: @FXML
    private StackPane view;
focal_class.type: StackPane
focal_class.var_name: view
focal_class.file: app/src/main/java/edu/wpi/first/shuffleboard/app/prefs/SettingsDialogController.java
focal_class.identifier: SettingsDialogController
focal_class.class_method_signature: SettingsDialogController.initialize()
focal_class.full_signature: @FXML private void initialize()
focal_class.identifier: initialize
focal_class.modifiers: @FXML private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initialize()
focal_class.class_method_signature: SettingsDialogController.setViewForCategory(Category category)
focal_class.full_signature: private void setViewForCategory(Category category)
focal_class.identifier: setViewForCategory
focal_class.modifiers: private
focal_class.parameters: (Category category)
focal_class.return: void
focal_class.signature: void setViewForCategory(Category category)
focal_class.class_method_signature: SettingsDialogController.setRootCategories(Collection<Category> rootCategories)
focal_class.full_signature: public void setRootCategories(Collection<Category> rootCategories)
focal_class.identifier: setRootCategories
focal_class.modifiers: public
focal_class.parameters: (Collection<Category> rootCategories)
focal_class.return: void
focal_class.signature: void setRootCategories(Collection<Category> rootCategories)
focal_class.class_method_signature: SettingsDialogController.addSubcategories(TreeItem<Category> rootItem)
focal_class.full_signature: private void addSubcategories(TreeItem<Category> rootItem)
focal_class.identifier: addSubcategories
focal_class.modifiers: private
focal_class.parameters: (TreeItem<Category> rootItem)
focal_class.return: void
focal_class.signature: void addSubcategories(TreeItem<Category> rootItem)
focal_class.class_method_signature: SettingsDialogController.applySettings()
focal_class.full_signature: public void applySettings()
focal_class.identifier: applySettings
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void applySettings()
focal_class.class_method_signature: SettingsDialogController.applySettings(TreeItem<Category> item)
focal_class.full_signature: private void applySettings(TreeItem<Category> item)
focal_class.identifier: applySettings
focal_class.modifiers: private
focal_class.parameters: (TreeItem<Category> item)
focal_class.return: void
focal_class.signature: void applySettings(TreeItem<Category> item)
focal_method.body: public void setRootCategories(Collection<Category> rootCategories) {
      rootItem.getChildren().clear();
      for (Category rootCategory : rootCategories) {
        TreeItem<Category> item = new TreeItem<>(rootCategory);
        addSubcategories(item);
        rootItem.getChildren().add(item);
      }
    }
focal_method.class_method_signature: SettingsDialogController.setRootCategories(Collection<Category> rootCategories)
focal_method.full_signature: public void setRootCategories(Collection<Category> rootCategories)
focal_method.identifier: setRootCategories
focal_method.invocations: clear getChildren addSubcategories add getChildren
focal_method.modifiers: public
focal_method.parameters: (Collection<Category> rootCategories)
focal_method.return: void
focal_method.signature: void setRootCategories(Collection<Category> rootCategories)