Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 293012 - [modeling] Live validation and cross resource containment
Summary: [modeling] Live validation and cross resource containment
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Incubators (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Benjamin Cabé CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-22 05:55 EDT by Simon Bernard CLA
Modified: 2009-10-23 12:13 EDT (History)
1 user (show)

See Also:


Attachments
a patch for this bug (3.57 KB, patch)
2009-10-22 06:27 EDT, Simon Bernard CLA
no flags Details | Diff
a new patch (4.16 KB, patch)
2009-10-22 08:47 EDT, Simon Bernard CLA
contact: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Bernard CLA 2009-10-22 05:55:58 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Build Identifier: 

When using the framework emfforms, you could implement an editor for an eobject which can have cross resource containement.

In this case, validation will launch resolution of proxy, and resolution of proxy will launch a new validation. That will decrease the live validation performance (which is run too often).

Futhermore, in the case of cross resource containement, perhaps the validation must not run across all the ressources. It would surely better to run it only on the edited object resource.


Reproducible: Sometimes
Comment 1 Simon Bernard CLA 2009-10-22 05:58:25 EDT
There is a NotificationFilter in emf.transaction which tests if a notification is a read only notification. It could be used to avoid to launch too often the "live validation".
Comment 2 Simon Bernard CLA 2009-10-22 06:27:17 EDT
Created attachment 150220 [details]
a patch for this bug

I propose a patch which uses the NotificationFilter and which doesn't validate objects which are not in the edited objet resource.
Comment 3 Simon Bernard CLA 2009-10-22 08:47:13 EDT
Created attachment 150232 [details]
a new patch

if the validation is done in a transactional context, it must be execute in a runExclusive.
Comment 4 Benjamin Cabé CLA 2009-10-23 12:13:00 EDT
Fixed in HEAD>20091023 , thanks Simon!