Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327265

Summary: [TMF] Custom parsers NPE, extra columns and event type & content fixes
Product: z_Archived Reporter: Patrick Tasse <patrick.tasse>
Component: LinuxToolsAssignee: Francois Chouinard <fchouinard>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed patch on org.eclipse.linuxtools.tmf.ui.parsers.custom
none
Proposed patch in org.eclipse.linuxtools.tmf.ui.parsers.custom
none
Proposed patch in org.eclipse.linuxtools.tmf.ui.parsers.custom
none
Proposed patch in org.eclipse.linuxtools.tmf.ui fchouinard: iplog+

Description Patrick Tasse CLA 2010-10-07 14:02:25 EDT
Build Identifier: 

Submitting a patch for the following bug fixes and improvements to the custom parsers:

1. A NullPointerException occurs when parsing a custom text trace where the definition contains matching lines which do not capture any data. A check is added for null InputData list when processing a line.

2. The CustomEventsTable is created with extra columns corresponding to the default columns of the base class. An empty ColumnData array is passed to the super constructor.

3. A CustomEventType is created to support the field labels.

4. A CustomEventContent is created to support the field values.

5. The CustomEventContent's raw content is set to a StringBuffer containing the raw input text for both custom text and XML traces.


Reproducible: Always
Comment 1 Patrick Tasse CLA 2010-10-07 14:04:09 EDT
Created attachment 180444 [details]
Proposed patch on org.eclipse.linuxtools.tmf.ui.parsers.custom

Legal Message: I, Patrick Tasse, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer to make this contribution under
the EPL.
Comment 2 Patrick Tasse CLA 2010-10-07 16:16:50 EDT
Created attachment 180450 [details]
Proposed patch in org.eclipse.linuxtools.tmf.ui.parsers.custom

Fixed patch NPE during parsing.

Legal Message: I, Patrick Tasse, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer to make this contribution under
the EPL.
Comment 3 Patrick Tasse CLA 2010-10-07 17:43:06 EDT
Created attachment 180457 [details]
Proposed patch in org.eclipse.linuxtools.tmf.ui.parsers.custom

Additional fix:

6. Empty event fields are not set properly when the table is scrolled. A null string does not erase the TableItem column text. The CustomEvent column data is now set to an empty string when the field value is null.

Legal Message: I, Patrick Tasse, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer to make this contribution under
the EPL.
Comment 4 Patrick Tasse CLA 2011-02-23 16:45:27 EST
Created attachment 189648 [details]
Proposed patch in org.eclipse.linuxtools.tmf.ui

Additional fixes:

7. Icon paths fixed.

8. Preview table layout fixed.

9. Moved creation of listeners later to prevent NPE.

10. Removed unused variables and methods.

11. Created CustomTxtEventType and CustomXmlEventType.

12. Modified parsers to use BufferedRandomAccessFile.

13. Use of NULL_LOCATION constant.

Legal Message: I, Patrick Tasse, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer to make this contribution under
the EPL.
Comment 5 Francois Chouinard CLA 2011-03-29 18:26:10 EDT
Patch committed. Thanks Patrick.
Comment 6 Francois Chouinard CLA 2011-07-22 14:50:32 EDT
Delivered with 0.8