* @author Alex Ruiz
*/
final class JTreeExpandPathTask {
@RunsInEDT
static void expandTreePath(final @Nonnull JTree tree, final @Nonnull TreePath path) {
execute(new GuiTask() {
@Override
protected void executeInEDT() {
TreePath realPath = addRootIfInvisible(tree, path);
if (!tree.isExpanded(path)) {
tree.expandPath(realPath);