eclipse-emf

java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook

ε祈祈猫儿з 提交于 2021-02-10 15:41:21
问题 I was getting this exception but I am not able to understand what is happening there. Because on compilation time my class able access apache POI classes but on runtime my classes throws exception that he is not able find org.apache.poi.xssf.usermodel.XSSFWorkbook . Till now whatever solution is provided on net I have tried everything but not understanding what I am missing. And weird thing is same code and same Apache POI library working on my friend's eclipse. We both have identical

java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook

百般思念 提交于 2021-02-10 15:40:13
问题 I was getting this exception but I am not able to understand what is happening there. Because on compilation time my class able access apache POI classes but on runtime my classes throws exception that he is not able find org.apache.poi.xssf.usermodel.XSSFWorkbook . Till now whatever solution is provided on net I have tried everything but not understanding what I am missing. And weird thing is same code and same Apache POI library working on my friend's eclipse. We both have identical

Enum data type in EMF

非 Y 不嫁゛ 提交于 2020-01-05 07:22:10
问题 How to get information about an attribute of enum type? I have an EClass with an attribute which is type of enum. I know you can use the following code to determine the type of an attribute EDataType type = attr.getEAttributeType(); if (type == EcorePackage.Literals.EINT); //do something if (type == EcorePackage.Literals.EENUM); // do something But the line ( type == EcorePackage.Literals.EENUM ) doesn't work, thus I am wondering how to determine an attribute is type of eEnum, given any Ecore

GEF + EMF: Why doesn't my editor remove the Figure for a removed object when refreshChildren() is called?

孤街浪徒 提交于 2020-01-04 14:17:05
问题 I have implemented a GEF editor for a graph-like EMF model, with a remove command for a certain type of node in the graph. I think I've done all the necessary steps in order to make this set up work (vainolo's blog has been a great help). However, when I'm deleting a model element, the view doesn't get refreshed , i.e., the figure for the model element isn't removed from the editor view, and I have no idea why. I'd be extremely grateful if somebody could have a look at my sources and point me

How to export Xcore to Ecore?

对着背影说爱祢 提交于 2020-01-02 05:47:10
问题 Defining metamodels with Xcore is a lot easier than with EMF and Ecore. The problem is that I need the metamodels as Ecore files. Is it possible to export Xcore model to Ecore model? I don't see any export options in Eclipse. 回答1: The official Wiki describes how to export an Xcore model to a GenModel. It looks like the same can be done with the Ecore Model. Especially because the author mentions: [...] Xcore resource does physically contain a GenModel and an Ecore model [...] 来源: https:/

Analyzing XML schemas using org.eclipse.xsd and Maven2

﹥>﹥吖頭↗ 提交于 2019-12-24 05:35:09
问题 I'm trying to implement the sample code to this article from 2002 (I know..), but cannot get the schema to load. import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.xsd.util.XSDResourceImpl; ResourceSet resourceSet = new ResourceSetImpl(); // I replaced the deprecated createDeviceURI with createURI as recommended in JavaDoc

Meshing Acceleo with Xtext

南笙酒味 提交于 2019-12-24 01:08:38
问题 I am in the middle of an Acceleo Transformation aimed at producing code (i.e. Java) from an input UML model. Some elements of this UML model (i.e. Activities Opaque actions) contain some text which is conform to an Xtext grammar and I'd like to get the equivalent AST Ecore representation in the Acceleo transformation. To this end I have developed a Java class with a method which takes as input a string, containing the DSL excerpt, and produces an Ecore model conform to it (see http://www

“Registered factory needed” exception when loading resource

六眼飞鱼酱① 提交于 2019-12-22 09:46:54
问题 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 resourceSet = new ResourceSetImpl(); Resource resource = null; File f = new File(filename); URI uri = URI.createFileURI(f.getAbsolutePath()); if (!f.exists()) { throw new Exception(filename + " does not exist"); } else { resource = resourceSet.getResource

Can derived attributes be persisted and derivation disabled in Ecore and OCL?

不问归期 提交于 2019-12-22 08:55:36
问题 I want to port a legacy data format, which consists of concepts similar to Eclipse Modeling Framework (EMF) Ecore: Elements with Parameters which have different datatypes and default values. A custom-made tool lets you edit such model instances by a fancy table-based GUI. Also, a common feature for the Parameters is that a Derivation Rule can be added which specifies that the Parameter value gets computed automatically from other parameters. That also seems similar to Ecore derived Attributes

EProxy URI does not resolve in ecore model

帅比萌擦擦* 提交于 2019-12-22 04:35:16
问题 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