| | | 1 | menuMap.put(ASSERTIONS, assertions);↵
|
1 | menuMap.put(CONFIG_ELEMENTS, configElements);↵ | | 2 | menuMap.put(CONFIG_ELEMENTS, configElements);↵
|
2 | menuMap.put(CONTROLLERS, controllers);↵ | | 3 | menuMap.put(CONTROLLERS, controllers);↵
|
3 | menuMap.put(LISTENERS, listeners);↵ | | 4 | menuMap.put(LISTENERS, listeners);↵
|
4 | menuMap.put(NON_TEST_ELEMENTS, nonTestElements);↵ | | 5 | menuMap.put(NON_TEST_ELEMENTS, nonTestElements);↵
|
5 | ↵ | | 6 | menuMap.put(SAMPLERS, samplers);↵
|
6 | menuMap.put(POST_PROCESSORS, postProcessors);↵ | | 7 | menuMap.put(POST_PROCESSORS, postProcessors);↵
|
7 | menuMap.put(PRE_PROCESSORS, preProcessors);↵ | | 8 | menuMap.put(PRE_PROCESSORS, preProcessors);↵
|
8 | menuMap.put(REPORT_PAGE, reportPage);↵ | | 9 | ↵
|
9 | menuMap.put(TABLES, tables);↵ | | |
|
10 | Collections.sort(guiClasses);↵ | | 10 | Collections.sort(guiClasses);↵
|
11 | Iterator iter = guiClasses.iterator();↵ | | 11 | Iterator iter = guiClasses.iterator();↵
|
12 | while (iter.hasNext()) {↵ | | 12 | while (iter.hasNext()) {↵
|
13 | String name = (String) iter.next();↵ | | 13 | String name = (String) iter.next();↵
|
|
14 | /*↵ | | 14 | /*↵
|
15 | * JMeterTreeNode and TestBeanGUI are special GUI classes, and↵ | | 15 | * JMeterTreeNode and TestBeanGUI are special GUI classes, and↵
|
16 | * aren't intended to be added to menus↵ | | 16 | * aren't intended to be added to menus↵
|
17 | * ↵ | | 17 | * ↵
|
18 | * TODO: find a better way of checking this↵ | | 18 | * TODO: find a better way of checking this↵
|
19 | */↵ | | 19 | */↵
|
20 | if (name.endsWith("JMeterTreeNode")↵ | | 20 | if (name.endsWith("JMeterTreeNode") // $NON-NLS-1$↵
|
21 | || name.endsWith("TestBeanGUI")) {↵ | | 21 | || name.endsWith("TestBeanGUI")) {// $NON-NLS-1$↵
|
22 | continue;// Don't try to instantiate these↵ | | 22 | continue;// Don't try to instantiate these↵
|
23 | }↵ | | 23 | }↵
|
|
24 | JMeterGUIComponent item;↵ | | 24 | JMeterGUIComponent item;↵
|
25 | try {↵ | | 25 | try {↵
|
26 | Class c = Class.forName(name);↵ | | 26 | Class c = Class.forName(name);↵
|
27 | if (TestBean.class.isAssignableFrom(c)) {↵ | | 27 | if (TestBean.class.isAssignableFrom(c)) {↵
|
28 | item = new TestBeanGUI(c);↵ | | 28 | item = new TestBeanGUI(c);↵
|
29 | } else {↵ | | 29 | } else {↵
|
30 | item = (JMeterGUIComponent) c.newInstance();↵ | | 30 | item = (JMeterGUIComponent) c.newInstance();↵
|
31 | }↵ | | 31 | }↵
|
32 | } catch (NoClassDefFoundError e) {↵ | | 32 | } catch (NoClassDefFoundError e) {↵
|
33 | log.warn("Missing jar? Could not create " + name + ". " + e);↵ | | 33 | log.warn("Missing jar? Could not create " + name + ". " + e);↵
|
34 | continue;↵ | | 34 | continue;↵
|
35 | } catch (Throwable e) {↵ | | 35 | } catch (Throwable e) {↵
|
36 | log.warn("Could not instantiate " + name, e);↵ | | 36 | log.warn("Could not instantiate " + name, e);↵
|
37 | continue;↵ | | 37 | continue;↵
|
38 | }↵ | | 38 | }↵
|
39 | if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel())) {↵ | | 39 | if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel())) {↵
|
40 | log.info("Skipping " + name);↵ | | 40 | log.info("Skipping " + name);↵
|
41 | continue;↵ | | 41 | continue;↵
|
42 | } else {↵ | | 42 | } else {↵
|
43 | elementsToSkip.add(name);↵ | | 43 | elementsToSkip.add(name);↵
|
44 | }↵ | | 44 | }↵
|
45 | Collection categories = item.getMenuCategories();↵ | | 45 | Collection categories = item.getMenuCategories();↵
|
46 | if (categories == null) {↵ | | 46 | if (categories == null) {↵
|
47 | log.debug(name + " participates in no menus.");↵ | | 47 | log.debug(name + " participates in no menus.");↵
|
48 | continue;↵ | | 48 | continue;↵
|
49 | } | | 49 | }
|