[ECP] org.eclipse.emf.ecp.validation causes hang while making modification to ECPProject [message #1419507] |
Mon, 08 September 2014 18:20 |
Pouya Bozorgmehr Messages: 10 Registered: June 2014 |
Junior Member |
|
|
HI,
I have some model instances in ECP project when I modify them, it causes a hang inside org.eclipse.emf.ecp.validation module in validate method:
Two questions:
1.what is this validation module doing and why?
2. Any ideas on why it would hang?
Some info on the model:
it has about 70-200k sub items there are some circular references.
public IValidationService getValidationService(final Object validationServiceObject) {
if (!mapping.containsKey(validationServiceObject)) {
IValidationService validationService = new ValidationService(new IExcludedObjectsCallback() {
public boolean isExcluded(Object object) {
if(InternalProject.class.isInstance(validationServiceObject)){
return ((InternalProject)validationServiceObject).isModelRoot(object);
}
return false;
}
});
mapping.put(validationServiceObject, validationService);
if (validationServiceObject instanceof ECPProject) {
ECPProject project = (ECPProject) validationServiceObject;
validationService.[b]validate[/b](getAllChildEObjects(project));
}
return validationService;
}
return mapping.get(validationServiceObject);
}
Which then calls update
/**
* Updates the cached entry for the given {@link EObject} with the given value.<br/>
* If the cached entry does not yet exist, it will be created.
*
* @param eObject
* the {@link EObject}
* @param value
* the value associated with the {@link EObject}
* @return set of affected eobjects
*/
public Set<EObject> update(EObject eObject, T value) {
if (excludedCallback.isExcluded(eObject)) {
return Collections.emptySet();
}
final CachedTreeNode<T> node = createNodeIfNecessary(eObject, value);
node.setOwnValue(value);
updateNodeObject(eObject);
rootValue.putIntoCache(eObject, node.getOwnValue());
final Set<EObject> affectedElements = removeOutdatedParentCacheIfNeeded(eObject);
// propagate upwards
EObject parent = eObject.eContainer();
while (parent != null && !excludedCallback.isExcluded(parent)) {// !isExcludedType(excludedTypes,
// parent.getClass())
updateParentNode(parent, eObject, nodes.get(eObject).getDisplayValue());
eObject = parent;
parent = parent.eContainer();
affectedElements.add(eObject);
}
return affectedElements;
}
My guess the while condition becomes an infinite loop.
Thanks,
Pouya
[Updated on: Mon, 08 September 2014 20:58] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03219 seconds