* ToolBarContainer provides the panel where to attach the toolbar.
*
* @param container
*/
private void createToolBar(ToolBarContainer container) {
ToolBarPanel toolBarPanel = container.getToolBarPanelAt(BorderLayout.NORTH);
VLToolBar toolBar = new VLToolBar();
toolBar.add(getActionButton(newTestcaseAction));
toolBar.add(getActionButton(etAction));
toolBar.add(getActionButton(newModuleAction));
toolBar.add(getActionButton(saveAction));
toolBar.add(getActionButton(saveAsAction));
toolBar.add(getActionButton(saveAllAction));
toolBarPanel.add(toolBar, new ToolBarConstraints(0, 0));
toolBar = new VLToolBar();
toolBar.add(getActionButton(undoAction));
toolBar.add(getActionButton(redoAction));
toolBar.add(getActionButton(cutAction));
toolBar.add(getActionButton(copyAction));
toolBar.add(getActionButton(pasteAction));
toolBar.add(getActionButton(searchAction));
toolBarPanel.add(toolBar, new ToolBarConstraints(0, 1));
toolBar = new VLToolBar();
recordActionButton = getActionButton(recordAction);
toolBar.add(recordActionButton);
toolBar.add(getActionButton(pauseAction));
toolBar.add(getActionButton(resumeRecordingAction));
toolBar.add(getActionButton(insertScriptAction));
toolBar.add(getActionButton(insertChecklistAction));
toolBar.add(getActionButton(stopAction));
toolBar.add(getActionButton(recorderConsoleAction));
toolBarPanel.add(toolBar, new ToolBarConstraints(0, 2));
toolBar = new VLToolBar();
toolBar.add(getActionButton(openApplicationAction));
toolBar.add(getActionButton(closeApplicationAction));
toolBarPanel.add(toolBar, new ToolBarConstraints(0, 3));
toolBar = new VLToolBar();
toolBar.add(getActionButton(playAction));
toolBar.add(getActionButton(slowPlayAction));
toolBar.add(getActionButton(debugAction));
toolBar.add(getActionButton(toggleBreakpointAction));
toolBar.add(getActionButton(resumePlayingAction));
toolBar.add(getActionButton(stepIntoAction));
toolBar.add(getActionButton(stepOverAction));
toolBar.add(getActionButton(stepReturnAction));
toolBar.add(getActionButton(playerConsoleAction));
toolBar.add(getActionButton(showReportAction));
toolBarPanel.add(toolBar, new ToolBarConstraints(0, 4));
if (actionProvider != null) {
toolBar = new VLToolBar();
IMarathonAction[] actions = actionProvider.getActions();
for (int i = 0; i < actions.length; i++) {
final IMarathonAction action = actions[i];
if (!action.isToolBarAction())
continue;
if (action.isSeperator()) {
toolBarPanel.add(toolBar, new ToolBarConstraints(0, 5));
toolBar = new VLToolBar();
} else {
toolBar.add(getActionButton(createAction(action)));
}
}
toolBarPanel.add(toolBar, new ToolBarConstraints(0, 5));
}
showReportAction.setEnabled(false);
return;
}