!7 cmodule EISM > DynPrintLog { start { ownResource(vmBus_onShowingPopupMenu((component, menu) -> { temp enter(); if (!isShortNamed ImageSurface(component)) ret; print("Image surface popup, enhancing"); File file = cast getOpt file(component); if (file != null) addPopupMenuItem(menu, "Save selection as element...", rThread { inputText("Element name", name -> { setFileInfoField(file, name, structOr(toRect(component~. getSelection()), "-")); }); }); })); } }