Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Possible bug in Target Platform handling
Possible bug in Target Platform handling [message #959462] Fri, 26 October 2012 18:42 Go to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 2360
Registered: July 2009
Senior Member
Eclipse 3.8 (although I've also seen this in earlier versions)

It seems that the target platform infrastructure has problems handling a TP that contains the same bundle in multiple locations. For example, my TP includes different directory locations for Eclipse 3.8 SDK, Orbit bundles, WTP 3.4.1, and the 3.8 Delta Pack. Setting this TP on my workspace causes problems resolving bundles that are present in more than one of those locations. For example, both the Delta Pack and SDK locations include the platform-specific SWT bundles and fragments. When the Delta Pack is included in the TP, even if I un-select the SWT bundles that are already in the SDK location, none of my projects can resolve any SWT classes (nor can I open SWT classes with Ctrl+Shift+T, nor do they show up in the Plugins view). This happens regardless of what bundles I actually have selected from the Delta Pack location, even if everything is un-selected.
If I totally remove the Delta Pack directory from my TP, then SWT can be resolved by my workspace code again.

This is only one example, I have the same problem with other bundles that are duplicated in more than one directory location in my TP - for example, org.apache.log4j is in both SDK 3.8 and WTP 3.4.1 - as soon as WTP is included in my TP, no workspace code can resolve log4j classes any more.

Is this a known problem/limitation? I've seen this going back several versions of PDE (at least back to Galileo) and with 3 different code bases and countless workspaces.
Any ideas on how to troubleshoot it and/or work around it?

Thanks,
Eric

[Updated on: Fri, 26 October 2012 18:44]

Report message to a moderator

Re: Possible bug in Target Platform handling [message #964854 is a reply to message #959462] Tue, 30 October 2012 21:08 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
Are the duplicated bundles of the exact same version? Are they singleton bundles?

The target platform will accept multiple instances of the same bundle (as it can be valid to have multiple versions of the same bundle running). However, the OSGi state PDE creates should only allow non-singleton bundles of different versions to be duplicated.

This would be better discussed in a bug. Please open one and provide the simplest example you can.
Re: Possible bug in Target Platform handling [message #965876 is a reply to message #964854] Wed, 31 October 2012 15:20 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 2360
Registered: July 2009
Senior Member
Curtis Windatt wrote on Tue, 30 October 2012 17:08
Are the duplicated bundles of the exact same version? Are they singleton bundles?

The problem occurs when the exact same version is present in two different locations, even if one of them is not selected in the .target file. Different versions of the same bundle seem to be handled just fine. The SWT plugin is a singleton, but I'm not sure if it matters since I've also experienced this with others, such as org.apache.log4j which is not a singleton.

Quote:
The target platform will accept multiple instances of the same bundle (as it can be valid to have multiple versions of the same bundle running). However, the OSGi state PDE creates should only allow non-singleton bundles of different versions to be duplicated.

This would be better discussed in a bug. Please open one and provide the simplest example you can.

I'll try to produce a small workspace and TP that demonstrates this, but it's readily apparent when including the delta pack in a local TP.
Re: Possible bug in Target Platform handling [message #972480 is a reply to message #965876] Mon, 05 November 2012 17:06 Go to previous message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
The target platform state should only resolve one of the bundles/fragments so that the workspace can compile.

I have the delta pack in my target platform. In the content tab of the target there are two instances of org.eclipse.swt.win32.win32.x86_64. However, in the target platform state view, only one of the two fragments is resolved.

As I mentioned before, please open a bug against PDE UI with steps to reproduce.

Previous Topic:PLUG-INS how can I remove my plugin from runtime-EclipseApplication
Next Topic:Adding menu item in contextmenu to appear in both Project Explorer and CEditor ?
Goto Forum:
  


Current Time: Sun Nov 23 08:57:21 GMT 2014

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

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