svoid dm_stefansAssistant_offerSFOnSnippetCreated() { dm_onSnippetCreated(voidfunc(S snippetID) { print("New snippet! " + snippetID); if (!dm_hadUserActivityInLastNMinutes(1)) ret with print("No user activity, skipping popup dialog"); if (getSnippetType(snippetID) == snippetType_JavaXInclude()) { S text = loadSnippet(snippetID); S sfName = first(findFunctionDefinitions(text)); if (sfName != null) showPackedFrameInBottomRightCorner( centerAndSouthWithMargins(jlabel("Add standard function: " + sfName + "?"), hgridWithSpacing( jThreadedButton("OK", r { disposeWindow(heldInstance(JButton)); addStandardFunctionWithAnimation(snippetID); }), jCancelButton("No") ) )); } }); }