unwrap DMT in findObjectInPath()

This commit is contained in:
Gregory.Shrago
2017-08-31 22:19:06 +03:00
parent e333436772
commit 4c6093393a
@@ -77,7 +77,7 @@ public final class TreeUtil {
@Nullable
public static <T> T findObjectInPath(@Nullable TreePath path, @NotNull Class<T> clazz) {
for (TreePath p = path; p != null; p = p.getParentPath()) {
Object o = p.getLastPathComponent();
Object o = getUserObject(p.getLastPathComponent());
if (clazz.isInstance(o)) return (T)o;
}
return null;