Object (@NotNull String dataId) { if (PROJECT.is(dataId)) { return myProject; } Object[] selectedUserObjects = getSelectedUserObjects(); if (PlatformCoreDataKeys.SELECTED_ITEMS.is(dataId)) { return selectedUserObjects; } if (PlatformDataKeys.LAST_ACTIVE_FILE_EDITOR.is(dataId)) { return FileEditorManagerEx.getInstanceEx(myProject).getSelectedEditor(); } if (BGT_DATA_PROVIDER.is(dataId)) { return slowProviders(selectedUserObjects); } Object treeStructureData = getFromTreeStructure(selectedUserObjects, dataId); if (treeStructureData != null) { return treeStructureData; } if (PlatformDataKeys.TREE_EXPANDER.is(dataId)) return getTreeExpander(); if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { TreePath[] paths = getSelectionPaths(); if (paths == null) return null; final ArrayList<Navigatable> navigatables = new ArrayList<>(); for (TreePath path : paths) { Object node = path.getLastPathComponent(); Object userObject = TreeUtil.getUserObject(node); if (userObject instanceof Navigatable) { navigatables.add((Navigatable)userObject); } else if (node instanceof Navigatable) { navigatables.add((Navigatable)node); } } return navigatables.isEmpty() ? null : navigatables.toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY); } return null; }