!7 svoid _onLoad { onTranspilerDirty(r dm_refreshTranspiler); } 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 { disposeWindow(heldInstance(JButton)); addStandardFunctionWithAnimation(snippetID); }), jCancelButton("No") ) )); } }); } }