Bug 240737 - [product] be able to set start levels on a product
Summary: [product] be able to set start levels on a product
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P3 normal with 2 votes (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 245782 255718
  Show dependency tree
 
Reported: 2008-07-14 18:45 EDT by Chris Aniszczyk CLA
Modified: 2009-01-20 17:58 EST (History)
8 users (show)

See Also:


Attachments
mylyn/context/zip (1.06 KB, application/octet-stream)
2008-07-22 14:15 EDT, Chris Aniszczyk CLA
no flags Details
example of how I think it could look like (for plugins (47.89 KB, image/png)
2008-07-23 09:03 EDT, bartosz michalik CLA
no flags Details
text model implementation (17.16 KB, patch)
2008-07-23 17:27 EDT, bartosz michalik CLA
no flags Details | Diff
mylyn/context/zip (14.82 KB, application/octet-stream)
2008-07-23 17:27 EDT, bartosz michalik CLA
no flags Details
small fixes (17.71 KB, patch)
2008-07-23 19:27 EDT, bartosz michalik CLA
no flags Details | Diff
first view on my concept of gu (27.10 KB, text/plain)
2008-07-24 15:22 EDT, bartosz michalik CLA
no flags Details
gui change (28.71 KB, text/plain)
2008-08-12 17:13 EDT, bartosz michalik CLA
caniszczyk: iplog+
Details
org.eclipse.pde.patch (46.47 KB, patch)
2008-09-04 11:16 EDT, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.pde.patch (48.18 KB, patch)
2008-11-06 15:49 EST, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.pde.patch (60.99 KB, patch)
2008-11-07 11:43 EST, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.pde.patch (28.06 KB, patch)
2008-11-09 16:30 EST, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.pde.patch (39.92 KB, patch)
2008-12-01 15:52 EST, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.pde.patch (51.22 KB, patch)
2009-01-12 18:50 EST, Chris Aniszczyk CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Aniszczyk CLA 2008-07-14 18:45:01 EDT
For people who use DS in their applications or have any need to start things... it's currently painful to do so. Product Customization (Equinox Transforms) also suffers this fate.

For 3.5, we need to allow the product editor to define startlevels along with maybe some other properties. As an example, 'osgi.framework.extensions' needs to be set to org.eclipse.equinox.transforms.hook for product customization.
Comment 1 Chris Aniszczyk CLA 2008-07-14 18:54:35 EDT
cc'ng Andrew as this will affect PDE Build eventually
Comment 2 Andrew Niefer CLA 2008-07-15 11:02:17 EDT
I can't find it atm, but there is a bug somewhere about us consolidating .product parsing into one place.  Currently there are 3 consumers (p2, UI & build).  We should do that first.
Comment 3 Chris Aniszczyk CLA 2008-07-18 16:19:59 EDT
Bartosz, ready to tackle this? I have some ideas on how to do this. We should chat. By enabling this, we should make it fairly easy to finish the Equinox transforms integration into PDE :)
Comment 4 bartosz michalik CLA 2008-07-21 17:47:46 EDT
yup. we can discuss that whenever you have some time. sorry for delay.
Comment 5 Chris Aniszczyk CLA 2008-07-22 14:07:20 EDT
So here is the idea.

In the Configuration tab, where we display plug-ins or features, we modify it so we have table trees. For example, the plug-ins list, would look similar to what we now have in the OSGi Framework launch configuration (you can set start levels and set auto start). For features, we would list all the plug-ins under the features in a tree, and have this same level of start level or auto start tweakability.

The next question is how we persist stuff.

I'd envision a new element, let's say <configuration>

within it, we would have a list of plug-ins and any potential properties they may have.

<configuration>
    <plugin id="foo" startLevel="3" autostart="false">
    ...
</configuration>

We can later expand the <configuration> element to include information about OSGi properties... needed for things like Equinox transforms...

    <property id="osgi.some.property" value="blah">

Do you have an idea of what I am picturing here Bartosz?
Comment 6 Chris Aniszczyk CLA 2008-07-22 14:15:15 EDT
Here is a mylyn context to help you get started in the product model and editor.
Comment 7 Chris Aniszczyk CLA 2008-07-22 14:15:22 EDT
Created attachment 108113 [details]
mylyn/context/zip
Comment 8 bartosz michalik CLA 2008-07-22 17:54:26 EDT
Chris you can assign it to me :)
Comment 9 bartosz michalik CLA 2008-07-23 09:03:31 EDT
Created attachment 108188 [details]
example of how I think it could look like (for plugins
Comment 10 bartosz michalik CLA 2008-07-23 09:54:03 EDT
There is one question waiting to be asked (I have no experience in feature based product). Couldn't we keep all together ? 
If we have feature all its plugins are listened as a children other plugins have no parents (cause life is brutal ;) )
Does it make any sense ? 

