!7 cmodule FunctionInspector { S functionNames, snippetID, source; S safetyLevel, returnType; LPairS parameters; visual northCenterAndSouthWithMargins( jhgridWithSpacing( dm_fieldWithLabel functionNames(), centerAndEastWithMargin(dm_fieldWithLabel snippetID(), jPopDownButton_noText("Load snippet...", rThreadEnter { selectSnippetID(voidfunc(S snippetID) { loadFunctionFromSnippet(snippetID); }); }, "Analyze", rThreadEnter analyze))), dm_textAreaAsSection source(), jhgridWithSpacing( dm_fieldWithLabel safetyLevel(), dm_fieldWithLabel returnType())); // API void loadFunctionFromSnippet(S snippetID) { setField(+snippetID); setField(source := loadSnippet(snippetID)); analyze(); } void analyze { setField(functionNames := uniquify(findFunctionDefinitions(source))); } }