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