Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Problems with Run Configuration with Selected Features
Problems with Run Configuration with Selected Features [message #606867] Wed, 15 September 2010 10:42 Go to next message
Rune  is currently offline Rune
Messages: 4
Registered: September 2010
Junior Member
The 3.6 feature of creating a run configuration from a list of features rather than a list of plug-ins caused a sigh of relief in our team.

For each of the developers, having to maintain the list of plug-ins for each run configuration was a pain. Missing a plug-in from your configuration would often lead the reporting a "bug" which went away once a required plug-in were added to the configuration.

Using our the feature definition in the run configuration does not work quite as expected, however.

For our most important kind of run configuration, we have a single feature. Yet it seems that the application is launched with a lot (maybe all) of the plug-ins and fragments in the workspace that are not part of the feature. This causes a lot of test stuff to be available in the launched application, which is not really what is intended.

Also launching with a completely empty feature list seems to work as well, which is weird!

We tried deselecting the option "Use features from workspace if available", but that resulted the extensions in the selected feature not being available to the launched application.

Can someone point us in the right direction in using this? Or is this particular functionality just not ready to use yet?
Re: Problems with Run Configuration with Selected Features [message #606869 is a reply to message #606867] Wed, 15 September 2010 15:57 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis Windatt
Messages: 166
Registered: July 2009
Senior Member
Feature based launching will launch all the features listed in the table as well as any plug-ins required by that feature to launch (according to the OSGi state). If you have only one feature (say the PDE feature) and launch, you will end up launching with a large number of plug-ins because they are required by the pde plug-ins (all of jdt, platform, etc.).

Launching all required makes it much more convenient to launch a single feature as otherwise your application would crash unless you had included every required plug-in (and if you wanted to do this you might as well use the 'selected plug-in' launch).

One other thing to note is that the plug-in that supplies the application or product being launched (specified on the main tab) is considered required and will be added the launched list.

The launch should not include any plug-ins that are not required by an included feature. I expect that something is requiring your tests.

If you have a reproducible test case, please file a bug against PDE UI.
Re: Problems with Run Configuration with Selected Features [message #606871 is a reply to message #606869] Thu, 16 September 2010 03:37 Go to previous messageGo to next message
Rune  is currently offline Rune
Messages: 4
Registered: September 2010
Junior Member
Thanks a lot for the reply!

I'll try to investigate if something is requiring our test plug-ins and fragments.

Is a fragments in the workspace automatically considered required if its host plug-in is required? Even if it is not listed in the feature.xml file?

Your suggestion of using launch with selected plug-ins is great if there is only one developer working on the product. But in a team what we really want is:

* Control over which plug-ins and fragments the application is launched with
* A single definition of this list, common for all of the developers that can be used in as many run configurations as the individual developer needs

What we really would like to specify is: Run with all of the plug-ins in this target platform and the plug-ins listed in this feature. Nothing more, nothing less.

Is there currently a way to do this without having each developer maintain plug-in lists for each of his/her run configurations?
Re: Problems with Run Configuration with Selected Features [message #606873 is a reply to message #606871] Thu, 16 September 2010 15:26 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis Windatt
Messages: 166
Registered: July 2009
Senior Member
Yes, a fragment should be considered required if its host plug-in is included. The requirements calculation does not actually consider anything in the feature.xml beyond creating the initial list of plug-ins.

i.e.
Features are turned into a list of plug-ins
Additional plug-ins in the config are added to the list
PDE runs an operation to recursively find requirements for plug-ins in the list

I can't think of a way to do exactly what you are looking for. But I would start by looking at the requirements. Do you actually need to launch everything in the target platform? If instead you have a feature that describes what you want to launch, all of its plug-in requirements are going to be satisfied by the feature base launch config. It will use plug-ins from the workspace if they are available. If I don't want plug-ins from my workspace, I can change the default plug-in location to be 'external' which will launch everything from my target if it is avaialble. If I want the plug-ins needed by that feature to come from the workspace I can change the plug-in location in the table from default to Workspace.

If you can create a launch configuration that has the correct plug-ins, you can move it to the workspace (common tab) and put it up on CVS/SVN so that the rest of the team will have it next time they check out. Most of the attributes of an Eclipse config are not specific to the machine they are on (they use variables for direcories) the config should run the same anywhere.
Re: Problems with Run Configuration with Selected Features [message #633821 is a reply to message #606873] Tue, 19 October 2010 10:12 Go to previous message
Rune  is currently offline Rune
Messages: 4
Registered: October 2010
Junior Member
Again, thank you for the reply.

I'm still unsure, though, if the resolution mechanics you describe are the most appropriate.

Concretely, our problem is that we use fragments to contain test code for each of our bundles. And we only want those fragments included when we run our unit tests.

There are also a number of other use cases for fragments, e.g. the example from the OSGi spec of providing translation files for different locales, that seems to require control over whether or not a fragment is deployed. Consider an English and a French localization fragment, where you only want one of those.

It makes the way features are interpreted in run configurations a lot less useful, that all of the fragments in the workspace are considered part of the application rather than only those specified in the selected features.

My intuitive understanding of what it would mean to "Launch with: features selected below" is that it should be equivalent to "Launch with: plugin-ins selected below" where the plug-ins selected are exactly those specified by the features.

This interpretation gives complete control over which plug-ins and fragments are used in a run configuration. It would also make the use of features in run configurations coherent with the use of plug-ins/bundles, in that you only get what is specifically selected in the run configuration.
Previous Topic:Invoke maven goal
Next Topic:Problems with Run Configuration with Selected Features
Goto Forum:
  


Current Time: Thu Aug 28 01:23:12 EDT 2014

Powered by FUDForum. Page generated in 0.06076 seconds