if not i have scenario for the new section <configuration> which can make it a bit confusing. starting with feature based product
1. set properties for some plugins
2. change to the plugin based product (ok product can reuse properties)
3. remove plugins from configuration (in such a case <configuration> section could be also cleaned for this plugins)
4. switch again to the feature based product (some properties are missing)
we can make the same scenario another way around. 

I am not sayng it is a big problem but it can be confusing. on the other hand I think the new section solution be clean ( there is no additional work as would be in case of changing eg. <plugins> section)

waiting for comments (especially on is this split to plugins/features really needed in this place)
Comment 11 bartosz michalik CLA 2008-07-23 17:27:50 EDT
Created attachment 108269 [details]
text model implementation

not tested (GUI in the next patch) but should be ok
Comment 12 bartosz michalik CLA 2008-07-23 17:27:57 EDT
Created attachment 108270 [details]
mylyn/context/zip
Comment 13 bartosz michalik CLA 2008-07-23 19:27:16 EDT
Created attachment 108283 [details]
small fixes
Comment 14 bartosz michalik CLA 2008-07-24 15:22:40 EDT
Created attachment 108385 [details]
first view on my concept of gu
Comment 15 bartosz michalik CLA 2008-08-12 17:13:19 EDT
Created attachment 109836 [details]
gui change
Comment 16 Chris Aniszczyk CLA 2008-09-04 11:16:32 EDT
Created attachment 111676 [details]
org.eclipse.pde.patch

An updated patch.

Still needs work.
Comment 17 Chris Aniszczyk CLA 2008-09-10 18:27:08 EDT
This will go into M3 along with a various other amount of work to improve the product editor (ie., setting versions)
Comment 18 Andrew Niefer CLA 2008-09-11 09:09:14 EDT
Seeing how there are 3 .product parsers, this would be a good time to figure out where we can put a common one that all 3 of ui, build and p2 can depend on.  
Comment 19 Chris Aniszczyk CLA 2008-11-06 15:49:46 EST
Created attachment 117252 [details]
org.eclipse.pde.patch

Modified Bartosz's patch. Clean up.

We're on our way to startlevel heaven.

Things that need to be done still:

1) right now, we only support this on plug-in based product configs, need features
2) need to make launching and export work properly
Comment 20 Chris Aniszczyk CLA 2008-11-07 11:43:39 EST
Created attachment 117335 [details]
org.eclipse.pde.patch

All UI things related to setting start levels is done. I also laid down some initial code to start including versions on plug-ins within product definitions.

The next step is to figure out launching and export (PDE Build). For the launching aspect, I'm considering adding the ability to modify start levels within Eclipse launch configurations.
Comment 21 Chris Aniszczyk CLA 2008-11-07 14:32:02 EST
dropped initial code to handle editing of start levels in the product editor.

Adding support for launching now.
Comment 22 Chris Aniszczyk CLA 2008-11-09 16:30:32 EST
Created attachment 117405 [details]
org.eclipse.pde.patch

Phase 2 of start level work.

Adding support to Eclipse Application launch configurations to tweak startlevels.
Comment 23 John Arthorne CLA 2008-11-18 12:01:06 EST
Chris, one thing I noticed is that it doesn't include the bundle version in the configuration element:

   <configurations>
      <plugin id="org.eclipse.core.runtime" autoStart="false" startLevel="0" />
   </configurations>

