test fixed

This commit is contained in:
anna
2011-02-02 21:43:33 +01:00
parent a10b959a38
commit 667f72187d
2 changed files with 13 additions and 0 deletions
@@ -314,6 +314,15 @@ public class ScopeTreeViewPanel extends JPanel implements JDOMExternalizable, Di
}
return myDeletePSIElementProvider;
}
if (LangDataKeys.PASTE_TARGET_PSI_ELEMENT.is(dataId)) {
final TreePath selectionPath = myTree.getSelectionPath();
if (selectionPath != null) {
final Object pathComponent = selectionPath.getLastPathComponent();
if (pathComponent instanceof DirectoryNode) {
return ((DirectoryNode)pathComponent).getTargetDirectory();
}
}
}
return null;
}
@@ -125,6 +125,10 @@ public class DirectoryNode extends PackageDependenciesNode {
}
public PsiElement getPsiElement() {
return myDirectory;
}
public PsiDirectory getTargetDirectory() {
DirectoryNode dirNode = this;
while (dirNode.getCompactedDirNode() != null) {
dirNode = dirNode.getCompactedDirNode();