DESCRIPTION

TMF: Add new XML analysis project

Empty project where the data-driven XML analysis will be added

Change-Id: I3fc3c1ab468c601127451990bbb87dc26881f547
Signed-off-by: Aryana Jones xxx@xxx.xxx


COMMENTS

author: Annalise Jimenez
date: 2013-11-19 19:12:37.000000000

Patch Set 1:

This is just an empty project for the future xml analysis, but at least it will reduce the noise in the "real" patches.

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-19 19:18:45.000000000

Patch Set 1:

Will this be meant to contain just the code to parse XML-defined analysis files, or also the actual XML files themselves?

-------------------------------------
author: Annalise Jimenez
date: 2013-11-19 20:04:25.000000000

Patch Set 1:

The Code surrounding all xml stuff.  For now xml files are imported in a workspace by the user.

We'll have to think of a way for plugins like lttng2.kernel.core to ship with their own Xml files that can, if desired, be copied by the user, modified and overwritten (but the original that shipped with the plugin will remain untouched). But that is out of scope of the actual upcoming patches of data-driven analysis.

-------------------------------------
author: Brenden Conley
date: 2013-11-19 23:16:58.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-11-20 00:08:50.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2013-11-26 20:56:26.000000000

Patch Set 1: Code-Review+1 IP-Clean+1

I really don't see anything objectionable in this.

-------------------------------------
author: Ricky Reeves
date: 2013-11-26 21:09:42.000000000

Patch Set 1: Code-Review-1

It looks like that this patch is using tmf.core and tmf.ui. Do we want to start adding plug-in with UI and core together?

Also, is there a reason beside code size of TMF why it cannot be placed in tmf.core and tmf.ui directly?

Also could there be code for parsing XML that could be re-used by parts of tmf.core/tmf.ui? (e.g. custom text parsers, data-driven sequence diagrams) If so, we would have circular dependencies.

-1 for now so that we can clarify these questions.

-------------------------------------
author: Ayanna Reed
date: 2013-11-26 22:00:01.000000000

Patch Set 1:

>It looks like that this patch is using tmf.core and tmf.ui. Do we want to start adding plug-in with UI and core together?
It's a proposition to have one project per analysis. I don't known if we want that or not. 

>Also, is there a reason beside code size of TMF why it cannot be placed in tmf.core and tmf.ui directly?
It can be placed in tmf.core and tmf.ui if it's better. But more we add analysis more this two projects would be huge.

>Also could there be code for parsing XML that could be re-used by parts of tmf.core/tmf.ui? (e.g. custom text parsers, data-driven sequence diagrams) If so, we would have circular dependencies.
May be ?

>-1 for now so that we can clarify these questions.

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-26 23:28:36.000000000

Patch Set 1: Code-Review-1

Thanks for the clarifications Florian.

From Geneviève's previous comment, if I understood right this project will be to hold the generic XML-parsing abilities. The XML files themselves will be shipped separately (supplied by the user, or contained in another java project).

It could make sense to want to keep the "XML-reading" feature separate, so that you can install it separately from the plugin. However, as Meredith Scott mentioned, this could potentially limit us as to how we use that feature, since we cannot have circular dependencies between plugins.

We'd have to see what code actually goes in there, but from my initial impression this is something that should remain in the framework (tmf.core and tmf.ui).

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-26 23:32:25.000000000

Patch Set 1:

Also, perhaps eventually we will ship many example XML analysis files (for commonly-used analyses, or just to demo what the framework can do), but those files could go in a separate directory in the git tree. They wouldn't need to be in a Java project. Each one should not require specific Java code, the framework should provide the "format" and be able to read whatever respects it.

-------------------------------------
author: Annalise Jimenez
date: 2013-11-27 00:54:48.000000000

Patch Set 1:

It is my personal opinion that tmf.core and tmf.ui are getting really huge and seeing what is coming with analysis (XML, graph/critical path, virtual machine), having each feature/analysis as a separate plugin makes more sense logically.  It's easier for developers to find what they are looking for this way than if it is spread out in packages of tmf.core and tmf.ui.  

I'd say tmf.core and tmf.ui should be just the basic blocks of TMF and leave out the "functional".  If you wish to add data-driven sequence diagrams or other, then the tmf.analysis.xml plugin is as good a place to put it and you'll have all xml data-driven stuff in one place.

IMHO, open for discussion but ready to defend this point ;-)

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-27 02:03:42.000000000

Patch Set 1:

Oh no, discussion!

