DESCRIPTION

tmf: Generalize the call site implementation

The call site implementation for source code look-up had been
specific to CTF. This commit generalizes the implementation so that
other trace extensions can use it.

Change-Id: Iff663e85e22a69f48258a5057de15b3e10e76863
Signed-off-by: Ricky Reeves xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-03-18 11:05:51.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/1709/ 

-------------------------------------
author: Brenden Conley
date: 2013-03-18 11:22:00.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/1709/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2013-03-18 16:03:40.000000000

Patch Set 1: (9 inline comments)

Very good initiative! Some minor comments, but what I think we should discuss is if the callsite should reuse/replace the concept of "reference" in ITmfTrace.

Line:156, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventPropertySource.java -> could it be final? ;)

Line:243, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventPropertySource.java -> indentation

Line:35, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfCallsite.java -> fields could be final

Line:61, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfCallsiteTest.java -> I suppose this should be called testCallsiteCopy()

Line:74, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfCallsiteTest.java -> In the wonderful world of JUnit4 ;)  you can use

 xxx@xxx.xxx
  public void testCallsiteCopy2() {
    new TmfCallsite(null);
  }

Line:92, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEvent.java -> Is this constructor really needed? We're starting to get a bit of constructor-bloat here... It's already quite confusing when we doing new TmfEvent(<ctrl+space>

I'm wondering if we should just have a simple one and the full one, in the full one write in the Javadoc that people can use 'null' or ITmfContext.UNKNOWN_RANK and so on?

Line:31, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java -> Couldn't the callsite re-use (or replace) the "reference" field?

Line:35, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfCallsite.java -> Those fields could be final. The default assignation won't do anything, since no constructor leave this field untouched.

Line:46, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfCallsite.java -> You can Ctrl+Shift+F the Javadoc to get it properly formatted.

-------------------------------------
author: Braxton Mccarthy
date: 2013-03-18 16:04:10.000000000

Patch Set 1: I would prefer that you didn't submit this

"-1" meaning "I've looked at it"

-------------------------------------
author: Luciana Barry
date: 2013-03-18 20:17:40.000000000

Patch Set 1:

As discussed, we might want to consider creating a separate interface that a specific ITmfEvent class would implement only if it supports callsites.

-------------------------------------
author: Ricky Reeves
date: 2013-03-19 15:18:17.000000000

Patch Set 1: (9 inline comments)

I'm going to look into the suggestion Patrick gave. It looks like a good suggestion to consider.

Thanks for all the comments.

Line:156, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventPropertySource.java -> Done

Line:243, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEventPropertySource.java -> Done

Line:35, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfCallsite.java -> Done

Line:61, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfCallsiteTest.java -> Copy-paster error :-)
Done

Line:74, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfCallsiteTest.java -> Done

Line:92, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfEvent.java -> Done

Line:31, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java -> Yes, it could be done. However, it is also used for trace file reference. I think it's good to have dedicated way to provide the call site.

Line:35, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfCallsite.java -> Done

Line:46, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfCallsite.java -> I will change it, since we have it our settings. However, I prefer this format

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