Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Compile behaviour of OSGI DS annotation support
Compile behaviour of OSGI DS annotation support [message #1803416] Thu, 28 February 2019 10:05 Go to next message
Stefan Häusler is currently offline Stefan HäuslerFriend
Messages: 23
Registered: May 2013
Junior Member

since several years we are using OSGI Declarative services support for annotations inside Eclipse. First as a plugin installed to the IDE later when it was shipped by Eclipse Releases.

Since a while (dont know exactly since when, but we think it was not happening prio to Eclipse Neon), we are observing a changed behaviour in certain situations which hinders us a bit in our daily work.

Lets assume some @Reference set method input parameter class can not be found, then the DS plugin still seems to keep the XML file in sync with the code -> means it produces an invalid XML file (only shown with a warning).

Here it can be that the developer is even not responsible, its just happens when retrieving some changed artifacts from Target Platform or we switched to annother branch and the building process inside Eclipse shows issues temporarily.

Later when the build is finished it looks like that the DS XML file is not always made valid again.

In this case, the developer has to review exactly what he wants to commit and whether there is really some file which should not have been changed. This is already error prone when changes come all from his own. Sometimes, when the developer did a merge from trunk to branch, he may can not even distinguish where this change came from and will just commit.

So two questions:
- We think, the build behaviour of the DS annotation support changed since one of the latest eclipse versions. Are you aware of any changes and can elaborate whether this is true?
- How can it happen that sometimes the building process does not keep the XML file in sync (i can not make a real example here as it does seem to happen only in much more complex change scenarios, e.g. a switch between branches or target platform update).

Thanks in advance for your help,
Re: Compile behaviour of OSGI DS annotation support [message #1804802 is a reply to message #1803416] Mon, 01 April 2019 13:20 Go to previous message
Peter Nehrer is currently offline Peter NehrerFriend
Messages: 241
Registered: July 2009
Senior Member
Hi Stefan,

I tried to reply to your email separately but it bounced.

Please open a Bugzilla report describing the observed behavior -- I understand it's difficult to reproduce.

In short, PDE tries to generate the component XML on a best-effort basis. If some of the references cannot be resolved, then it uses the unresolved class name.

Normally, the XML should re-generate when the classpath changes and references become resolved. I'm not quite sure what would lead to not re-generating the XML file but will try to think of additional unit tests to exercise this scenario.

Previous Topic:Eclipse Application causing Desktop Heap allocation failure
Next Topic:How to unbind F2 key programatically in eclipse java plugin development
Goto Forum:

Current Time: Sat Jan 28 11:21:33 GMT 2023

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

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

Back to the top