use of org.eclipse.titan.executor.views.executormonitor.LaunchElement in project titan.EclipsePlug-ins by eclipse.
the class JniExecutor method startSession.
/**
* Initializes the Executor.
*
* @param launch the ILaunch instance to start the session with.
*/
@Override
public void startSession(final ILaunch launch) {
super.startSession(launch);
if (automaticExecuteSectionExecution) {
if (!LaunchStorage.getLaunchElementMap().containsKey(launch)) {
ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
LaunchElement launchElement = new LaunchElement(launchConfiguration.getName(), launch);
LaunchStorage.registerLaunchElement(launchElement);
ExecutorStorage.registerExecutorStorage(launchElement);
}
simpleExecutionRunning = true;
startTest(true);
}
}
use of org.eclipse.titan.executor.views.executormonitor.LaunchElement in project titan.EclipsePlug-ins by eclipse.
the class TestExecutionView method getInitialInput.
private ITreeLeaf getInitialInput() {
final ISelection selection = getSite().getPage().getSelection(EXECUTORMONITOR_VIEW_ID);
if (null == selection || selection.isEmpty()) {
return null;
}
final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
ITreeLeaf element = (ITreeLeaf) structuredSelection.getFirstElement();
if (null != element) {
while (!(element instanceof LaunchElement)) {
element = element.parent();
}
}
return element;
}
use of org.eclipse.titan.executor.views.executormonitor.LaunchElement in project titan.EclipsePlug-ins by eclipse.
the class TestExecutionView method createTooltip.
private void createTooltip(final ITreeLeaf element) {
if (null == element) {
setTitleToolTip(null);
return;
}
final List<ExecutedTestcase> executedTestCases = new ArrayList<ExecutedTestcase>();
final List<ITreeLeaf> children = ((LaunchElement) actualInput).children();
ITreeLeaf executorElement;
for (ITreeLeaf aChildren : children) {
executorElement = aChildren;
if (executorElement instanceof MainControllerElement) {
BaseExecutor executor = ((MainControllerElement) executorElement).executor();
if (null != executor) {
executedTestCases.addAll(executor.executedTests());
}
}
}
if (executedTestCases.isEmpty()) {
setTitleToolTip(element.name());
return;
}
String statistics = createStatistics(element, executedTestCases);
setTitleToolTip(statistics);
}
use of org.eclipse.titan.executor.views.executormonitor.LaunchElement in project titan.EclipsePlug-ins by eclipse.
the class NotificationView method createActions.
private void createActions() {
clearAction = new Action("Clear") {
@Override
public void run() {
if (null != actualInput && actualInput instanceof LaunchElement) {
final List<ITreeLeaf> children = ((LaunchElement) actualInput).children();
for (ITreeLeaf aChildren : children) {
final BaseExecutor executor = ((MainControllerElement) aChildren).executor();
if (null != executor) {
executor.notifications().clear();
viewer.refresh();
}
}
}
}
};
clearAction.setToolTipText("Clear");
clearAction.setImageDescriptor(ImageCache.getImageDescriptor("trash_enabled.gif"));
clearAction.setDisabledImageDescriptor(ImageCache.getImageDescriptor("trash_disabled.gif"));
clearAction.setEnabled(false);
saveAsAction = new Action("Save As") {
@Override
public void run() {
saveAs();
}
};
saveAsAction.setToolTipText("Save As");
saveAsAction.setImageDescriptor(ImageCache.getImageDescriptor("saveas_edit.gif"));
saveAsAction.setEnabled(false);
followLastRecord = new Action("Follow the last record") {
@Override
public void run() {
isFollowing = followLastRecord.isChecked();
}
};
followLastRecord.setToolTipText("Toggles the follow the last line behavior");
followLastRecord.setEnabled(true);
followLastRecord.setChecked(isFollowing);
}
use of org.eclipse.titan.executor.views.executormonitor.LaunchElement in project titan.EclipsePlug-ins by eclipse.
the class NotificationView method getInitialInput.
private ITreeLeaf getInitialInput() {
final ISelection selection = getSite().getPage().getSelection(EXECUTORMONITOR_VIEW_ID);
if (null == selection || selection.isEmpty()) {
return null;
}
final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
ITreeLeaf element = (ITreeLeaf) structuredSelection.getFirstElement();
if (null != element) {
while (!(element instanceof LaunchElement)) {
element = element.parent();
}
}
return element;
}
Aggregations