eclipse-emf

EProxy URI does not resolve in ecore model

自古美人都是妖i 提交于 2019-12-05 03:09:35
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 model: <?xml version="1.0" encoding="UTF-8"?> <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http:///model.ecore" nsPrefix="model"> <eSubpackages name="general" nsURI="http:///model/general.ecore" nsPrefix="model

Create GMF diagram programmatically

只愿长相守 提交于 2019-12-04 23:17:11
I trying to create one simple diagram using EMF & GMF in Eclipse plug-ins. I have created one Ecore with two node & connection. I am able to generate GMF out of that. When I run my application I am getting the palate and with the help of that I am able to draw the GMF diagram. But I want that programmatically. I have created one XML out of that Ecore and successfully able to load that XML into the EMF object. So my EObject is having that XML values. Now I want a GMF diagram out of that automatically. like with the opening of one sample RCP view it should load the GMF content. The problem is

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

那年仲夏 提交于 2019-12-04 11:09:26
问题 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 type-safety (and less type casting) than using a generic Object provides. Eclipse's Properties editor restricts EType to a predefined set of values. I can neither enter my own class name nor find a way to add the class I want to the list of options. 回答1: You

How to reuse menus in RCP application for Eclipse 4.2?

时光毁灭记忆、已成空白 提交于 2019-12-04 09:13:19
问题 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 menu its showing something like this: org.eclipse.e4.model.application.... My application is look-like this (it is just the Java Script debugger with some extra features): So how I can reuse those menus in my RCP application? 回答1: I think I understand

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

☆樱花仙子☆ 提交于 2019-12-03 06:56:14
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 type-safety (and less type casting) than using a generic Object provides. Eclipse's Properties editor restricts EType to a predefined set of values. I can neither enter my own class name nor find a way to add the class I want to the list of options. You can add a data type to eCore models by manually adding an eClassifiers entry to the *.ecore file. (I was

reading the eobjects from the ecore file in eclipse

拟墨画扇 提交于 2019-12-02 22:52:54
问题 I have the ecore file which contains the class eobjects.Now i want to read that ecore file and get all the class eobjects from that ecore file. 回答1: Do you mean you want to reload your specific xmi file with a custom suffix? Here is an example of a method that loads an ecore file at a specific location (path) and returns your root EObject public static EObject loadYourModel(String path) { /*Initialzie Models*/ YourPackage.eINSTANCE.eClass(); /*register your xmi resources*/ final Resource

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

北战南征 提交于 2019-12-02 15:24:16
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 (Meta Programming System) . It's based on completely different philosophy. While Xtext is for creating text-based DSLs generating a parser for you (and instantiating those EObjects), in MPS-created language one edits directly underlying model structure. So far

MDA : Model Driven Architecture

孤街醉人 提交于 2019-12-01 12:57:38
Need a idea for developing very simple application demonstrating concepts of MDA. Alright, it is hard to find something analogous to a hello world in MDA world as MDA is geared on solving a bigger problem. The best way in my opinion to get started is to approach the below problem by "thinking in meta- model " In any real world application, there are certain artifacts that you require for any business entity to be persisted. Pick 2 such simple entities like Customer and Orders and generate all the corresponding artifacts across all the layers of any multi-tiered application (like ui,

How do I install an Eclipse EPP (for example EPP Modeling Feature on 3.8)?

倖福魔咒の 提交于 2019-11-30 16:51:37
How do I install an Eclipse EPP through the software installer for 3.8? I would like to choose the "EPP Modeling Feature" and install all of its packages rather than selecting them all individually. As an example if I install Eclipse Juno "Eclipse Modeling Tools" and then look at the installed software packages I will see "EPP Modeling Feature 1.5.0.20120620-0855 org.eclipse.epp.package.modeling.feature.group. If I then also install the base Eclipse 3.8 and choose "install new software" and turn off "group by category" I can find the EPPs. I can't install them however since they are written to

How to convert XSD to Ecore (EMF)

穿精又带淫゛_ 提交于 2019-11-30 13:50:03
What is the best way to convert .xsd -files into .ecore -files? Is there an Eclipse plugin for that? That's what worked for me: New -> Project... Eclipse Modeling Framework -> EMF Project Model Importers: XML Schema Model URIs : [Select xsd-File] To revalidate the .ecore-File when xsd has changed: Right-Click on .genmodel -File Reload... If you do not want to create a new MDT project every time you want to import a schema as ECore model then there is also another way to do this: New -> EMF Generator Model (in "Eclipse Modelling Framework") Press Next Select folder and specify filename (has to