DESCRIPTION

tmf: add initial place for default custom text trace types

This will allow to add default parsers to custom_txt_default_parsers.xml.
If they are edited, a shadow copy is made.
If the shadow copy is deleted, the default one returns.
These parsers can be exported, but of course, you cannot import to
the default zone.

The default text file is now stored in the ECLIPSE_HOME directory

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


COMMENTS

author: Ivy Mitchell
date: 2014-02-13 20:44:35.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2014-02-13 21:45:29.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2014-02-13 22:41:25.000000000

Patch Set 4: Verified+1

Build Successful 

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

-------------------------------------
author: Ricky Reeves
date: 2014-02-17 13:22:37.000000000

Patch Set 4: Code-Review-1

(1 comment)

See inline comment. Also, I found the following problems during first tests.

1) When there is no custom_txt_parsers.xml file in the workspace (under org.eclipse.linuxtools.tmf.core/ or org.eclipse.linuxtools.tmf.ui) then I get the following exception 

java.io.FileNotFoundException: /home/user/.traceviewer/.metadata/.plugins/org.eclipse.linuxtools.tmf.core/custom_txt_parsers.xml (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:146)
	at java.io.FileInputStream.<init>(FileInputStream.java:101)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:613)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
	at org.eclipse.linuxtools.tmf.core.parsers.custom.CustomTxtTraceDefinition.lookupDefinition(CustomTxtTraceDefinition.java:744)
	at org.eclipse.linuxtools.tmf.core.parsers.custom.CustomTxtTraceDefinition.load(CustomTxtTraceDefinition.java:727)
	at org.eclipse.linuxtools.internal.tmf.ui.dialogs.ManageCustomParsersDialog$5.widgetSelected(ManageCustomParsersDialog.java:179)

2) When there is a custom_txt_parsers.xml file in org.eclipse.linuxtools.tmf.core/ I cannot edit or delete the shadow copy. It seems that the shadow copy is not saved

Line:74, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomTxtTraceDefinition.java -> the custom parser should go under a sub directory of ECLIPSE_HOME to not clutter the ECLIPSE_HOME

-------------------------------------
author: Kaeden Tapia
date: 2014-02-17 15:25:41.000000000

Patch Set 4: Code-Review-1

(2 comments)

Line:15, /COMMIT_MSG -> I think ECLIPSE_HOME is a bit misleading. It makes it look like it's an environment variable. As far as I know, there is no such environment variable that is predefined by Eclipse. I think it's better to call it the Eclipse installation location, which reflects the method call Platform.getInstallLocation.

Line:728, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomTxtTraceDefinition.java -> whitespace

-------------------------------------
author: Ivy Mitchell
date: 2014-02-17 15:42:15.000000000

Patch Set 4:

(2 comments)

Line:74, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomTxtTraceDefinition.java -> Done

Line:728, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomTxtTraceDefinition.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2014-02-19 14:27:09.000000000

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

Please rebase the change locally and upload the rebased commit for review.

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