public Object getData(String dataId) { PackageDependenciesNode node = getSelectedNode(); if (PlatformDataKeys.NAVIGATABLE.is(dataId)) { return node; } if (LangDataKeys.PSI_ELEMENT.is(dataId) && node != null) { final PsiElement element = node.getPsiElement(); return element != null && element.isValid() ? element : null; } return null; }
@Nullable @NonNls public Object getData(@NonNls String dataId) { if (LangDataKeys.PSI_ELEMENT.is(dataId)) { final PackageDependenciesNode selectedNode = myRightTree.getSelectedNode(); if (selectedNode != null) { final PsiElement element = selectedNode.getPsiElement(); return element != null && element.isValid() ? element : null; } } if (PlatformDataKeys.HELP_ID.is(dataId)) { return "dependency.viewer.tool.window"; } return null; }