Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [EEF] EEF and Undo
[EEF] EEF and Undo [message #650299] |
Mon, 24 January 2011 10:08 |
Nirmal Sasidharan Messages: 120 Registered: July 2009 Location: Germany |
Senior Member |
|
|
Hello,
I integrated the EEF generated forms in a master-detail form. Everything appears to work fine except "Undo". When I debugged, I found that org.eclipse.emf.eef.runtime.impl.command. StandardEditingCommand doesn't seem to implement undo(). Do you have some tips on how to integrate an Undo feature. Do I have to implement EMF binding on my own? Or am I missing something.
Thanks in advance for your help.
Regards,
Nirmal
|
|
| | | |
Re: [EEF] EEF and Undo [message #650415 is a reply to message #650355] |
Mon, 24 January 2011 18:35 |
Goulwen Le Fur Messages: 125 Registered: July 2009 |
Senior Member |
|
|
Hi Nirmal,
I think I found what the problem. We haven't promote an operational
build on the nightly update site of EEF.
Now this is done, can you check you differents problems with this version.
Regards,
--
Goulwen
Le 24/01/2011 16:06, Nirmal Sasidharan a écrit :
> I migrated to the latest nightly built, and regenerated the models and
> architecture. But there seems to be compilation errors in some places.
>
> In xxxPropertiesEditionComponent, the generated references to
> EReferencePropertiesEditionContext are always invalid. It complains
> about appropriate constructor not available in
> EReferencePropertiesEditionContext.
> The constructor
> EReferencePropertiesEditionContext(PropertiesEditingContext,
> FuncDefPropertiesEditionComponent, EObjectFlatComboSettings,
> AdapterFactory) is undefined
>
> Could this be a bug in the generators?
>
> Regards,
> Nirmal
>
>
|
|
|
Re: [EEF] EEF and Undo [message #650518 is a reply to message #650415] |
Tue, 25 January 2011 12:04 |
Nirmal Sasidharan Messages: 120 Registered: July 2009 Location: Germany |
Senior Member |
|
|
Hello,
I updated to the new nightly version (0.9.0.v20110124-1449) and regenerated the model and code. But the above error I mentioned is still there. A required constructor seems to be missing in EReferencePropertiesEditionContext. Due you have any clue on whats going on?
Thanks a lot for your help until now.
Regards,
Nirmal
Edit: I see the error everywhere there is a multivalued reference. Good news is Undo seems to work fine now. But the above mentioned properties don't work (of course due to compilation errors)
[Updated on: Tue, 25 January 2011 12:29] Report message to a moderator
|
|
| |
Re: [EEF] EEF and Undo [message #650702 is a reply to message #650614] |
Wed, 26 January 2011 07:56 |
Nirmal Sasidharan Messages: 120 Registered: July 2009 Location: Germany |
Senior Member |
|
|
Hello Goulwen,
It seems I could now nail down the problem. It happens always for EReference when the type referenced is an Abstract type.
xxxPropertiesEditionComponent.java
private EObjectFlatComboSettings typeSettings;
public void updateSemanticModel(final IPropertiesEditionEvent event) {
if (ModeldefinitionViewsRepository.DataDef.Properties.type == event.getAffectedEditor()) {
if (event.getKind() == PropertiesEditionEvent.SET) {
typeSettings.setToReference((MyType)event.getNewValue());
} else if (event.getKind() == PropertiesEditionEvent.ADD) {
EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, typeSettings, editingContext.getAdapterFactory());
PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
if (provider != null) {
PropertiesEditingPolicy policy = provider.getPolicy(context);
if (policy instanceof CreateEditingPolicy) {
policy.execute();
}
}
}
}
}
Here ModeldefinitionViewsRepository.DataDef.Properties.type is reference to an Abstract type. Error is at this line
EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, typeSettings, editingContext.getAdapterFactory());
typeSettings is not compatible with the constructors available for EReferencePropertiesEditionContext
if (ModeldefinitionViewsRepository.DataDef.Properties.dataTypeTM == event.getAffectedEditor()) {
if (event.getKind() == PropertiesEditionEvent.SET) {
dataTypeTMSettings.setToReference((T_ParaType)event.getNewValue());
} else if (event.getKind() == PropertiesEditionEvent.ADD) {
T_ParaType eObject = TelemetryFactory.eINSTANCE.createT_ParaType();
EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, eObject, editingContext.getAdapterFactory());
PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
if (provider != null) {
PropertiesEditingPolicy policy = provider.getPolicy(context);
if (policy != null) {
policy.execute();
}
}
dataTypeTMSettings.setToReference(eObject);
}
}
Here dataTypeTM is a concrete type and it works.
Please let me know if you have the required information now.
Regards,
Nirmal
|
|
| | | |
Re: [EEF] EEF and Undo [message #653060 is a reply to message #652375] |
Tue, 08 February 2011 10:18 |
Nirmal Sasidharan Messages: 120 Registered: July 2009 Location: Germany |
Senior Member |
|
|
Hello Goulwen,
The latest nighly build fixes all the issues I was talking about. Thanks a lot.
However, there seems to be a bug that the dirty flag is fired even when no changes are made, but simply when the focus is lost.
Thanks again for your great work!
Regards,
Nirmal
Edit: Added issues with Undo
[Updated on: Tue, 08 February 2011 10:49] Report message to a moderator
|
|
| | |
Re: [EEF] EEF and Undo [message #654846 is a reply to message #653378] |
Thu, 17 February 2011 12:30 |
Nirmal Sasidharan Messages: 120 Registered: July 2009 Location: Germany |
Senior Member |
|
|
Hello Goulwen,
Did you manage to check the Undo problem I reported last? Would be nice if you could give me a short update.
There are two more issues which I face currently:
1. The viewers in the wizard dialogs don't react to changes to its displayed model elements . The property view reacts correctly when the model is changed that it updates its viewers and shows the updated content. The wizard dialogs however reflect the changes only when they are closed and opened again.
2. The wizard dialogs don't change models transactionally. If a wizard A brings up another wizard B, the changes comitted by wizard B are not reversed if wizard A is cancelled. Ideally, this is the expected behaviour even when "n" subdialogs are opened.
Could you please check these issues as well?
Thanks and regards,
Nirmal
[Updated on: Thu, 17 February 2011 12:33] Report message to a moderator
|
|
| |
Re: [EEF] EEF and Undo [message #655106 is a reply to message #654846] |
Fri, 18 February 2011 10:54 |
Nirmal Sasidharan Messages: 120 Registered: July 2009 Location: Germany |
Senior Member |
|
|
Hello Goulwen,
Thanks for your quick reply. I was talking about this undo problem.
Nirmal Sasidharan wrote on Wed, 09 February 2011 16:19 |
In the latest build, there seems to be a bug that the dirty flag is fired even when no changes are made, but simply when the focus is lost from a widget.
|
Nirmal Sasidharan wrote on Thu, 17 February 2011 13:30 |
1. The viewers in the wizard dialogs don't react to changes to its displayed model elements .
|
For example, lets say I have a Wizard with one ReferencesTable and a EObjectFlatComboViewer. I set a new value using EObjectFlatComboViewer. This results in some model changes for elements displayed in ReferencesTable (that is some objects might be removed, some might be added etc.). When I close the EObjectFlatComboViewer and return to the wizard, the wizard displays the old objects in the ReferencesTable. Isn't it expected that the ReferencesTable reacts to the changes of the elements it displays. I do not want to manually refresh the ReferencesTable table as I make my model changes based on notification and has no UI interactions.
Nirmal Sasidharan wrote on Thu, 17 February 2011 13:30 |
2. The wizard dialogs don't change models transactionally.
|
My mistake. This works perfectly fine. Sorry about that.
Regards,
Nirmal
|
|
|
Goto Forum:
Current Time: Tue Sep 24 23:05:33 GMT 2024
Powered by FUDForum. Page generated in 0.05045 seconds
|