Bug 181628 - Generated config.ini should not start fragments
Summary: Generated config.ini should not start fragments
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2007-04-09 13:29 EDT by Pascal Rapicault CLA
Modified: 2008-02-05 14:25 EST (History)
3 users (show)

See Also:
curtis.windatt.public: review? (baumanbr)


Attachments
Patch (3.23 KB, patch)
2007-12-19 13:51 EST, Curtis Windatt CLA
no flags Details | Diff
org.eclipse.pde.ui.patch (4.74 KB, patch)
2008-01-02 14:47 EST, Chris Aniszczyk CLA
no flags Details | Diff
mylyn/context/zip (1.14 KB, application/octet-stream)
2008-01-02 14:47 EST, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2007-04-09 13:29:46 EDT
I20070327-0800
The config.ini generated by PDE on startup of a launch configuration marks fragments to be started. This causes an exception to be generated at runtime when the framework is trying to start the bundle which unnecessarily fills the log.
Could you please not mark fragments for start. Thx.
Comment 1 Wassim Melhem CLA 2007-04-09 13:37:28 EDT
Is this for OSGi launch configs or Eclipse application launch configs?

Is update.configurator involved here or no?
Comment 2 Pascal Rapicault CLA 2007-04-09 19:02:43 EDT
This problem shows up when I'm using an osgi launch configuration, it probably happens the same way with an eclipse one.
Update configurator does its stuffs properly Tom verified the code.
Comment 3 Wassim Melhem CLA 2007-04-09 19:07:13 EDT
That's what I thought.  It is not a problem in Eclipse app launch configs where we generate the config.ini for you.

As for the OSGi launch config, you are in total control.  So fragments are being started, because that's how you specified it on the Bundles tab in the launch configs.

Now if it does not make sense to have the user control the fragment status, then PDE could make the autostart setting for each fragment read-only and set to false.  
Comment 4 Thomas Watson CLA 2007-04-10 08:41:06 EDT
+1 for making fragments start-status read-only and set to false on the OSGi launcher bundles tab.
Comment 5 Brian Bauman CLA 2007-09-28 00:18:32 EDT
Is there ever a scenario a user would want to start a fragment using the config.ini?  If so, I would prefer to have the fragment's start status set to false, but be editable just in case the user wants to manually override it.  If there is never a case a user would want to do that, we can make it read-only to prevent confusion.
Comment 6 Thomas Watson CLA 2007-09-28 07:15:50 EDT
(In reply to comment #5)
> Is there ever a scenario a user would want to start a fragment using the
> config.ini?  If so, I would prefer to have the fragment's start status set to
> false, but be editable just in case the user wants to manually override it.  If
> there is never a case a user would want to do that, we can make it read-only to
> prevent confusion.
> 

There is no reason to start a fragment.  Starting a fragment in the config.ini will never work because OSGi states that starting a fragment throws a BundleException.  This is why I think fragments start status should not be editable and should be set to false.
Comment 7 Curtis Windatt CLA 2007-12-19 13:12:40 EST
I'll look at fixing this one.

Should the user still be able to set the start level?
Comment 8 Curtis Windatt CLA 2007-12-19 13:51:14 EST
Created attachment 85590 [details]
Patch

Patch changes OSGiBundlesBlock to always set the text of the autostart column to false if the model is a fragment.  The column editor is removed so the user cannot change it.
Comment 9 Curtis Windatt CLA 2007-12-19 13:52:37 EST
Brian, please review.

If it turns out the start level of fragments should be set to an uneditable value, it will be easy for me to update the patch.
Comment 10 Chris Aniszczyk CLA 2008-01-02 14:47:16 EST
Created attachment 86014 [details]
org.eclipse.pde.ui.patch

I updated the patch to not show an editable value for start level for fragments too.
Comment 11 Chris Aniszczyk CLA 2008-01-02 14:47:19 EST
Created attachment 86015 [details]
mylyn/context/zip
Comment 12 Chris Aniszczyk CLA 2008-01-02 14:47:47 EST
Thanks again Curtis!
Comment 13 Brian Bauman CLA 2008-02-05 14:25:43 EST
Verified on I20080204-0800.

I like way this behaves.  Good job guys!