DESCRIPTION

tmf: Refactor resource change listener in project model

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

- Only refresh the projects affected by the resource change event

- 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: Brenden Conley
date: 2013-12-16 23:35:46.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-12-17 00:24:41.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Luciana Barry
date: 2013-12-17 19:34:42.000000000

Patch Set 1: Verified-1

(1 comment)

Line:347, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/TracePackageImportOperation.java -> If the TmfTraceElement is not created the importing of supplementary files will fail

-------------------------------------
author: Luciana Barry
date: 2013-12-18 23:48:39.000000000

Patch Set 1:

(1 comment)

Line:347, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/TracePackageImportOperation.java -> If I put the call to getChildren back, it is possible to concurrently create two trace elements for the same resource, one here in the ModalContext thread, and another in the commonViewer refresh in the UI thread, triggered by the resource change event. The trace folder then has a wrong trace count.
The solution I found is to update the model immediately in the current thread in the refresh triggered by the resource change event, although the model is updated a second time in the UI thread.

-------------------------------------
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.

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