Bug 528476 - ValidationService validates removed objects
Summary: ValidationService validates removed objects
Status: RESOLVED FIXED
Alias: None
Product: ECP
Classification: Modeling
Component: EMF Forms (show other bugs)
Version: 1.14.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.17.0   Edit
Assignee: Lucas Koehler CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2017-12-12 04:44 EST by Adam Bialas CLA
Modified: 2018-06-14 05:53 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Bialas CLA 2017-12-12 04:44:50 EST
We are using TreeMasterDetail to render our model. We found out that when we remove a child object from a tree then it is not removed from validation context so method:

private static Collection<EObject> getAllEObjectsToValidate(EMFFormsSettingToControlMapper controlMapper)

from ValidationServiceImpl returns it also. After some debugging we discovered that EMFFormsSettingToControlMapper implementation (which is SettingToControlMapperImpl) has a bug. When child context (for new object in a tree) is added then it adds all control from a view which is renderer but additionally it adds parent control which is a TreeMasterDetail (all is done in method vControlAdded which is executed when child context is added). The problem is that when we remove this child context a method childContextDisposed is executed which removes all controls which are on a view. But it does not remove a parent so it will never remove a setting from settingToControlMap in method deleteOldMapping.


Adam
Comment 1 Eugen Neufeld CLA 2017-12-12 04:54:37 EST
Hi Adam, 

thank you for the detailed analysis.
Would you be interested to provide a fix for this?

Cheers,
Eugen
Comment 2 Adam Bialas CLA 2017-12-12 06:53:15 EST
Hi Eugen

Can you tell me shortly how to provide a fix? Which repo should I clone etc.?

I did one fix already but it was a long time ago.

Adam
Comment 3 Eugen Neufeld CLA 2017-12-12 07:32:37 EST
Hi Adam, 

just clone git://git.eclipse.org/gitroot/emfclient/org.eclipse.emf.ecp.core.git
switch to the develop branch and do a gerrit contribution.

Cheers,
Eugen
Comment 4 Adam Bialas CLA 2017-12-13 02:47:11 EST
Hi Eugen,

I want to prepare a fix for it. I followed the installation of IDE which is described here: https://www.eclipse.org/ecp/emfforms/gettinginvolved.html

However, IDE is not starting. There is no error, log etc. Are these steps correctly described?

Adam
Comment 5 Adam Bialas CLA 2017-12-13 02:56:40 EST
Problem with IDE fixed.
Comment 6 Adam Bialas CLA 2017-12-18 15:45:06 EST
Hi Eugen,

I cannot get imported projects compiled without errors. After import I have about 1000 compilation errors. I changed target platform, set severity of restriction rules to JavaFX to Warning. But still projects are missing some plugins, some types etc.
How to fix it. I cloned and imported whole repository.

Adam
Comment 7 Eugen Neufeld CLA 2017-12-19 06:31:21 EST
Hi Adam, 

did you follow the guide here: https://www.eclipse.org/ecp/emfforms/gettinginvolved.html

Otherwise just close all projects containing "rap" or "javafx" in their name.
Also set the "ecp.target".

Cheers,
Eugen
Comment 8 Adam Bialas CLA 2017-12-19 17:49:05 EST
Hi Eugen

I have a fix for it but how can I test it? How can I run TreeMasterDetail example?

Adam
Comment 9 Eugen Neufeld CLA 2017-12-20 03:51:58 EST
Hi Adam, 

the easiest thing to do would be to use the MakeItHappen Example.
Just modify the ViewModel and run the example using the product from the IDE.

Cheers,
Eugen
Comment 10 Eclipse Genie CLA 2017-12-25 16:13:27 EST
New Gerrit change created: https://git.eclipse.org/r/114732
Comment 11 Adam Bialas CLA 2017-12-28 01:47:19 EST
Hi Eugen,

I provided a fix for it. Should I do something more or just wait for the review?

Adam
Comment 12 Eugen Neufeld CLA 2017-12-28 09:18:54 EST
Hi Adam, 

I will do the review in the next couple of days.

Cheers,
Eugen
Comment 13 Eclipse Genie CLA 2018-03-23 07:49:22 EDT
New Gerrit change created: https://git.eclipse.org/r/120064
Comment 14 Eclipse Genie CLA 2018-03-23 07:49:24 EDT
New Gerrit change created: https://git.eclipse.org/r/120063
Comment 17 Jonas Helming CLA 2018-05-02 08:40:16 EDT
This caused a regression, fixed with https://bugs.eclipse.org/bugs/show_bug.cgi?id=533620