DESCRIPTION

tmf: Fix copy trace handler enabled in unrelated dialogs

Ctrl-C no longer opens the Copy Trace dialog from another dialog when
the current selection in the Project Explorer is a trace element.

The same fix is applied to the copy experiment handler.

Change-Id: I4eb9df578d2227b74312d7fe660b2a3caf2b2627
Signed-off-by: Luciana Barry xxx@xxx.xxx


COMMENTS

author: Luciana Barry
date: 2014-10-03 20:37:59.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-10-03 20:38:05.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9181/

-------------------------------------
author: Brenden Conley
date: 2014-10-03 21:18:04.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9181/ : SUCCESS

-------------------------------------
author: Ricky Reeves
date: 2014-10-06 17:53:22.000000000

Patch Set 1: Code-Review-1

(2 comments)

Line:41, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/CopyTraceHandler.java -> You need to add a check:
if (!(selection instanceof IStructuredSelection)) {
            return null;
  }
  
 This will also make sure that selection is not null;

Also, usually we cast to IStructuredSelection instead of StructuredSelection.

Line:41, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/CopyExperimentHandler.java -> You need to add a check:
if (!(selection instanceof IStructuredSelection)) {
            return null;
  }
  
 This will also make sure that selection is not null;

Also, usually we cast to IStructuredSelection instead of StructuredSelection.

-------------------------------------
