Questions tagged [eclipse-emf]

Use this tag for questions about the Eclipse Modeling Framework Project (EMF)

The Eclipse EMF project is a modeling framework and code generation facility for building tools and other applications based on a structured data model. From a model specification described in XMI, EMF provides tools and runtime support to produce a set of Java classes for the model, along with a set of adapter classes that enable viewing and command-based editing of the model, and a basic editor.

http://www.eclipse.org/modeling/emf/

489 questions
4
votes
2 answers

Can derived attributes be persisted and derivation disabled in Ecore and OCL?

I want to port a legacy data format, which consists of concepts similar to Eclipse Modeling Framework (EMF) Ecore: Elements with Parameters which have different datatypes and default values. A custom-made tool lets you edit such model instances by a…
Hauke
  • 134
  • 10
4
votes
5 answers

Why use a factory instead of 'new'?

I am reading the book EMF: Eclipse Modeling Framework where its stated: The EMF programming model strongly encourages, but doesn’t require, the use of factories for creating objects. Instead of simply using the new operator to create [an…
Pétur Ingi Egilsson
  • 4,368
  • 5
  • 44
  • 72
4
votes
2 answers

EMF/GMF/Papyrus - Set excplicit an ElementImpl - Property out of code

I have an EMF-model and the generated editor. In the model/editor, it is possible to connect Element "Unit"(U) with "Specification"(S). Now, I want to have a specialized CSS-style for S if at least one U satisfies S. But (to the best of my…
Shounbourgh
  • 258
  • 2
  • 14
4
votes
2 answers

What parameters should be used for AbstractDeclarativeValidator.warning and error?

I have a working grammar on xtext, and am starting the validation of the code. For this, I added a method in the validator xtext created for me. Of course, when an expression isn't valid, I want to be able to give a warning on the given AST node. I…
Clement Bellot
  • 841
  • 1
  • 7
  • 19
4
votes
1 answer

How to export Xcore to Ecore?

Defining metamodels with Xcore is a lot easier than with EMF and Ecore. The problem is that I need the metamodels as Ecore files. Is it possible to export Xcore model to Ecore model? I don't see any export options in Eclipse.
aphex
  • 3,372
  • 2
  • 28
  • 56
4
votes
0 answers

EMF Validation: What is the proper way?

We are currently using EMF Validation to provide direct feedback to the user in case of model constraint violation. The system is set up as follows: An EContentAdapter records all modifications done on the model A CommandStackListener pushes these…
parasietje
  • 1,529
  • 8
  • 36
3
votes
1 answer

Generate method returning EMF Unmodifiable list

I am using EMF through annotated Java code as following /** * Adds the given type to this filter. Has no effect if the given type * already belongs to this filter. * * @param type * the type to add * @model */ public void…
Manuel Selva
  • 18,554
  • 22
  • 89
  • 134
3
votes
0 answers

opening a SysML model created via TopCased in Papyrus

I have a SysML model created with TopCased. I want to create a new Papyrus project starting from such a SysML model. Is there any way to achieve this?
Andrea Sindico
  • 7,358
  • 6
  • 47
  • 84
3
votes
1 answer

how to use web service using EMF classes?

I want to create a web service by using classes created by EMF, as those classes are not in standard bean format, is there any wrapper or some tool available to create web service?
cbz
  • 265
  • 1
  • 6
  • 15
3
votes
1 answer

Reference Ecore model path of a different Ecore model

Here is my problem> We currently have several Ecore models for our applications. One of the Ecore models (mainModel.ecore) has stuff that is common in all the rest of the models. So, what i want to do is have all the other models reference the…
prolink007
  • 33,872
  • 24
  • 117
  • 185
3
votes
1 answer

Transform java.net.URI to org.eclipse.emf.common.util.URI

There are at least two types of URIs in Java: java.net.URI org.eclipse.emf.common.util.URI I have java.net.URI and need to use the EMF URI. How can I convert the former to the latter? If I try new URI uri = profileUrl.toURI() I will get a message…
Martin
  • 65
  • 2
  • 4
3
votes
1 answer

How to design a Eclipse RCP (Client/Server) using EMF for the model?

We are planing a project where we will have an eclipse based client communicating with an glassfish server (+ Oracle database). The business logic will reside on the server, the client should act more or less as an view. We consider using EMF for…
Arne Deutsch
  • 14,629
  • 5
  • 53
  • 72
3
votes
2 answers

Ecore, genmodel and OCL

I am defining the meta model of a domain specific modeling language by means of Ecore in EMF. I therefore generate an editor from the related genmodel I can use to create models conform to the meta-model. I would like to specify some OCL constraint…
Andrea Sindico
  • 7,358
  • 6
  • 47
  • 84
3
votes
2 answers

EMF generate non-Java Code

Is there a way to generate from a ECore model code that is not Java? I have a meta-model that represent a html layout (forms, inputs, buttons) and I want to generate the html. How can I do this? What other tools must I use? A link to a tutorial…
AdrianS
  • 1,980
  • 7
  • 33
  • 51
3
votes
2 answers

How can I create a reference to existing model objects?

I'm new to MDSD/EMF but am making great progress thanks to Eclipse's support. I created a toy model as answered yesterday as awynne suggested, and I'm very close. I'm only using EMF and its generated tree editor. Here's a summary of my EMF…
Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246