.getImage(ISharedImages.IMG_OBJ_ADD));
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
TraceBackend.getInstance().addTracePattern(new TracePattern(true));
}
});
// "Remove" button
button = new Button(container, SWT.PUSH | SWT.CENTER);
button.setText("Remove pattern");
button.setToolTipText("Remove selected trace pattern");
button.setImage(PlatformUI.getWorkbench().getSharedImages()
.getImage(ISharedImages.IMG_TOOL_DELETE));
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
final TracePattern tracePattern = (TracePattern) ((IStructuredSelection) functionsTableViewer
.getSelection()).getFirstElement();
if (tracePattern != null) {
TraceBackend.getInstance().removeTracePattern(tracePattern);
}
}