[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Mapping EObject Objects to Diagnostic Objects

Felix


Felix Dorner wrote:
Hey,

I have read the (too short, but 1000 times better than nothing) chapter on EMF Validation in the Rough Cuts Book, and have a small doubt, please correct if I make wrong assumptions.

I call Diagnostician.eINSTANCE.validate(myContainmentRoot), to validate my whole model which gives me a tree-like structure consisting of Diagnostic objects.

From a certain Diagnostic object, I can then get the involved model object(s) via the Diagnostic's getData() method.

I'd rather like to have a Map<EObject,List<Diagnostic>>, which would map a given eObject to all the Diagnostic's it is involved (i.e. its getData() contains the eObject).

Is something like this available through the framework, or do I need to manually compute the Map based on the Diagnostic tree?


What's the role of the "context" map argument in the Diagnostician's validate() methods? Unfortunately there's no information in the Javadoc.



Thanks, Felix