enthought/traitsui

Refactor TreeEditor context menu code

Opened this issue · 0 comments

This code is particularly hard to test because the entry to it requires either an appropriate event object or position. We should refactor this so the code about finding the item which has been clicked is separated from the logic of what to display, building the menu, and displaying it. This would facilitate both understanding the code, re-using it, and make it more easily testable.