public JPopupMenu makeMethodMenu(T occupant, Location loc)
    {
        this.occupant = occupant;
        this.currentLocation = loc;
        JPopupMenu menu = new JPopupMenu();
        Method[] methods = getMethods();
        Class oldDcl = null;
        for (int i = 0; i < methods.length; i++)
        {
            Class dcl = methods[i].getDeclaringClass();
            if (dcl != Object.class)
            {
                if (i > 0 && dcl != oldDcl)
                    menu.addSeparator();
                menu.add(new MethodItem(methods[i]));
            }
            oldDcl = dcl;
        }
        return menu;
    }