tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / project / handlers / OpenAction.java
index 507923f7dabf181ffbe944981cf310b271803dcf..ed93ecfa7c5faaf21bdfa08b6fc390a4b44745d8 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2012 Ericsson
+* Copyright (c) 2012, 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
@@ -27,10 +27,15 @@ import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
 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;
@@ -46,10 +51,6 @@ public class OpenAction extends Action {
         this.selectionProvider = selectionProvider;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#isEnabled()
-     */
     @Override
     public boolean isEnabled() {
         ISelection selection = selectionProvider.getSelection();
@@ -66,18 +67,12 @@ public class OpenAction extends Action {
         return false;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#run()
-     */
     @Override
     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$
This page took 0.024581 seconds and 5 git commands to generate.