Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF & Teneo] Generating Java Packages for Ecore Packages with only subpackages
[EMF & Teneo] Generating Java Packages for Ecore Packages with only subpackages [message #422888] Thu, 18 September 2008 00:48 Go to next message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
I just noticed that no Java EPackage classes get generated for ecore
packages that have no classes in it. I have a set of these which contain
sub packages only. These subpackages may contain classes though. I was
hoping that by having a heirarchy of ecore packages I could give just the
top level package to Teneo. Not sure if that would work anyway,
admittedly. Either way is there a way to turn on generation of packages in
this case.

Background
----------

I'm in the process of splitting a large ecore model into several smaller
ones.

The original came from an import from an XSD and has around 900 classes in
the one package. This is a pain to deal with as there is an overwhelming
number of classes in one package (the old needle in a haystack problem)
and the performance is close to unusable as every time I save a change
that affects the model eclipse locks up for around a minute with
'Synchronizing EMF resources'

I'm splitting it up using a simple class based on pattern matching on the
class name. It splits into a hierarchical model as follows:

- each ecore package has its own ecore file.
- the ecore file contains the package as its sole top level element
- the package contains all the classes at that level (if any) and any sub
packages.
- obviously it follows from point 1 that the sub packages are
effectively short cuts.

This means I still end up with a top ecore model where I can navigate the
whole model by following the short cuts of sub packages, but I can also
just open a child ecore model and work with that.

I had hoped at this point that I could just hand the top level package to
Teneo and have it navigate the whole model magically.

Unfortuantely, no Java packages (i.e. subtypes of EPackage) are being
created for packages that have no direct child classes.
Is there a way to turn this on?
Re: [EMF & Teneo] Generating Java Packages for Ecore Packages with only subpackages [message #422889 is a reply to message #422888] Thu, 18 September 2008 03:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000208070105040400010107
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Andrew,

This is
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856>

https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856

You could put a dummy EDataType in there so that it's not empty.


Andrew H wrote:
> I just noticed that no Java EPackage classes get generated for ecore
> packages that have no classes in it. I have a set of these which
> contain sub packages only. These subpackages may contain classes
> though. I was hoping that by having a heirarchy of ecore packages I
> could give just the top level package to Teneo. Not sure if that would
> work anyway, admittedly. Either way is there a way to turn on
> generation of packages in this case.
>
> Background
> ----------
>
> I'm in the process of splitting a large ecore model into several
> smaller ones.
> The original came from an import from an XSD and has around 900
> classes in the one package. This is a pain to deal with as there is an
> overwhelming number of classes in one package (the old needle in a
> haystack problem) and the performance is close to unusable as every
> time I save a change that affects the model eclipse locks up for
> around a minute with 'Synchronizing EMF resources'
>
> I'm splitting it up using a simple class based on pattern matching on
> the class name. It splits into a hierarchical model as follows:
>
> - each ecore package has its own ecore file.
> - the ecore file contains the package as its sole top level element
> - the package contains all the classes at that level (if any) and any
> sub packages.
> - obviously it follows from point 1 that the sub packages are
> effectively short cuts.
>
> This means I still end up with a top ecore model where I can navigate
> the whole model by following the short cuts of sub packages, but I can
> also just open a child ecore model and work with that.
>
> I had hoped at this point that I could just hand the top level package
> to Teneo and have it navigate the whole model magically.
>
> Unfortuantely, no Java packages (i.e. subtypes of EPackage) are being
> created for packages that have no direct child classes. Is there a way
> to turn this on?
>
>
>

--------------000208070105040400010107
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Andrew,<br>
<br>
This is<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856"><br>
</a>
<blockquote><a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856">https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856</a><br>
</blockquote>
You could put a dummy EDataType in there so that it's not empty.<br>
<br>
<br>
Andrew H wrote:
<blockquote
cite="mid:38363fa59e84b56c3a25aba95361c5f3$1@www.eclipse.org"
type="cite">I just noticed that no Java EPackage classes get generated
for ecore packages that have no classes in it. I have a set of these
which contain sub packages only. These subpackages may contain classes
though. I was hoping that by having a heirarchy of ecore packages I
could give just the top level package to Teneo. Not sure if that would
work anyway, admittedly. Either way is there a way to turn on
generation of packages in this case.
<br>
<br>
Background
<br>
----------
<br>
<br>
I'm in the process of splitting a large ecore model into several
smaller ones. <br>
The original came from an import from an XSD and has around 900 classes
in the one package. This is a pain to deal with as there is an
overwhelming number of classes in one package (the old needle in a
haystack problem) and the performance is close to unusable as every
time I save a change that affects the model eclipse locks up for around
a minute with 'Synchronizing EMF resources'
<br>
<br>
I'm splitting it up using a simple class based on pattern matching on
the class name. It splits into a hierarchical model as follows:
<br>
<br>
- each ecore package has its own ecore file.
<br>
- the ecore file contains the package as its sole top level element
<br>
- the package contains all the classes at that level (if any) and any
sub packages.
<br>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EMF & Teneo] Generating Java Packages for Ecore Packages with only subpacka [message #422929 is a reply to message #422889] Fri, 19 September 2008 01:11 Go to previous messageGo to next message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
OK thanks Ed. I've added a comment and my vote. I take it that this issue
is not a high priority given the date it was logged.

Ed Merks wrote:

> Andrew,

> This is
> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856>

> https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856

> You could put a dummy EDataType in there so that it's not empty.


> Andrew H wrote:
>> I just noticed that no Java EPackage classes get generated for ecore
>> packages that have no classes in it. I have a set of these which
>> contain sub packages only. These subpackages may contain classes
>> though. I was hoping that by having a heirarchy of ecore packages I
>> could give just the top level package to Teneo. Not sure if that would
>> work anyway, admittedly. Either way is there a way to turn on
>> generation of packages in this case.
>>
>> Background
>> ----------
>>
>> I'm in the process of splitting a large ecore model into several
>> smaller ones.
>> The original came from an import from an XSD and has around 900
>> classes in the one package. This is a pain to deal with as there is an
>> overwhelming number of classes in one package (the old needle in a
>> haystack problem) and the performance is close to unusable as every
>> time I save a change that affects the model eclipse locks up for
>> around a minute with 'Synchronizing EMF resources'
>>
>> I'm splitting it up using a simple class based on pattern matching on
>> the class name. It splits into a hierarchical model as follows:
>>
>> - each ecore package has its own ecore file.
>> - the ecore file contains the package as its sole top level element
>> - the package contains all the classes at that level (if any) and any
>> sub packages.
>> - obviously it follows from point 1 that the sub packages are
>> effectively short cuts.
>>
>> This means I still end up with a top ecore model where I can navigate
>> the whole model by following the short cuts of sub packages, but I can
>> also just open a child ecore model and work with that.
>>
>> I had hoped at this point that I could just hand the top level package
>> to Teneo and have it navigate the whole model magically.
>>
>> Unfortuantely, no Java packages (i.e. subtypes of EPackage) are being
>> created for packages that have no direct child classes. Is there a way
>> to turn this on?
>>
>>
>>
Re: [EMF & Teneo] Generating Java Packages for Ecore Packages with only subpacka [message #422960 is a reply to message #422929] Fri, 19 September 2008 16:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Andrew,

Yes, given the ~100 items on the wishlist, it's not percolated its way
onto the very limited work queue, particularly given that a dummy
EDataType is a pretty easy workaround...


Andrew H wrote:
> OK thanks Ed. I've added a comment and my vote. I take it that this
> issue is not a high priority given the date it was logged.
>
> Ed Merks wrote:
>
>> Andrew,
>
>> This is
>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856>
>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=142856
>
>> You could put a dummy EDataType in there so that it's not empty.
>
>
>> Andrew H wrote:
>>> I just noticed that no Java EPackage classes get generated for ecore
>>> packages that have no classes in it. I have a set of these which
>>> contain sub packages only. These subpackages may contain classes
>>> though. I was hoping that by having a heirarchy of ecore packages I
>>> could give just the top level package to Teneo. Not sure if that
>>> would work anyway, admittedly. Either way is there a way to turn on
>>> generation of packages in this case.
>>>
>>> Background
>>> ----------
>>>
>>> I'm in the process of splitting a large ecore model into several
>>> smaller ones.
>>> The original came from an import from an XSD and has around 900
>>> classes in the one package. This is a pain to deal with as there is
>>> an overwhelming number of classes in one package (the old needle in
>>> a haystack problem) and the performance is close to unusable as
>>> every time I save a change that affects the model eclipse locks up
>>> for around a minute with 'Synchronizing EMF resources'
>>>
>>> I'm splitting it up using a simple class based on pattern matching
>>> on the class name. It splits into a hierarchical model as follows:
>>>
>>> - each ecore package has its own ecore file.
>>> - the ecore file contains the package as its sole top level element
>>> - the package contains all the classes at that level (if any) and
>>> any sub packages.
>>> - obviously it follows from point 1 that the sub packages are
>>> effectively short cuts.
>>>
>>> This means I still end up with a top ecore model where I can
>>> navigate the whole model by following the short cuts of sub
>>> packages, but I can also just open a child ecore model and work with
>>> that.
>>>
>>> I had hoped at this point that I could just hand the top level
>>> package to Teneo and have it navigate the whole model magically.
>>>
>>> Unfortuantely, no Java packages (i.e. subtypes of EPackage) are
>>> being created for packages that have no direct child classes. Is
>>> there a way to turn this on?
>>>
>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Re: Problem with CDO/Teneo/Hibernate on Derby
Next Topic:Collections as return types of EOperations
Goto Forum:
  


Current Time: Thu Apr 25 06:41:06 GMT 2024

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

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

Back to the top