!7 cmodule NewSnippetAsSF > DynPrintLogAndEnabled { start { dm_onSnippetCreated(voidfunc(S snippetID) { print("New snippet! " + snippetID); 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 { addStandardFunctionWithAnimation(snippetID); disposeWindow(heldInstance(JButton)); }), jCancelButton("No") ) )); } }); } }