using closure to generate component for toolwindow