private void setEditorText(final TreePath path, final GTreeNode nsNode, final String newName) {
		runSwing(() -> {
			int row = tree.getRowForPath(path);
			DefaultTreeCellEditor cellEditor = (DefaultTreeCellEditor) tree.getCellEditor();
			JTree jTree = (JTree) AbstractGenericTest.getInstanceField("tree", tree);
			Container container = (Container) cellEditor.getTreeCellEditorComponent(jTree, nsNode,
				true, true, true, row);
			JTextField textField = (JTextField) container.getComponent(0);

			textField.setText(newName);
			tree.stopEditing();
		});

		flushAndWaitForTree();
	}
Tests for the symbol tree plugin.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symboltree/SymbolTreePlugin1Test.java