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
5
votes
2 answers

How to merge EMF models programmatically in Java?

Is there a way to combine multiple Ecore models (2 or more) in a single Ecore model programmatically in Java? With all models conform to the same metamodel. In: Model1 conforming to metamodelX Model2 conforming to metamodelX model3 conforming to…
bnjuly
  • 51
  • 1
  • 2
5
votes
3 answers

How can I traverse the EMF object tree generated by Xtext?

I'm using Xtext to define my DSL. Xtext generates a parser that lets me traverse the EMF model of my input DSL. I'd like to translate this EMF model into some other tree. To do this translation, I need to traverse the tree. But, I couldn't find a…
reprogrammer
  • 14,298
  • 16
  • 57
  • 93
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

JARS necessary to distribute Eclipse EMF based library?

I'm working with a library (MDHT from OpenHealthTools) to parse CDA XML. It relies on parts of Eclipse and the EMF plugin for Eclipse to do its thing. I've addressed most of the dependencies, but I'm still running into this error: Could not…
Freiheit
  • 8,408
  • 6
  • 59
  • 101
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
3 answers

Loading XML without given namespace as EMF Model: "Package with uri 'null' not found" - Exception

I have a XSD-File, which I transformed into an ecore-model and from where I generated model code. Now i would like to load a xml-file for that schema, but keep getting the error: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri…
Martin Böschen
  • 1,707
  • 15
  • 22
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
5
votes
1 answer

Eclipse EMF: How to get access EAttribute by name?

I have a Java method that is passed a String and an EMF EObject. The String is meant to be the name of an attribute of the EObject. For example, if it were passed "foo" and EObject eobj, it would need to access eobj.getFoo(). I know how to get the…
Leonide
  • 235
  • 3
  • 11
5
votes
1 answer

How to set enum reference with default value = null in ecore and gen model?

I have an Eclass Vehicle which has an enum attribute BreakType breakType. BreakType is defined in the same Ecore model as: BreakType{ DRUM(0), DISC(1), BLADE(2) } I want to set attribute breakType default to null. for that I set following…
roul ze
  • 133
  • 1
  • 9
4
votes
2 answers

How to solve ERROR Mwe2Launcher: Couldn't find EClass for name

I created a Xpand generator. In its src/ folder I've defined my model My.nn a template and a workflow. This is how my workflow.mwe2 file looks like: module workflow.NeuralNetworksGenerator import org.eclipse.emf.mwe.utils.* var targetDir =…
deedee
  • 311
  • 1
  • 3
  • 8
4
votes
1 answer

"Registered factory needed" exception when loading resource

I get the following exception: java.lang.RuntimeException: Cannot create a resource for 'file:/home/my_conf.xml'; a registered resource factory is needed The "explosion" code is like this and stops at: resource = resourceSet..... ResourceSet…
paul
  • 41
  • 1
  • 2
4
votes
2 answers

integrate EMF generated java classes into an Android project

I would like to know if I can include a set of classes generated from an EMF (ecore) model into an Android project. I am trying to do this, it compiles fine, but in run-time I get errors like the following ones: 06-07 11:37:04.261:…
pedromateo
  • 2,965
  • 1
  • 18
  • 19
4
votes
1 answer

Multilevel Master/Detail Databinding with EMF and RCP

I made a model with EMF, representing the settings of a device, and a RCP GUI. In the GUI I have a list to select different devices of the type of the model (Master). The model has a List of Objects of a small class which should be displayed in a…
MatF
  • 1,728
  • 2
  • 14
  • 31
4
votes
1 answer

How to generate EMF models with Java code

I want to generate EMF models with Java code. For example, I want to create a new Ecore Modeling Project, and the build a simple model as seen as in many Tutorials (i.e. like the vogella tutorial). But I don't want to do that by hand, using the GUI.…
4
votes
3 answers

Java with EMF & RCP vs C#

We're thinking about switching technology for our future projects going from C++ to Java or C#. So naturally there's a big discussion going on right now what to choose. The problem is that none of us has industry experience with EMF or RCP, which…
manni
  • 319
  • 3
  • 14
1 2
3
32 33