Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Question wrt EMF Services
Question wrt EMF Services [message #1854474] Sat, 20 August 2022 22:38 Go to next message
Geoffry Roberts is currently offline Geoffry RobertsFriend
Messages: 16
Registered: May 2014
Junior Member
EMF has long been my goto modeling tool. I know it. I like it. I want to keep using it. But I now am faced with a need that could benefit from EMF Services i.e. EMF Validation and EMF Transaction. It appears, however, that these projects are not very active. Documentation is scant but there are new releases to be had.

Can anyone shed any light on the current condition of EMF Services? Is anyone using these services successfully?

Thanks
Re: Question wrt EMF Services [message #1854475 is a reply to message #1854474] Sun, 21 August 2022 00:06 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Geoffry,

I cannot comment on active development of these components. However, the EMF Transaction API is a core component of GMF-based applications such as Papyrus and others such as the EMF.Cloud Model Server. The main use case for the EMF Validation framework is transaction validation in EMF Transactions. As much as possible, you should let this framework delegate to the validation implemented in your model in the usual EMF way. I know of very few use cases outside of the original UML scenarios for which it was originally developed in which you would need the constraint provider capability of this framework.

HTH,
Christian
Re: Question wrt EMF Services [message #1854481 is a reply to message #1854475] Sun, 21 August 2022 18:47 Go to previous messageGo to next message
Geoffry Roberts is currently offline Geoffry RobertsFriend
Messages: 16
Registered: May 2014
Junior Member
Thanks Christian I appreciate the response.

If EMF Transaction is alive and well I'll take that as a positive indicator.

I am looking to use my EMF models headless and handling updates from various processes hence I have an interest in thread safety and all things concurrent. Query of an EMF model is also a need.

Also, your comment on validation is appreciated. Seems I'll have to figure a way of specifying validations either into XSD or ecore. I am not sure about modifying ecore. It'll be a learning experience.

If anyone else can offer any insight, I shall thank you for it.
Re: Question wrt EMF Services [message #1854490 is a reply to message #1854481] Mon, 22 August 2022 07:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

EMFt as such is dead. EMFq, EMFt and EMFv were amalgamated as EMF Services. EMF Services is likely to keep going subject to minimal maintenance. (Enthusiastic new committers no doubt welcome.)

If you are interested in Ecore validation, then you should look at OCLinEcore [1] that exploits the EMF Delegates capabilities that renders much of EMFq and EMFv substantially obsolete. With OCLinEcore you have a friendly syntax checking Xtext editor for OCL rather than an XML notepad. You might also consider Xcore.

Regards

Ed Willink

[1] https://wiki.eclipse.org/OCL/OCLinEcore
Re: Question wrt EMF Services [message #1854493 is a reply to message #1854490] Mon, 22 August 2022 12:41 Go to previous messageGo to next message
Geoffry Roberts is currently offline Geoffry RobertsFriend
Messages: 16
Registered: May 2014
Junior Member
Thanks Ed, I needed to know what was up with the whole EMF Services business.

You mention OCLinEcore; I'll be looking into it.

At first glance it would appear that EMF Deligates et. al. is closely tied to the eclipse UI. My use case prohibits that. In my use case I have an *.ecore file(s) that were generated from XSD(s). To these, I need to add constraints. Said constraints are mostly cardinality settings but can also be attribute/reference removals. I have another EMF model that specifies these constraints. I need to write a process (headless) that reads the constraint model, and updates the ecore then generate from that.

I have used the ecore editor in eclipse. Q: Can I get programmatic access to ecore? I never tried that. Q: Can I generate programmatically from ecore? I never tried that but I think I can.

I also need to support round trip serialization/deserialization to and from XML, JSON and RDF. But that all is another matter.
Re: Question wrt EMF Services [message #1854495 is a reply to message #1854493] Mon, 22 August 2022 13:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33143
Registered: July 2009
Senior Member
In case you can edit the *.xsd with annotations, that's also possible:

https://www.eclipse.org/modeling/emf/docs/overviews/XMLSchemaToEcoreMapping.pdf

Yes, of course you can programmatically access Ecore. You might look at classes such as org.eclipse.xsd.ecore.XSDEcoreBuilder and org.eclipse.xsd.ecore.EcoreSchemaBuilder.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Question wrt EMF Services [message #1854498 is a reply to message #1854495] Mon, 22 August 2022 18:38 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

EMF Delegates like EMF is nothing to do with the Eclipse UI. While facilities like the EMF Editor need the UI, invoking e.g. eGet() can be performed standalone. EMF Delegates is the functionality behind e.g. eGet() that invokes an appropriate handler.

Behind the scenes OCLinEcore is just XML magic in the form of EAnnotations in an Ecore model. The OCLinEcore editor enables you to edit in a much more acceptable fashion than XML tweaking or Tree pigeon holing , so yes you need the IDE for an editor, but not for model execution.

Ditto: Java. It's hard to develop Java code without an IDE, but once built it can run without an IDE.

Regards

Ed Willink

[Updated on: Mon, 22 August 2022 18:43]

Report message to a moderator

Re: Question wrt EMF Services [message #1854555 is a reply to message #1854498] Thu, 25 August 2022 06:55 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi,

I am currently the only maintainer of EMF Services (Query/Validation/Transaction). I was not involved in their original developement, but we use them extensively in Sirius and other of our products at Obeo, so when the previous maintainers moved to other projects, we decided to take over their maintenance.
As a mere "user", I am not an expert on the internals of either EMF Validation or EMF Transaction, so I'm reluctant to make significant changes to their internals.
As far as I'm concerned, the functional scope of these components is "done". EMF Validation and Transaction have worked fine as they are for years (decades?) for a multitude of projects, and I don't plan to make significant changes to them.

My goal for these projects is only to make sure they continue to work reliably and stay compatible with the ecosystem: recent versions of Java, Eclipse Platform, Tycho, etc. For example I recently released EMF Validation 1.13.0 and 1.13.1 (https://github.com/eclipse/emf-validation/blob/master/RELEASE_NOTES.md) and EMF Transaction 1.13.0 (https://github.com/eclipse/emf-transaction/blob/master/RELEASE_NOTES.md) to make sure they are compatible with the upcoming Eclipse 2022-09.

I may merge the occasional bugfix or cleanup if I am confident enough it will not break existing users, but tend to be conservative here. Lots of existing projects depend on these components working in the way they have been for years, so even things that can look like "improvements" can have unintended consequences (https://www.hyrumslaw.com/).

The projects have moved to GitHub at https://github.com/eclipse/emf-query, https://github.com/eclipse/emf-validation and https://github.com/eclipse/emf-transaction. Contributions welcome, with the above caveat about being extra-careful.

Regarding EMF Query, I am not aware of any actual user (EMF Parsley has a dependency on it, but it does not seem to be actually used), so as mentioned on the project page (https://projects.eclipse.org/projects/modeling.emfservices) and on GitHub (https://github.com/eclipse/emf-query), this one is no longer maintained at all. I made one exception recently and released a version 1.12.1 to avoid the issue with ICU4J, but that's only because Parsley still depends on it, and I don't plan to ever make another release of it. Unless of course someone elses is interested and wants to get involved.

Regards,
Pierre-Charles David (Obeo)

PS: Sorry for the longish message, but I guess this thread is a good opportunity to clarify the status of these projects.
PS2: The story is mostly the same for GMF Notation & Runtime.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:[CDO] Prevent timeout of custom long-running CDOQuery
Next Topic:EMF Combo Box in GenericEditor
Goto Forum:
  


Current Time: Thu May 02 00:58:23 GMT 2024

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

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

Back to the top