<% /*----------------------------------------------------------------------------- Used by: calendar_app_javascript.js & calendar_app_javascript_fullview.js -----------------------------------------------------------------------------*/ functionList = new ArrayList(); functionListMsg = ""; %><%! String functionListMsg; List functionList; String getFunctionNames(String filepath) { RegEx regEx = new RegEx(); RegEx.Results results = null; try { RZTagSupport rz = pageContext.getAttribute( ContentSupport.ATTRIBUTE_PAGE_TAG_SUPPORT); filepath = rz.getrealfilename(filepath); String script = FileUtils.readFile(filepath); String patternFunction = "/^[\\r\\n]*(\\s*)((this\\.)?([\\w\\.]*)\\s*[:=]\\s*)?" + "func"+"tion\\s*(\\w+?)?\\s*(\\([\\w,\\s]*?\\))\\s*(\\/\\/.*$)?\\s*\\{/"; results = regEx.match(script, patternFunction+"mg"); if (results != null) //tests group[5] > 0 below { String[] functionArray = results.group; for (int i=0;i 0 && results.group[1].length() == 0) functionList.add(results.group[5].trim()); //non OPPS function } } } catch (java.io.FileNotFoundException e) { return "File not found: " + filepath; } catch (Exception e) { return StringUtils.convertStackTraceToString(e); } return ""; } %>