Link Here
|
67 |
* and also for resource lookup in messages.properties |
67 |
* and also for resource lookup in messages.properties |
68 |
*/ |
68 |
*/ |
69 |
public static final String THREADS = "menu_threads"; //$NON-NLS-1$ |
69 |
public static final String THREADS = "menu_threads"; //$NON-NLS-1$ |
|
|
70 |
|
71 |
public static final String FRAGMENTS = "menu_fragments"; //$NON-NLS-1$ |
70 |
|
72 |
|
71 |
public static final String TIMERS = "menu_timer"; //$NON-NLS-1$ |
73 |
public static final String TIMERS = "menu_timer"; //$NON-NLS-1$ |
72 |
|
74 |
|
Link Here
|
119 |
private static final String[] MENU_PARENT_SAMPLER = new String[] { |
121 |
private static final String[] MENU_PARENT_SAMPLER = new String[] { |
120 |
MenuFactory.CONTROLLERS }; |
122 |
MenuFactory.CONTROLLERS }; |
121 |
|
123 |
|
122 |
private static final List<MenuInfo> timers, controllers, samplers, threads, |
124 |
private static final List<MenuInfo> timers, controllers, samplers, threads, |
123 |
configElements, assertions, listeners, nonTestElements, |
125 |
fragments,configElements, assertions, listeners, nonTestElements, |
124 |
postProcessors, preProcessors; |
126 |
postProcessors, preProcessors; |
125 |
|
127 |
|
126 |
static { |
128 |
static { |
127 |
threads = new LinkedList<MenuInfo>(); |
129 |
threads = new LinkedList<MenuInfo>(); |
|
|
130 |
fragments = new LinkedList<MenuInfo>(); |
128 |
timers = new LinkedList<MenuInfo>(); |
131 |
timers = new LinkedList<MenuInfo>(); |
129 |
controllers = new LinkedList<MenuInfo>(); |
132 |
controllers = new LinkedList<MenuInfo>(); |
130 |
samplers = new LinkedList<MenuInfo>(); |
133 |
samplers = new LinkedList<MenuInfo>(); |
Link Here
|
135 |
preProcessors = new LinkedList<MenuInfo>(); |
138 |
preProcessors = new LinkedList<MenuInfo>(); |
136 |
nonTestElements = new LinkedList<MenuInfo>(); |
139 |
nonTestElements = new LinkedList<MenuInfo>(); |
137 |
menuMap.put(THREADS, threads); |
140 |
menuMap.put(THREADS, threads); |
|
|
141 |
menuMap.put(FRAGMENTS, fragments); |
138 |
menuMap.put(TIMERS, timers); |
142 |
menuMap.put(TIMERS, timers); |
139 |
menuMap.put(ASSERTIONS, assertions); |
143 |
menuMap.put(ASSERTIONS, assertions); |
140 |
menuMap.put(CONFIG_ELEMENTS, configElements); |
144 |
menuMap.put(CONFIG_ELEMENTS, configElements); |
Link Here
|
465 |
if (categories.contains(THREADS)) { |
469 |
if (categories.contains(THREADS)) { |
466 |
threads.add(new MenuInfo(item, name)); |
470 |
threads.add(new MenuInfo(item, name)); |
467 |
} |
471 |
} |
|
|
472 |
if (categories.contains(FRAGMENTS)) { |
473 |
fragments.add(new MenuInfo(item, name)); |
474 |
} |
468 |
if (categories.contains(TIMERS)) { |
475 |
if (categories.contains(TIMERS)) { |
469 |
timers.add(new MenuInfo(item, name)); |
476 |
timers.add(new MenuInfo(item, name)); |
470 |
} |
477 |
} |
Link Here
|
549 |
return false; |
556 |
return false; |
550 |
} |
557 |
} |
551 |
TestElement parent = parentNode.getTestElement(); |
558 |
TestElement parent = parentNode.getTestElement(); |
|
|
559 |
|
560 |
// Force TestFragment to only be pastable under a Test Plan |
561 |
if (foundClass(nodes, new Class[]{org.apache.jmeter.control.TestFragmentController.class})){ |
562 |
if (parent instanceof TestPlan) |
563 |
return true; |
564 |
return false; |
565 |
} |
566 |
|
552 |
if (parent instanceof WorkBench) {// allow everything else |
567 |
if (parent instanceof WorkBench) {// allow everything else |
553 |
return true; |
568 |
return true; |
554 |
} |
569 |
} |