Questions tagged [emf]

For questions about the Eclipse Modeling Framework (EMF) project. EMF is a modeling framework and code generation facility for building tools and other applications based on a structured data model.

Eclipse EMF site: https://eclipse.org/modeling/emf/

433 questions
10
votes
1 answer

Load EMF Model instance in XTend

I am building a code generator in XTend where I already have an input model and meta model. That is, I use ATL to generate the input model for my XTend code generator (as part of a transformation sequence to gradually lower the abstraction level,…
Marten Sytema
  • 1,906
  • 3
  • 21
  • 29
9
votes
1 answer

How to build EMOF models in IntelliJ and generate code from them?

What is the best way to build models in IntelliJ, in the style of Eclipse EMF ? Is there an equivalent of Eclipse EMF in IntelliJ ? And is there something that adheres to standards such as EMOF in the same way that EMF Ecore is aligned to it ? I…
Sergio
  • 8,532
  • 11
  • 52
  • 94
8
votes
3 answers

How to compare equality between EObject when they contained unordered EList?

I'm still a novice in EMF so maybe my question doesn't really make sense or I assume wrong things. I'm working on a model-driven project, so I defined an ecore metamodel and generated the associate code. Now I'm currently trying to make unit tests…
Simon Urli
  • 449
  • 1
  • 5
  • 12
7
votes
0 answers

Maven - Generate .genmodel and sources from .ecore

I'm currently trying to build my project with Maven. The problem arises with EMF when I try to generate the sources. I did a lot of research on how to trigger the build process so that the sources are generated when already the .genmodel is…
Arikae
  • 71
  • 1
6
votes
1 answer

How to define a map in Xcore

According to the EMF FAQ, it is possible to create a Map in EMF: An EMap is basically a List of java.util.Map$Entry instances. Therefore to create a Map you need to first model your map entry by following these steps: Create an EClass with the…
Gabor Szarnyas
  • 4,410
  • 3
  • 18
  • 42
6
votes
1 answer

How to open a Property from an EMF element in Eclipse in an Editor?

I am developing an EMF-model and an UI with different views. I also use the generated Editor from EMF. Every element has different properties, which can be shown in the Properties-View. But especially when writing much text (f.e. description for an…
Berschi
  • 2,605
  • 8
  • 36
  • 51
6
votes
1 answer

Saving an EMF Model

I m new to EMF and trying to save an EMF Model as Follows:- public void saveData(File file, Device device) throws IOException { final ResourceSet resourceSet = new ResourceSetImpl(); // Use XMI resource …
Manas Pratim Chamuah
  • 1,527
  • 2
  • 15
  • 33
5
votes
0 answers

Java EMF DataBinding EOperation

I need to bind the value returned by a certain EOperation that I've defined in my model. Usually I perform databind using FeaturePath and Literals, but I've always done that with attributes, never with EOperation. How can I do that?
Carlo Pane
  • 193
  • 2
  • 12
5
votes
1 answer

Eclipse Texo ModelEMFConverter and Hibernate proxies

I'm trying to integrate Eclipse Texo into my existing Hibernate project. I have modeled my domain model in ECore and generated both EMF and POJO code from there using Texo and the regular EMF code generation. Fetching entities (POJOs) stored in the…
AdrianoKF
  • 2,891
  • 1
  • 25
  • 31
5
votes
1 answer

Eclipse EMF: Customize XML deserialization so old project can be loaded into modified model

Situation I have an Eclipse RCP application that manages application projects within an EMF model. These projects are saved by serializing them to the XMI format. Such files can then be loaded back into the model. I use the standard EMF tools (such…
tbacker
  • 772
  • 7
  • 22
5
votes
1 answer

Is it possible to have an enumeration in a EMF Ecore model implement an interface?

Is it possible to have an enumeration in a EMF Ecore model implement an interface ? It is possible in Java to have something like : public enum MyEnum implements MyInterface. I'd like to be able to generate something like this via EMF (btw, It seems…
Autar
  • 1,589
  • 2
  • 25
  • 36
5
votes
1 answer

How to access certain EStructuralFeatures of an EMF Model?

I know that there are ways to access an EAttribute of an Eclipse EMF model by its featureID or by its name via different indirect approaches. For that I found the following: Eclipse EMF: How to get access EAttribute by name? But what if I don't know…
DanglingElse
  • 243
  • 5
  • 12
5
votes
1 answer

EMF Eclipse: enumeration with custom fields (properties)

Ok, so in Java this is possible: import org.eclipse.emf.common.util.Enumerator; public enum MyEnum implements Enumerator { LITERAL1(0, "Name", "Literal", "custom1", "custom2", "custom3"), LITERAL2(0, "Name", "Literal", "custom1", "custom2",…
testuser
  • 952
  • 4
  • 17
  • 34
5
votes
4 answers

Eclipse: Getting null display

I am trying to pop up a dialog (i.e. a FileDialog) in an Eclipse Plugin, actually before of an Acceleo transformation I am running through the related UI Launcher project (http://lowcoupling.com/post/51877317162/the-acceleo-ui-launcher-project) I…
lowcoupling
  • 2,151
  • 6
  • 35
  • 53
5
votes
3 answers

Override the value of an attribute in a derived Ecore-class (EMF)

I'm aware of the fact that I cannot override or redefine attributes as a whole in an ecore-based model when it comes to inheritance. But can I somehow assign a new value to an existing, inherited attribute? E.g. Class A defines the attribute name…
cara
  • 1,012
  • 1
  • 9
  • 15
1
2 3
28 29