示例#1
0
        /**
         * Generate a list of paths to search.
         * The output array always starts with
         * JMETER_HOME/lib/ext
         * and is followed by any paths obtained from the "search_paths" JMeter property.
         *
         * @return array of path strings
         */
        public static String[] getSearchPaths()
        {
            String p = NetMeterUtils.getPropDefault("search_paths", null); // $NON-NLS-1$

            String[] result = new String[1];

            if (p != null)
            {
                String[] paths = p.Split(';'); // $NON-NLS-1$
                result = new String[paths.Length + 1];
                Array.Copy(paths, 0, result, 1, paths.Length);
            }
            //result[0] = getJMeterHome() + "\lib\ext"; // $NON-NLS-1$
            return(result);
        }
示例#2
0
        private static String jmBin; // JMeter bin directory (excludes trailing separator)


        ///**
        // * Gets the JMeter Version.
        // *
        // * @return the JMeter version string
        // */
        //public static String getJMeterVersion() {
        //    return JMeterVersion.getVERSION();
        //}

        ///**
        // * Gets the JMeter copyright.
        // *
        // * @return the JMeter copyright string
        // */
        //public static String getJMeterCopyright() {
        //    return JMeterVersion.getCopyRight();
        //}

        /**
         * Determine whether we are in 'expert' mode. Certain features may be hidden
         * from user's view unless in expert mode.
         *
         * @return true iif we're in expert mode
         */
        public static Boolean isExpertMode()
        {
            return(NetMeterUtils.getPropDefault(EXPERT_MODE_PROPERTY, false));
        }
示例#3
0
        /**
         * To get I18N label from properties file
         *
         * @param key
         *            in messages.properties
         * @return I18N label without (if exists) last colon ':' and spaces
         */
        public static String getParsedLabel(String key)
        {
            String value = NetMeterUtils.getResString(key);

            return(value.replaceFirst("(?m)\\s*?:\\s*$", "")); // $NON-NLS-1$ $NON-NLS-2$
        }