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

Java, EMF + OCL Diagnotician can't handle duplicate id

i have an EMF model where some objects contain IDs, and others don't. The id attribute is configured like this: I use the java Diagnostician to check if any of the OCL Constraints are violated: protected Diagnostic validateModel(EObject modelRoot)…
Simon Eismann
  • 273
  • 1
  • 5
  • 17
3
votes
1 answer

Run as Eclipse Application

I am following an Eclipse Modeling Framework tutorial (and also this one). At one of the steps, I need to run a project (the .editor project according to the tutorial) by right clicking on it and selecting Run As -> Eclipse Application. But there is…
user3399000
  • 353
  • 3
  • 18
3
votes
0 answers

Create UML Class Diagrams from Code Using EMF in eclipse

My question is how do generate UML Class Diagrams from a source code using EMF in eclipse? I'm working on a project and I need this. the code is writing in PHP. and java
user7507
  • 31
  • 1
3
votes
1 answer

Xtext (DSL file) to Ecore

I have an Xtext project and a couple of sample DSL files. I can open these files with "Sample Ecore Model Editor" and validate that it conforms to the metamodel generated by Xtext. However, I cannot create an "EMF Project" or an "EMF Generator…
Pavlos
  • 73
  • 1
  • 7
3
votes
1 answer

How to integrate emf compare with eclispe team support

I'm using Emf Compare 2 to integrate with team support from eclipse. I follow the instruction from emf compare faq page here but it appears that the content-type id "org.eclipse.emf.compare.ui.contenttype.ModelContentType" is no longer valid.…
wakandan
  • 1,099
  • 4
  • 19
  • 27
3
votes
1 answer

Eclipse RCP: How to manage user access permissions to resources?

Is there a way in Eclipse ecosystem to manage access permissions to resources? I need something like Linux filesystem permissions to allow/deny access to data in my Eclipse RCP application. I.e.: User and group management Login…
Marco Carnazzo
  • 782
  • 2
  • 6
  • 25
3
votes
1 answer

Exception loading EMF file

When I try to load an EMF file I get the following error: Exception thrown: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'blah/blah' not found. (file:/C:/Temp/OPDiag1/blah1.opmeta, 2, 124) The code I am using…
Eyal H
  • 991
  • 5
  • 22
3
votes
1 answer

Notifications for volatile attributes in EMF

In an Ecore model with an attribute that is declared as transient and volatile (its value is calculated from several other fields), is there a canonical way to generate notifications for changes to this field (i.e. when one of the fields that the…
pmf
  • 7,619
  • 4
  • 47
  • 77
3
votes
1 answer

Accessing Xtext's runtime EMF model

I created a DSL via Xtext and now I need to transform the models created in the editor into another model(s). I suppose the most straightforward way is to employ some kind of M2M transformation framework, but i need to access the model behind the…
yeti
  • 144
  • 7
2
votes
2 answers

Is it possible to model operation parameters as vararg in Eclipse/EMF?

I'm trying to find a way to model an operation with a vararg input parameter. The model should generate an interface as shown below. /** * ... * @generated */ public interface Content extends EObject { /** * ... * @generated …
KayleeTheMech
  • 489
  • 1
  • 4
  • 17
2
votes
0 answers

Can't generate Diagram Editor in Eclipse

This is an image of Eclipse GMF: a graphical editor for EMF models: When I click 'Generate Diagram Editor' the problem occurs: An internal error occurred during: "Execute Templates". …
Hansa Tharuka
  • 137
  • 1
  • 5
2
votes
2 answers

Xtext - Multiline String like in YAML

I'm trying to model a YAML-like DSL in Xtext. In this DSL, I need some Multiline String as in YAML. description: | Line 1 line 2 ... My first try was this: terminal BEGIN: 'synthetic:BEGIN'; // increase indentation terminal END: …
2
votes
3 answers

Model as Backend

first of all: I'm new to the EMF world. I worked through the Book "Model driven software engineering in practice" and now I want to apply this in a project: I "meta modelled" my Project and implemented some OCL Constraints, which is therefore like…
Laureeens
  • 23
  • 5
2
votes
2 answers

How to generate private/protected methods & variables using EMF?

I wish to generate Java code using genmodel based on a UML model. I am working on Eclipse Oxygen, UML model from Papyrus (with some usage of the Ecore profile) in order to generate the Ecore using GenModel wizard to finally generate the model Java…
2
votes
1 answer

"Package with uri 'null' not found" while loading XML file using EMF

I am trying to load an XML file using EMF and I am using the following code to do that in XMLArtefactAdapter.java: constructor(): ResourceSet set = new ResourceSetImpl(); //registering factory set.getResourceFactoryRegistry() …
Srijani Ghosh
  • 3,935
  • 7
  • 37
  • 68
1 2
3
28 29