/*******************************************************************************
- * Copyright (c) 2009, 2010, 2011 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Get the selection
final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
final IWorkbenchPart part = page.getActivePart();
+ if (part == null) {
+ return false;
+ }
final ISelectionProvider selectionProvider = part.getSite().getSelectionProvider();
if (selectionProvider == null) {
return false;
final IFile file;
try {
- file = traceElement.getBookmarksFile();
+ file = traceElement.createBookmarksFile();
} catch (final CoreException e) {
Activator.getDefault().logError("Error opening trace " + traceElement.getName(), e); //$NON-NLS-1$
displayErrorMsg(Messages.OpenTraceHandler_Error + "\n\n" + e.getMessage()); //$NON-NLS-1$