|
Re: bindAttribute did not work in case of copy&pase [message #1726571 is a reply to message #1726400] |
Mon, 14 March 2016 17:36 |
|
Hi Ralph,
Congratulations, you've found another bug
This is actually caused by the Paste function in DefaultPasteBPMNElementFeature.copyEObject(T eObject). Normally when a new object is constructed (i.e. during loading, or creation through the tool palette) the object is passed through the ModelExtensionDescriptor which adds metadata to the ExtendedPropertiesAdapter for extension features (the "processId" in your case). This does not happen during the Paste operation because...well, I just forgot to handle it.
I have a patch that fixes this easily and with no obvious side-effects. At the end of copyEObject() just before the return t; add these lines:
ExtendedPropertiesAdapter<T> oldAdapter = ExtendedPropertiesAdapter.adapt(eObject);
ExtendedPropertiesAdapter<T> newAdapter = ExtendedPropertiesAdapter.adapt(result);
for (EStructuralFeature oldFeature : oldAdapter.getExtensionFeatures()) {
FeatureDescriptor fd = newAdapter.getFeatureDescriptor(oldFeature);
fd.setProperty(ExtendedPropertiesAdapter.IS_EXTENSION_FEATURE, Boolean.TRUE);
}
Can you please file a bugzilla so we can track this bug?
Thanks!
Bob
|
|
|
|
Powered by
FUDForum. Page generated in 0.03430 seconds