The bundle version should be included here as well, because the product could contain multiple versions of a non-singleton bundle. Let me know if I should enter a separate bug for this.
Comment 24 Chris Aniszczyk CLA 2008-11-18 12:59:30 EST
(In reply to comment #23)
> Chris, one thing I noticed is that it doesn't include the bundle version in the
> configuration element:
> 
>    <configurations>
>       <plugin id="org.eclipse.core.runtime" autoStart="false" startLevel="0" />
>    </configurations>
> 
> The bundle version should be included here as well, because the product could
> contain multiple versions of a non-singleton bundle. Let me know if I should
> enter a separate bug for this.
> 

No need to enter a seperate bug. I'm still working on this feature. The UI needs to be slightly cleaned up and the launching needs to be aware of these changes. I expect to have this done next week.

It's good to see that people are interested in this already. Do you have any other suggestions for managing start levels? Does an "START EVERYTHING" option seem useful for you ?
Comment 25 Jawher Moussa CLA 2008-11-18 13:11:37 EST
Hi,
Does an "START EVERYTHING" option
> seem useful for you ?
> 

IMHO, this should not go in the meta data level, but in the UI instead, as it keeps the meta data more consistent (what should happen if you encounter something like :

<configurations>
      <start-all-plugins />
      <plugin id="org.eclipse.core.runtime" autoStart="false" startLevel="0" />
</configurations>
 for example), and at the end, it leads to the same result.

Cheers,
Jawher
Comment 26 Chris Aniszczyk CLA 2008-12-01 15:52:49 EST
Created attachment 119203 [details]
org.eclipse.pde.patch

An updated patch.

Issues still exist when launching. This problem mostly stems with the LaunchPluginValidator.parsePlugins(...) method.... will investigate and start writing test cases for launching.
Comment 27 Wolfgang Schell CLA 2008-12-18 09:02:27 EST
Hi!

I'm using this feature with 3.5M4 for a RCP application, and it's great, but I think there are still some bugs (using product configuration based on plugins):

* After configuring start levels and auto start, PDE does not always seem to apply these settings in the launch configuration (BTW: for launching Eclipse applications, there is no page for specifying start levels, right?), even after sync'ing on the Overview page
* When closing and re-opening the product editor, the table containing plugins and start levels is empty, but when I look into the file with the XML editor, the settings are still there, but autostart has been reset to false (was configured as true)

This behavior is somewhat painfull, as I'm experimenting with Equinox DS and my services are simply not showing up...

Anyway, thanks for your work on this!

Regards,

Wolfgang
Comment 28 Chris Aniszczyk CLA 2008-12-18 12:06:52 EST
Thanks for the feedback Wolfgang.

We're working on finishing this whole story for M5.

Your services aren't showing up most likely due to start levels or Equinox DS not being started. For now, I recommend using a custom config.ini to tweak start levels until things are working from a self-hosting and export perspective.
Comment 29 Wolfgang Schell CLA 2008-12-19 03:14:17 EST
Hi Chris!

Thanks for your answer. Give me a ping, if you would like me to test anything or get a confirmation that everything is working as expected.
Comment 30 Chris Aniszczyk CLA 2009-01-12 18:50:47 EST
Created attachment 122351 [details]
org.eclipse.pde.patch

An updated patch with copyrights and changes.

Still not there yet, EclipseApplicationLaunchConfiguration needs to be updated.
Comment 31 Chris Aniszczyk CLA 2009-01-19 15:52:09 EST
done.

> 20090119

I appreciate testing on this week's i-build.

On a side note, we have to redo the way PDE launches things... it's still too brittle now.
Comment 32 Wolfgang Schell CLA 2009-01-20 17:58:14 EST
Hi Chris!

(In reply to comment #31)
> done.
> 
> > 20090119
> 
> I appreciate testing on this week's i-build.


I downloaded build I20090120-0920 (eclipse-SDK-I20090120-0920-linux-gtk.tar.gz), but the behavior is still the same: 
My .product file contains the following section:

   <configurations>
      <plugin id="de.myamc.fa.base" autoStart="true" startLevel="3" />
      <plugin id="de.myamc.fa.core" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="1" />
   </configurations>

But when I open the .product file in the product editor, the configuration tab does show neither plugins nor autostart and runlevel. 

If I enter them (again), they are persisted to the .product filem but autostart is always false. 

This seems to be a UI problem only, as launching seems to work, the bundles in the <configurations> section are started correctly.

Does the mentioned build already contain your latest patch?

On a side note: since when are combo boxes (in forms) displayed with a bigger hight (e.g. launching tab, combo for execution environment)? On my Linux x86, GTK environment this looks rather ugly, like the combo boxes have been zoomed...