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
55
votes
3 answers

What are the main differences between Jetbrains' MPS and Eclipse Xtext?

I have used Eclipse Xtext in several projects. I loved the ease of defining a grammar over an Ecore (meta)model and letting everything generated for you including awesome Eclipse plugin editor, but I was quite uncomfortable with the underlying EMF…
Karel Smutný
  • 1,100
  • 1
  • 9
  • 17
21
votes
1 answer

How to reuse menus in RCP application for Eclipse 4.2?

I'm using Eclipse 4.2 with compatibility layer to reuse existing part for my RCP application. I want to reuse New from File menu and Run menu in my RCP application, so for that I opens EMF editor for Eclipse and its look like this: But for New…
Sumit Singh
  • 15,743
  • 6
  • 59
  • 89
18
votes
4 answers

Why should I use EMF?

I've read some tutorials about EMF and I still wonder why I should use it. Until now, I was generating my POJOs from XSD schema + JXC, or by hand. As far as I understand EMF it can be useful to define some complex relationships between the classes…
Pierre
  • 34,472
  • 31
  • 113
  • 192
13
votes
2 answers

How to create a generic list with Eclipse EMF?

I want to create a class with Eclipse EMF that contains a List with String objects. I see that Ecore has an EList but I can't change the generic type of the list. Any idea how to do this?
Yves_T
  • 1,170
  • 2
  • 10
  • 16
11
votes
4 answers

How to convert XSD to Ecore (EMF)

What is the best way to convert .xsd-files into .ecore-files? Is there an Eclipse plugin for that?
Peter Lang
  • 54,264
  • 27
  • 148
  • 161
10
votes
2 answers

Register Ecore meta-model programmatically

I use a transformation engine to create an Ecore meta-model at runtime and I wonder how we can register that meta-model with EMF so that it can recognize the meta-model?
capint
  • 115
  • 1
  • 7
9
votes
1 answer

How to programmatically trigger validation of EMF model?

In an editor created with EMF, one can validate a model by right-clicking on any modeled element and choosing "Validate" from the context menu. I want to call this functionality programmatically. My use case is that I want to validate the model when…
ErikWittern
  • 1,083
  • 9
  • 13
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
2 answers

Can I reuse ECore models by importing them into other models?

I have multiple Ecore files for different purposes. I am now developing a tool which uses multiple models. Can I develop an ECore model which references other models? For example when I have A.Ecore and B.Ecore, how can I create a C.Ecore, in which…
mahonya
  • 9,247
  • 7
  • 39
  • 68
8
votes
1 answer

Where can I find a valid SVG XML Schema (for ecore generation)?

I tried importing the SVG XML Schema into EMF, to obtain the SVG metamodel in ecore. However, the import failed due to the schema not being valid: indeed, svg.xsd references XMLSchema.dtd, which itself references datatypes.dtd, which does not…
Luc Touraille
  • 79,925
  • 15
  • 92
  • 137
8
votes
5 answers

How to use EMF to read XML file?

EMF = Eclipse Modeling Framework I have to use EMF in one of my class projects. I am trying to understand how to use EMF to do the following: Read XML, Get the values into objects. Use ORM to persist the values in objects to database. - Done Get…
zengr
  • 38,346
  • 37
  • 130
  • 192
8
votes
3 answers

How do I create an EAttribute whose data type is not an EMF class?

Using EMF, I'd like to define an attribute whose data type (EType) is external to my EMF model. That is, the type I want is a normal hand-coded Java class that is not part of my EMF model. Using AnySimpleType is a last resort. I want more…
Michael Carman
  • 30,628
  • 10
  • 74
  • 122
8
votes
1 answer

EProxy URI does not resolve in ecore model

In my Ecore model all types that come from outside the current model are not resolved by their proxies. All fields of the object returned by getType() are null and only the storage type URI is filled in at runtime. Here is an extract of my…
allprog
  • 16,540
  • 9
  • 56
  • 97
8
votes
2 answers

XText programmatically parse a DSL script into an Ecore model

I need to programmatically turn a text conform to an XText grammar into an AST conform to an Ecore meta-model generated by XText from the same grammar. I know XText also generate the Java classes implementing such parser but I don't know either…
Andrea Sindico
  • 7,358
  • 6
  • 47
  • 84
7
votes
4 answers

Bidirectional M2M Transformations using Eclipse EMF

I would like to do bidirectional Model2Model transformations. Both models are EMF / eCore based. Actually I would prefer that one model is an editable view on the other. What are my options? Which tools and tranformation languages are avaiable and…
Stefan K.
  • 7,701
  • 6
  • 52
  • 64
1
2 3
32 33