import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.handlers.IHandlerService;
+/**
+ * <b><u>OpenAction</u></b>
+ * <p>
+ * Implement me. Please.
+ * <p>
+ */
public class OpenAction extends Action {
- private static final String OPEN_TRACE_COMMAND_ID = "org.eclipse.linuxtools.tmf.ui.command.project.trace.open"; //$NON-NLS-1$
- private static final String OPEN_EXPERIMENT_COMMAND_ID = "org.eclipse.linuxtools.tmf.ui.command.project.experiment.open"; //$NON-NLS-1$
+ private static final String OPEN_COMMAND_ID = "org.eclipse.ui.navigate.openResource"; //$NON-NLS-1$
private final IWorkbenchPage page;
private final ISelectionProvider selectionProvider;
public void run() {
try {
IHandlerService handlerService = (IHandlerService) page.getActivePart().getSite().getService(IHandlerService.class);
- if (element instanceof TmfTraceElement) {
- handlerService.executeCommand(OPEN_TRACE_COMMAND_ID, null);
- } else if (element instanceof TmfExperimentElement) {
- handlerService.executeCommand(OPEN_EXPERIMENT_COMMAND_ID, null);
+ if (element instanceof TmfTraceElement || element instanceof TmfExperimentElement) {
+ handlerService.executeCommand(OPEN_COMMAND_ID, null);
}
} catch (ExecutionException e) {
Activator.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$