DESCRIPTION

tmf: Refactor resource change listener in project model

- Move resource change listener from every project element to the
project registry

- Create project in a WorkspaceModifyOperation to combine the many
resource change events into one.

- Only refresh the projects affected by the resource change event

- Update the model in the current thread on project refresh

- Refreshing the model children moved from the navigator content
provider to each specific model element

- Change getChildren from navigator content provider to simply return
the children list, that is now updated separately (as described above)

- Remove project from the registry when it is deleted

- Modify project registry to populate the model when getting a project
element for the first time

- Remove various unnecessary refresh of the model accordingly

Change-Id: I7e080e6b10617786a715e3cb39bf297b79168998
Signed-off-by: Luciana Barry xxx@xxx.xxx


COMMENTS

author: Luciana Barry
date: 2013-12-19 20:45:51.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2013-12-19 21:41:43.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2013-12-19 21:50:14.000000000

Patch Set 5: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4807/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2013-12-20 00:59:47.000000000

Patch Set 5: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2013-12-20 01:46:38.000000000

Patch Set 5: Verified+1

Build Successful 

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

-------------------------------------
author: Annalise Jimenez
date: 2013-12-20 19:22:19.000000000

Patch Set 5:

(3 comments)

I much prefer this approach. What a coincidence I worked on a complementary of this at the same time!

I'll rebase my patch on this one to see how it goes and rate it afterwards.

Line:164, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectElement.java -> Here too you could do childrenMap.remove(name) and avoid an else underneath.

Line:125, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfExperimentElement.java -> You could directly do a childrenMap.remove(name) and if (element == null)

Line:103, lttng/org.eclipse.linuxtools.tmf.ui.tests/shared/org/eclipse/linuxtools/tmf/ui/tests/shared/ProjectModelTestData.java -> Any reason why you pass by the array here?

-------------------------------------
author: Annalise Jimenez
date: 2013-12-20 20:48:31.000000000

Patch Set 5: Code-Review+1

It works but now that a refresh is triggered when resources are changed, I think a there are a few redundant project.refresh() in the code. I haven't looked in detail, but for instance in the deleteExperimentHandler, the project refresh is unnecessary. There may be a few of those. It's not problematic per se, so if you don't mind this then that patch is ok with me.

-------------------------------------
author: Gerrit Code Review
date: 2014-01-06 17:04:14.000000000

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

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

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