Yes it can be -1 but since the behaviour is now like XCode's navigator. the right clicked index is not the final criteria to stop deleting. One issue is the round trip: ResourceManagerOutlineView menu -> appdelegate -> ResourceManagerOutlineView again. The hotkey is handled completely in ResourceManagerOutlineView while the right click menu is doing the extra step. So I moved some more logic to the ResourceManagerOutlineView. Ultimately the logic for deleting resources should be in one place only but I didn't want to mess with the accessibility of the project settings.