Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327265 - [TMF] Custom parsers NPE, extra columns and event type & content fixes
Summary: [TMF] Custom parsers NPE, extra columns and event type & content fixes
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LinuxTools (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Francois Chouinard CLA
QA Contact: Francois Chouinard CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-07 14:02 EDT by Patrick Tasse CLA
Modified: 2022-01-13 14:53 EST (History)
0 users

See Also:


Attachments
Proposed patch on org.eclipse.linuxtools.tmf.ui.parsers.custom (11.97 KB, patch)
2010-10-07 14:04 EDT, Patrick Tasse CLA
no flags Details | Diff
Proposed patch in org.eclipse.linuxtools.tmf.ui.parsers.custom (12.62 KB, patch)
2010-10-07 16:16 EDT, Patrick Tasse CLA
no flags Details | Diff
Proposed patch in org.eclipse.linuxtools.tmf.ui.parsers.custom (12.88 KB, patch)
2010-10-07 17:43 EDT, Patrick Tasse CLA
no flags Details | Diff
Proposed patch in org.eclipse.linuxtools.tmf.ui (37.13 KB, patch)
2011-02-23 16:45 EST, Patrick Tasse CLA
fchouinard: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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