Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » pb when selecting the root packages for the EMF project creation
pb when selecting the root packages for the EMF project creation [message #600312] Wed, 27 December 2006 14:14
Eclipse UserFriend
Originally posted by: TRostren.mia-software.com

Hi,

I try to create an EMF project with this Ecore metamodel.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI 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">
<ecore:EPackage name="PrimitiveTypes">
<eClassifiers xsi:type="ecore:EDataType" name="Integer"
instanceClassName="int"/>
<eClassifiers xsi:type="ecore:EDataType" name="String"
instanceClassName="java.lang.String"/>
<eClassifiers xsi:type="ecore:EDataType" name="Boolean"
instanceClassName="boolean"/>
<eClassifiers xsi:type="ecore:EDataType" name="Double"
instanceClassName="double"/>
</ecore:EPackage>
<ecore:EPackage name="RelationalDBSchema" nsURI="RelationalDBSchema"
nsPrefix="">
<eClassifiers xsi:type="ecore:EClass" name="NamedElement"
abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
ordered="false"
unique="false" lowerBound="1" eType="#/0/String"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DataBase"
eSuperTypes="#/1/NamedElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="SGBDname"
ordered="false"
unique="false" lowerBound="1" eType="#/0/String"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="tables"
ordered="false"
upperBound="-1" eType="#/1/Table" containment="true"
eOpposite="#/1/Table/database"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Table"
eSuperTypes="#/1/NamedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="database"
ordered="false"
lowerBound="1" eType="#/1/DataBase"
eOpposite="#/1/DataBase/tables"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="columns"
upperBound="-1"
eType="#/1/Column" containment="true"
eOpposite="#/1/Column/owner"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="key"
ordered="false"
upperBound="-1" eType="#/1/Column" eOpposite="#/1/Column/keyOf"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Column"
eSuperTypes="#/1/NamedElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="dataType"
ordered="false"
unique="false" lowerBound="1" eType="#/0/String"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="null"
ordered="false"
unique="false" lowerBound="1" eType="#/0/Boolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultValue"
ordered="false"
unique="false" lowerBound="1" eType="#/0/String"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="owner"
ordered="false"
lowerBound="1" eType="#/1/Table" eOpposite="#/1/Table/columns"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="keyOf"
ordered="false"
eType="#/1/Table" eOpposite="#/1/Table/key"/>
</eClassifiers>
</ecore:EPackage>
</xmi:XMI>


the problem comes when i need to choose the root package. I can only
select the first one. If i select the second one, an error occurs. The
logs are below :

!ENTRY org.eclipse.jface 4 2 2006-12-27 10:37:02.266
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at
org.eclipse.emf.converter.util.ConverterUtil.computeRequired Packages(ConverterUtil.java:392)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rPackagePage.validate(ModelConverterPackagePage.java:829)
at
org.eclipse.emf.importer.ui.contribution.base.ModelImporterP ackagePage.validate(ModelImporterPackagePage.java:95)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rPackagePage.ePackageCheckStateChanged(ModelConverterPackage Page.java:452)
at
org.eclipse.emf.converter.ui.contribution.base.ModelConverte rPackagePage$4.checkStateChanged(ModelConverterPackagePage.j ava:274)
at
org.eclipse.jface.viewers.CheckboxTableViewer$1.run(Checkbox TableViewer.java:177)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
...

If I only select the first package, the project is generated but in the
genmodel file, there is only the first package.

I have tested with Eclipse 3.2.1 and EMF 2.2.1.

Regards,

Tony ROSTREN
Previous Topic:Teneo: Objects are not added to resource.contents if fetch="subselect" for collection
Next Topic:pb when selecting the root packages for the EMF project creation
Goto Forum:
  


Current Time: Thu Apr 25 22:32:05 GMT 2024

Powered by FUDForum. Page generated in 0.02950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top