DESCRIPTION

[Tmf][Ctf] Add descriptive fail to import messages.

This patch proposes a way of showing more error details.
The ctf modifications use reflexion since the parser and lexer are auto-generated.
Now with number format exceptions for ints

Change-Id: I74cbbd4aaff29f458786ffc96e88b5416b49beed
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2013-04-12 13:05:05.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2013-04-12 13:05:10.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2013-04-12 13:21:36.000000000

Patch Set 5: Verified

Build Successful 

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

-------------------------------------
author: Luciana Barry
date: 2013-04-12 19:36:38.000000000

Patch Set 5: (18 inline comments)



Line:776, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java -> fp

Line:399, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java -> PLUGIN_ID

Line:501, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java -> PLUGIN_ID

Line:78, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFReaderException.java -> Why, it's not so ugly?
However in the parse.. method I would put a nice comment to explain that the CTFLexer auto-generated class will always have as first declared fields a list of int constants whose unique value correspond to the integer value returned in the MismatchedTokenExecption 'expecting' and 'c' fields.

Line:181, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java -> Would there be a way to not hide the exception?

Line:73, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelTrace.java -> Use PLUGIN_ID from the Activator?

Line:1, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/messages.properties -> That should be a plugin id instead so can be removed here

Line:3, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/messages.properties -> Alex would say to move the space to the java code

Line:2320, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java -> formatting police

Line:2328, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java -> fp

Line:79, lttng/org.eclipse.linuxtools.gdbtrace.core/src/org/eclipse/linuxtools/internal/gdbtrace/core/trace/GdbTrace.java -> fp

Line:82, lttng/org.eclipse.linuxtools.gdbtrace.core/src/org/eclipse/linuxtools/internal/gdbtrace/core/trace/GdbTrace.java -> Use PLUGIN_ID from the Activator?

Line:380, lttng/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java -> PLUGIN_ID

Line:146, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java -> Are arguments correct? No pluginId

Line:149, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java -> PLUGIN_ID

Line:134, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/SelectTraceTypeHandler.java -> fp

Line:145, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/SelectTraceTypeHandler.java -> I think you already have window in a local variable

Line:215, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/SelectTraceTypeHandler.java -> fp

-------------------------------------
author: Ricky Reeves
date: 2013-04-15 14:20:54.000000000

Patch Set 5: (2 inline comments)



Line:135, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java -> Do we need to xxx@xxx.xxx references? I prefer not to

Line:149, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java -> There is a constructor of Status that takes an throwable as last argument. I think you should used it where applicable instead of adding e.toString().

-------------------------------------
author: Gerrit Code Review
date: 2013-04-22 22:06:42.000000000

Your change could not be merged due to a path conflict.

Please merge (or rebase) the change locally and upload the resolution for review.

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