Skip to main content



      Home
Home » Modeling » EMF » [XCore] XCore generates/adds .org.eclipse.jdt.core.external.folders in MANIFEST.MF(XCore generates/adds .org.eclipse.jdt.core.external.folders in MANIFEST.MF)
[XCore] XCore generates/adds .org.eclipse.jdt.core.external.folders in MANIFEST.MF [message #1729571] Fri, 15 April 2016 10:55 Go to next message
Eclipse UserFriend
Hi,

I have a strange situation and I am really stuck. We have a series of APP_CORE bundles with XCore meta-models. I created a EXTRA bundle with a new XCore model that makes use of the APP_CORE XCore meta-models. Everything works fine if we are in the same workspace. However, If we build APP_CORE bundles P2 repository and if we have a workspace with the EXTRA bundle only, I got a strange behaviour when the EXTRA meta-model is re-generated by XCore / EMF. Indeed, the EXTRA bundle MANIFEST.MF gets an additional dependency in the Require-Bundle section:
.org.eclipse.jdt.core.external.folders;visibility:=reexport,

A little note, some APP_CORE bundles contain JET templates and use the following "Eclipse-BundleShape: dir" directive in their MANIFEST.MF

Any idea?

Thanks Wink
Re: [XCore] XCore generates/adds .org.eclipse.jdt.core.external.folders in MANIFEST.MF [message #1729590 is a reply to message #1729571] Fri, 15 April 2016 12:38 Go to previous messageGo to next message
Eclipse UserFriend
Regent,

Comments below.


On 15.04.2016 16:55, Regent LArcheveque wrote:
> Hi,
> I have a strange situation and I am really stuck. We have a series of
> APP_CORE bundles with XCore meta-models. I created a EXTRA bundle
> with a new XCore model that makes use of the APP_CORE XCore
> meta-models. Everything works fine if we are in the same workspace.
> However, If we build APP_CORE bundles P2 repository and if we have a
> workspace with the EXTRA bundle only, I got a strange behaviour when
> the EXTRA meta-model is re-generated by XCore / EMF.
So the dependencies are in the target platform in this case, not in the
workspace. There's no self hosting involved? How is the target
platform populated?
> Indeed, the EXTRA bundle MANIFEST.MF gets an additional dependency in
> the Require-Bundle section:
> org.eclipse.jdt.core.external.folders;visibility:=reexport,
That sounds like the IDE of the special invisible project that JDT
creates to link in external jars and folders such that they are
logically part of the workspace. But it's hard to imagine how that
project dependencies is something that EMF uses in this case.
>
> A little note, some APP_CORE bundles contain JET templates and use the
> following "Eclipse-BundleShape: dir" directive in their MANIFEST.MF
I'm not sure what that means and I've never tried it. I'm not sure why
that's needed... Is the problem only reproducible in that case?

In the worst case, you can change the Update Classpath property of the
GenModel (via an annotation of course) to false, and then the
MANIFEST.MF won't be touched during regeneration.

Otherwise, I'll need all the steps/samples to reproduce the problem...
>
> Any idea?
>
> Thanks ;)
Re: [XCore] XCore generates/adds .org.eclipse.jdt.core.external.folders in MANIFEST.MF [message #1729592 is a reply to message #1729590] Fri, 15 April 2016 13:21 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Ed,
I finally found the problem. It is related to Eclipse-Shape: dir directive. This does not seem to be compatible with XCore/EMF. It is an instruction that indicates how to package the bundle (dir | jar). Once installed in <dir> mode, the bundle is installed under /plugins in directory format instead of <jar> format (jar is the default value). In our case, I needed to expand that bundle (that includes a EMF model) in directory format to have access to JET templates files and to properly generate EMF code using those custom templates. I was unable to access the template files when they were embedded in jar.

To resolve the problem, I split the bundles in two, one with the EMF models (jar mode) and the second with the JET templates (dir mode). Everything works now.

Have ever tried to generate EMF models using installed bundles (including EMF models) in <dir> mode? I could create an simple example to reproduce the problem.

Regent Wink
Re: [XCore] XCore generates/adds .org.eclipse.jdt.core.external.folders in MANIFEST.MF [message #1729620 is a reply to message #1729592] Sat, 16 April 2016 03:34 Go to previous messageGo to next message
Eclipse UserFriend
Regent,

No, I never tried that (though it's a little surprising that should go
wrong because a self-hosted launch has no-jarred plugins on the
classpath and that works okay). But I did try dynamic templates from
the classpath. I think platform:/plugin/... should work to locate such
things (regardless of whether it's in a jar or not) but it's been a long
time since I tried that...


On 15.04.2016 19:21, Regent LArcheveque wrote:
> Thanks Ed,
> I finally found the problem. It is related to Eclipse-Shape: dir
> directive. This does not seem to be compatible with XCore/EMF. It is
> an instruction that indicates how to package the bundle (dir | jar).
> Once installed in <dir> mode, the bundle is installed under /plugins
> in directory format instead of <jar> format (jar is the default
> value). In our case, I needed to expand that bundle (that includes a
> EMF model) in directory format to have access to JET templates files
> and to properly generate EMF code using those custom templates. I
> was unable to access the template files when they were embedded in jar.
> To resolve the problem, I split the bundles in two, one with the EMF
> models (jar mode) and the second with the JET templates (dir mode).
> Everything works now.
> Have ever tried to generate EMF models using installed bundles
> (including EMF models) in <dir> mode? I could create an simple
> example to reproduce the problem.
>
> Regent ;)
Re: [XCore] XCore generates/adds .org.eclipse.jdt.core.external.folders in MANIFEST.MF [message #1729743 is a reply to message #1729620] Mon, 18 April 2016 11:50 Go to previous message
Eclipse UserFriend
Yeah. I am a bit surprised too. That should not change the behaviour.
Previous Topic:[CDO] TimeoutRuntimeException in openChannel
Next Topic:[EMF Forms] Submit a form with enter key
Goto Forum:
  


Current Time: Tue Nov 04 09:30:44 EST 2025

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

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

Back to the top