Bug 402360 - Register the resourceChangeListener to ResourceChangeDispatcher with a phase when registering the listener with the Eclipse platform
Summary: Register the resourceChangeListener to ResourceChangeDispatcher with a phase ...
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 397949
Blocks:
  Show dependency tree
 
Reported: 2013-03-04 12:34 EST by Yue Ma CLA
Modified: 2024-05-07 00:55 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yue Ma CLA 2013-03-04 12:34:14 EST
The resource change listeners should register to the ResourceChangeDispatcher (bug#397949) with a phase (PRE, MAIN or POST) when registering with the Eclipse platform, that allows the dispatching of the resource change event to the registered listeners are not out of sequence. They are always dispatched in the sequence of PRE, MAIN, POST.

Pay attention to the phase that should be assigned to the resource change listener. Make sure that the resource change listener will be dispatched in a correct order.
Comment 1 Stephan Eberle CLA 2013-12-10 05:07:43 EST
The following existing resource change listeners in Sphinx should be refactored to be dispatched by the resource change dispatcher so that the mentioned workarounds can be removed:

* MetaModelDescriptorCacheUpdater
** Perform move/removal of metamodel descriptors in PRE phase
** Perform clearing of old metamodel descriptors in POST phase

* ModelDescriptorSynchronizer
** Perform in MAIN phase
** Remove removal of cached metamodel descriptors in BasicModelDescriptorSynchronizerDelegate.handleFileChanged(int, IFile) and BasicModelDescriptorSynchronizerDelegate.handleFileRemoved(int, IFile)
** Remove move of cached metamodel descriptors in BasicModelDescriptorSynchronizerDelegate.handleFileMoved(int, IFile, IFile)

* ModelSynchronizer
** Perform in MAIN phase
** Remove move of cached metamodel descriptors in BasicModelSynchronizerDelegate.handleFileMoved(int, IFile, IFile)

* ContentTypeIdCachePurger
** Perform in PRE phase
** Remove removal of cached content type ids in MetaModelDescriptorRegistry.FileMetaModelDescriptorCache.moveDescriptor(IFile, IFile) and MetaModelDescriptorRegistry.FileMetaModelDescriptorCache.removeDescriptor(IFile)

In addition, a similar mechanism as the resource change dispatcher should be introduced for resource set change listeners. This would enable to get rid of the removal of cached metamodel descriptors in ModelDescriptorSynchronizerComplement.handleModelResourceUnloaded(Collection<Resource>).
Comment 2 Balazs Grill CLA 2024-05-07 00:55:49 EDT
Closed stale issue before migration