Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] EEF and Undo
[EEF] EEF and Undo [message #650299] Mon, 24 January 2011 10:08 Go to next message
Nirmal SasidharanFriend
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 #650321 is a reply to message #650299] Mon, 24 January 2011 11:37 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Hi Nirmal,

It seems to be a bug we've fixed some weeks ago. Can you tell me the
version of EEF you use currently ?

--
Goulwen

Le 24/01/2011 11:08, Nirmal Sasidharan a écrit :
> 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 #650335 is a reply to message #650321] Mon, 24 January 2011 12:42 Go to previous messageGo to next message
Nirmal SasidharanFriend
Messages: 120
Registered: July 2009
Location: Germany
Senior Member
Hello Goulwen,

Thats nice to hear. I am using EEF 0.9.0.v20101214-0947.

Is the new version available as a nightly/milestone build already?

Thanks & regards,
Nirmal
Re: [EEF] EEF and Undo [message #650355 is a reply to message #650335] Mon, 24 January 2011 15:06 Go to previous messageGo to next message
Nirmal SasidharanFriend
Messages: 120
Registered: July 2009
Location: Germany
Senior Member
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 #650415 is a reply to message #650355] Mon, 24 January 2011 18:35 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
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 Go to previous messageGo to next message
Nirmal SasidharanFriend
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 #650614 is a reply to message #650518] Tue, 25 January 2011 16:53 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
HuM, your problem is very strange. Can you tell me in which context
(EReference/EAttribute/EEF Widet) this error is generated ?


Regards
--
Goulwen

Le 25/01/2011 13:04, Nirmal Sasidharan a écrit :
> 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
Re: [EEF] EEF and Undo [message #650702 is a reply to message #650614] Wed, 26 January 2011 07:56 Go to previous messageGo to next message
Nirmal SasidharanFriend
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 #651971 is a reply to message #650702] Wed, 02 February 2011 10:19 Go to previous messageGo to next message
Nirmal SasidharanFriend
Messages: 120
Registered: July 2009
Location: Germany
Senior Member
Hello Goulwen,

Were you able to reproduce the problem? Are you planning a fix for this?

Regards,
Nirmal
Re: [EEF] EEF and Undo [message #651984 is a reply to message #651971] Wed, 02 February 2011 10:34 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Hi Nirmal,

I've fixed the problem but I'm always working on testing this version. I
hope giving you a version fixing this problem today.

Regards,

--
Goulwen

Le 02/02/2011 11:19, Nirmal Sasidharan a écrit :
> Hello Goulwen,
>
> Were you able to reproduce the problem? Are you planning a fix for this?
>
> Regards,
> Nirmal
Re: [EEF] EEF and Undo [message #652375 is a reply to message #651984] Thu, 03 February 2011 16:41 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Hi Nirmal,

We've just promoted a EEF 0.9.0RC1 version. Can you try the problem you
encountered last days with EEF :
http://download.eclipse.org/modeling/emft/eef/updates/milest ones/0.9

Beware, this version of EEF requires at least an Acceleo 3.0.2 :
http://download.eclipse.org/modeling/m2t/acceleo/updates/mil estones/3.0

Regards,

--
Goulwen Le Fur

Le 02/02/2011 11:34, Goulwen Le Fur a écrit :
> Hi Nirmal,
>
> I've fixed the problem but I'm always working on testing this version. I
> hope giving you a version fixing this problem today.
>
> Regards,
>
Re: [EEF] EEF and Undo [message #653060 is a reply to message #652375] Tue, 08 February 2011 10:18 Go to previous messageGo to next message
Nirmal SasidharanFriend
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 #653318 is a reply to message #653060] Wed, 09 February 2011 10:36 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Le 08/02/2011 11:18, Nirmal Sasidharan a écrit :
> Hello Goulwen,
>

Hello Nirmal,

> The latest nighly build fixes all the issues I was talking about. Thanks
> a lot.

Nice

> A slighly non-standard behaviour I see is that the dirty flag is not
> fired immediately, but only when focus is lost from the widget.

Yes it's the behaviour we defined to avoid flooding command stack.

> Is there a way to change this behaviour? Or is it for performance reasons that
> you have implemented it in this way?
>

There's no way to model another behaviour but in the EEF API, you can
use the
'StandardPropertiesEditionComponent.delayedFirePropertiesCha nge()'
method in order to implement a more 'standard' delayed behaviour

> Thanks again for your great work!
>

Regards,

--
Goulwen

> Regards,
> Nirmal
Re: [EEF] EEF and Undo [message #653378 is a reply to message #653318] Wed, 09 February 2011 15:19 Go to previous messageGo to next message
Nirmal SasidharanFriend
Messages: 120
Registered: July 2009
Location: Germany
Senior Member
Hello Goulwen,

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.

Could you please check this?

Regards,
Nirmal

Re: [EEF] EEF and Undo [message #654846 is a reply to message #653378] Thu, 17 February 2011 12:30 Go to previous messageGo to next message
Nirmal SasidharanFriend
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 #655085 is a reply to message #654846] Fri, 18 February 2011 09:19 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Le 17/02/2011 13:30, Nirmal Sasidharan a écrit :
> Hello Goulwen,
>
> Did you manage to check the Undo problem I reported last? Would be nice
> if you could give me a short update.
>

I thought that all the problem we're fixed. Can you re-explains the
problem ?

> 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 is updates its viewers and shows the updated
> content. The wizard dialogs however reflect the changes only when they
> are closed and opened again.
>


I'm not sure that is the expected behaviour. Wizards are opened in
"Batch" mode. It means that

> 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.
>

I don't reproduce this bug. I tried this case on the EEF Conference
Sample metamodel and it works well in this context.

Can you give me more hints to understand your problem ?


> Could you please check these issues as well?
>
> Thanks and regards,
> Nirmal


--
Goulwen
Re: [EEF] EEF and Undo [message #655106 is a reply to message #654846] Fri, 18 February 2011 10:54 Go to previous message
Nirmal SasidharanFriend
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

Previous Topic:[EEF] Caching model artifacts?
Next Topic:[Texo] documentation fields
Goto Forum:
  


Current Time: Tue Oct 20 06:50:11 GMT 2020

Powered by FUDForum. Page generated in 0.11223 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top