emf

regenerate ecore after schema changes

Hello, I have a schema in xsd file. once in a while a new version of the schema is created, and I need to update my .ecore (and .genmodel). How do I update them, without deleting them and re-generate them. I have made some manual modification to the ecore, and i want to keep this modifications. Ido. ...

How can i invoke the EMF Generator headless using a workspace outside the eclipse installation?

Hello! I am trying to generate the edit and the editor code of a EMF Genmodel using a batch file and the headless command. Here is my batch code: cd\ cd C:\eclipse eclipsec -noSplash -data "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK" -application org.eclipse.emf.codegen.ecore.Generator -edit -editor foo.ba...

EMF ecore and xsd out of sync, how to resolve ?

Hi there, My application is using a model base on an xsd that have been converted to an ecore before generation of the java classes. One of my team member modified the .ecore metamodel in a previous version ,one attribute that used to be generated. He modified the attribute name but not the Extended MetaData specifying the element name ...

EMF (Eclipse Modeling Framework) in C#

Hi, I worked with Eclipse EMF in the past Now I am working in C# to create a tool that needs extensive modeling to capture its metadata, logic, persistance etc. What is the equivalent in C#? The idea in EMF is that you define your model in UML, then generate the code. The generated code knows how to persist/load itself, expose its met...

How to resolve AssertionFailedException

Hopefully someone can point me in the right direction. I'm trying to create a CellEditor in Eclipse and when I click on the field I get an Unhandled event loop exception with the stack trace below. The cell editor code for this column looks like this /** Cell Editor Row 2 **/ textEditor = new TextCellEditor(table); ((Text)textEditor....

Eclipse Modelling Framework (EMF): How to get the DomainModel from a Magicdraw UML2 Export

Hi, I want to use the EMF for Code Generation, so I wrote some methods to load my UML2 File which I generated myself. This works fine with the following code: protected void registerResources() { resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); resourceSet.getResourceFactoryRegistry().getExtensio...

EMF with forced antialiasing

Hello, Our program needs to generate vector graphics, and we chose EMF for that. However, it seems that other programs render these images non-antialiased. I found that SVG format does have a flag to indicate that some/all objects should be antialiased. Is there any kind of flag or command inside the EMF format to indicate that we want...

What Query/Path-Language is used for References in Ecore-derived XMI-Instances?

Assume that I have an Ecore-model containing a package and some classes that make reference to each other. If i create a "Dynamic Instance", Eclipse produces an XMI-file and I can instantiate some classes. Containment-relations are directly serialized to an XML-tree in the XMI (the children elements in the example). But if I instantiate ...

Specifying DPI of a GDI Device Context

I have an application that generates metafiles (EMFs). It uses the reference device (aka the screen) to render these metafiles, so the DPI of the metafile changes depending on what machine the code is running on. Let's say my code is intending to create a metafile that is 8.5 in x 11 in. Using my development workstation as a reference, ...

EnumerateMetafile() does not render embedded bitmap correctly on Windows XP

This phnomena statred when my PC downloaded "software distribution service 3.0". Is there a work around? Did Microsoft shut down the enumeratemetafile() method? ...

How to not write the DocumentRoot to the XML

Hi, I'm using EMF, and I created my ecore from XSD. I notice that the XML that are being saved by the editor have the element DocumentRoot, which is not part of my original XSD. Can I somehow not generate it, so it will not be in the XML files of the editor? Ido ...

generating code from EMF model

Hi I have created an EMF model with extension .system which will generate the code for my work. Now I can generate code using lauch codegen action from eclipse. But I want to generate the code by launching the codegen from a standalone program. How do I achieve this. Detail: I have created a plugin from EMF model and have inlcuded in...

Draw emf antialiased

Is there a way to draw an emf metafile (exported form a drawing tool) with antialiasing enabled? The tools I tried are not capable of exporting emf files antaliased so I wondered if I can turn it back on manually when drawing the emf in the OnPaint override of my Controls. If anyone can confirm that is technically possible to generate ...

Generate vector EMF/WMF (Windows Metafile) clipboard content from Qt 4.5

We are moving a large codebase from GDI to QPainter. One thing we used to get on Windows easily was the EMF clipboard format, which enabled customers to manipulate their pasted output in other programs (like Office) in a vector format. It's easy for us to produce bitmaps from Qt into EMF, but that really doesn't give us back the editabi...

Changes in ECORE are not reflected when saving Resource

Hello all, I'm using WSDL ecore together with XSD ecore to read and edit WSDL file. During my edit I need to remove a couple of XSD Types and Elements and replace them with the reference to the XML Schema stored eslwhere. I'm loading the WSDL and I can see everything inside using nice interfaces provided by WSDL ecore. I can also see ev...

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 initialize class org.eclipse.core.runtime.Platform java.lang.NoClassDefFoundError: Could not init...

Why eGet() in EMF returns Object rather than EObject?

I am working on some code using the EMF framework in Java, but it is really hard to use, e.g. I cannot implement OCL-like query API on top of EMF which would be type-safe. One of the reasons is that eGet() for a EStructuralFeature return just an Object, not EObject. So anything I would write must use much of null checking, type checking ...

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 data from database using ORM and generate XML. I need to do all of that using: EMF (no ...

DPI for EMF files

Do EMF files have a DPI that can be set? I have an application that allows saving an image in multiple formats (including EMF). I allow the user to specify the resolution/DPI for the image(s). However, I cannot find a way to do this for a MetaFile in C#. Is this possible or does EMF not have a DPI since it is a vector graphics format? ...

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 framework with everything hard-wired in static fields. Lately I came across Jetbrains' MPS...