I agree that tmf.core/ui are quite big... On the core side, I'm planning to move the state system to a separate plugin (I've already had requests to extract the history tree in a separate plugin, so it can be used for different purposes). On the ui side, there's a lot of cleanup to do (views, viewers, widgets, etc. could be harmonized), and eventually (long-term) it should only contain the base views like xy chart, generic histogram, gantt chart, etc. and the specific views could be implemented in XML.

When you separate things in different plugins, it's important to keep track of what comes under/above what. (Technically we are supposed to do that with *packages* too, but I doubt many projects do...) For example, the eventual state system plugin will contain no TMF-related classes, and tmf.core will depend on it. Or in the case of the lttng2, they use and depend on TMF, but from tmf.* we cannot make references to it.

In the case of tmf.analysis, I see this as an extension to TMF, so it would come "on top of" tmf.core/ui. This means tmf.core/ui will not be able to access any classes in tmf.analysis. Our concern is that we may paint ourselves in the corner, it might work fine at the start, but as more and more functionality gets XML-ized, we might want to start using it in other places in the base framework.

It might become more clear while writing the actual code and prototyping with it. I like compartmentalization too, but we should get the content first and then the compartment.

At worst, packages do provide some kind of namespacing already (tmf.core.xml, tmf.core.xml.thingy1, etc.) No matter if it's added packages or added plugins, we're gonna have to spin that scrollbar anyway ;)

-------------------------------------
author: Annalise Jimenez
date: 2013-11-27 14:24:06.000000000

Patch Set 1:

I see what you mean about if it's above or under tmf.core/ui.  This plugin will contain code for the XML-defined analysis, the schema to describe state systems, views, etc.  Maybe a few classes (or their interfaces) could be sent back to tmf.ui or core.

I see this plugin as the place to put everything XMLy about data driven analysis.  The base plugins could be used to put XML-agnostic data-driven classes and interfaces, so that TMF may eventually support other data sources than just XML with a minimal effort (for example stuff contained in CTF metadata as has been discussed in the past).  

If you wish, I can push as draft a patch of this project with the full code it contains (that will come in a few "real" patches), so you can see what this plugin contains.

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-27 20:07:47.000000000

Patch Set 1:

Sure, I guess with the code it will be more clear. It would indeed be cleaner to have it as a separate plugin, as long as that does not limit us, as mentioned earlier.

One thing that bothers me a bit is that the plugin depends on both .core and .ui stuff, so I assume it will use things from both? Would it be worth splitting it in tmf.xml.core and tmf.xml.ui ?

-------------------------------------
author: Annalise Jimenez
date: 2013-11-27 20:18:28.000000000

Patch Set 1:

.xml.core and .xml.ui is another matter :p

You double the number of plugins with the unit tests and each plugin would typically have 2/3 packages of a few classes each... Is it worth separating?  And if so, could all unit tests be in one xml.tests plugin to avoid yet again another small plugin?

Knowing I already have 2 more pairs of analysis plugin in development (critical path and virtual machines)

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-27 20:27:18.000000000

Patch Set 1:

Critical path I'm not sure what it will look like, but "virtual machines" seems like a specific use case, like the lttng2.kernel.* plugins, which does have a .core and .ui.

I know the never-ending list of plugins is annoying, but we don't really have a choice... Ctrl+Shift+T helps ;)

-------------------------------------
author: Ricky Reeves
date: 2013-11-27 20:48:11.000000000

Patch Set 1:

If we are getting circular dependencies then I'm against having own plug-ins for the XML analysis. The XML plug-ins need be a user of tmf.core and tmf.ui. Also shouldn't be any XML files that are parsed by the XML analysis plug-ins stored in tmf.ui and tmf.core

About putting core and ui in one XML analysis plug-in, I usually like consistency and the consistent way would be separating ui and non-ui code. I mean consistent in respect of rest of the Linux Tools plug-ins and probably a lot of the Eclipse plug-ins. Splitting UI and non-ui has the advantage that you are able to use the non-ui plug-ins in a non-ui application.

-------------------------------------
author: Annalise Jimenez
date: 2013-11-27 21:00:09.000000000

Patch Set 1:

Ok, I'll split the plugins then :p

And there are no circular dependencies so far.

As I said, I'd rather have (if need be eventually) xml-agnostic interfaces for data-driven analysis than xml-specific stuff.

Sample XML files would be provided by tracetype or analysis-specific plugins like lttng2.kernel and lttng2.ust, not tmf.core and tmf.ui.

-------------------------------------
author: Ricky Reeves
date: 2013-12-03 14:01:02.000000000

Patch Set 1:

Thanks for splitting it in core and ui. That will make it easier later on create non-ui applications using the the core features.

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