for (int i=0; i<selectedPath.length; i++) {
DefaultMutableTreeNode curNode = (DefaultMutableTreeNode) selectedPath[i].getLastPathComponent();
selectedPrograms[i] = ((ProgramItem)curNode.getUserObject()).getProgram();
}
return new ProgramContextMenu(mTree, selectedPath, PluginTreeModel.getPlugin(selectedPath[0]), selectedPrograms);
}
else if (node.getType() == Node.PLUGIN_ROOT) {
Plugin plugin = PluginTreeModel.getPlugin(selectedPath[0]);
if (plugin != null) {
return new PluginBasedPluginContextMenu(mTree, selectedPath[0], plugin, node.getActionMenus());