Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 27051 - [features] features need to spec plugin
Summary: [features] features need to spec plugin
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Eduardo Pereira CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 26946 29929
  Show dependency tree
 
Reported: 2002-11-24 21:24 EST by Jeff McAffer CLA
Modified: 2003-02-18 11:27 EST (History)
2 users (show)

See Also:


Attachments
Patch for Workbench - Manage plugin id and avoid calling update core (42.37 KB, patch)
2002-12-06 15:01 EST, Christophe Elek CLA
no flags Details | Diff
Patch for IPlatformConfiguration - Manages plugin id (104.04 KB, patch)
2002-12-06 15:02 EST, Christophe Elek CLA
no flags Details | Diff
Few changes on top of the fix proposed by Chris. (56.28 KB, text/plain)
2002-12-09 11:35 EST, Eduardo Pereira CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2002-11-24 21:24:51 EST
To support the new feature model, features cannot rely on their plugin having 
the same id.  feature.xml files should support the following additional 
attributes:

On <feature>: 
  plugin="feature plugin id"

Any update/install/boot code which relies on this should be updated as well.
Comment 1 Dejan Glozic CLA 2002-11-29 11:51:13 EST
Christophe, please add the 'plugin' attribute to the feature model and update 
the parser accordingly. When done, move the defect to Platform UI so that they 
can change the way they look up attribution plug-in.

PDE Build needs this done for M4.
Comment 2 Christophe Elek CLA 2002-11-29 16:44:05 EST
Action taken: implemented parsing and model
Issue:
I presume UI will not want to create a Feature Model to retrieve the associated
plugin id. We will need to store the value in platform.cfg too
Action Plan: Update PlatformConfiguration to save plugin id when feature is primary
Comment 3 Nick Edgar CLA 2002-12-02 15:59:59 EST
We need to avoid doing a heavyweight operation like building the feature model 
just to bring up the about dialog.
Comment 4 Christophe Elek CLA 2002-12-06 08:30:33 EST
Action Taken: I would link this one to bug 26946 As it seems Update Manager
should share its knowledge with other component without overhead (99 classes 500K).

I can see 2 items Update Manager should expose to UI
1) what is the primary/brnading plugin of a primary feature
2) what new feature have been enabled since last started

Will it help UI if
a) Update Manager saves the plugin id and version in platform.cfg and provides
the following API. 
IPlatformConfig.IFeatureEntry.getPrimaryPluginID() that will return the id if
the primary plugin if the feature can be primary or null.

b) IPlatformConfiguration provides a getConfiguredFeatureEntries that returns
the list of configured features.
b1) can UI compare this list with the previous one they saved if
getFeaturesChangeStamp() has changed?
b2) does UI need more info than the id/version for a new configured feature?

This does not take out the fact that Update Manager should lazily create its
model to reduce memory footprint...

Action Plan: pass to UI for comments
Comment 5 Christophe Elek CLA 2002-12-06 08:52:21 EST
Action Taken: implemented
IPlatformConfiguration.IFeatureEntry.getFeaturePluginIdentifier()
Action Plan: Test
Comment 6 Nick Edgar CLA 2002-12-06 09:13:16 EST
Eduardo, could you please comment on whether what Chris suggests above will 
suffice?  Presumably IFeatureEntry's must implement equals if they don't 
already.
Comment 7 Christophe Elek CLA 2002-12-06 15:01:00 EST
Created attachment 2689 [details]
Patch for Workbench - Manage plugin id and avoid calling update core
Comment 8 Christophe Elek CLA 2002-12-06 15:02:54 EST
Created attachment 2690 [details]
Patch for IPlatformConfiguration - Manages plugin id
Comment 9 Christophe Elek CLA 2002-12-06 15:13:08 EST
Action taken: Attached are two patches that I cannot commit

1)the boot patch patches IPlatformConfiguration and PlatformConfiguration which
now manages the primary plugin identifier. This requires a change in the core
spec where install.ini now supports another property:
"feature.default.plugin.id" otherwise we would have to parse the feature.xml at
startup...

# Optional property "feature.default.plugin.id" contains id of the primary plugin
# (the primary plugin controls product branding, splash screens, and plug-in
# customization)
# If the property is omitted, the value will default to the value of the property
# "feature.default.id"
feature.default.plugin.id=org.eclipse.platform.plugin

Can somebody from Core patches the two classes and update the spec ?

2) once the patch has been applied, UI should apply (and check first :-) the
patch for Workbench. This patch avoid calling Update Core when UI wants to know
which features are new. This patch also uses the new IPlatformConfiguration to
retrieve the primary plugin.

ISSUES: The self hosting will not work properly as the launcher disable the
reconciliation application, thus when self hosting the about dialog will not
show the proper content. I will open a separate bug for that.

Action Plan: pass to Core so they can apply the boot patch
Comment 10 DJ Houghton CLA 2002-12-06 15:36:47 EST
Released patch to IPlatformConfiguration and PlatformConfiguration into HEAD.

Where is the spec for the install.ini found? Or were you referring to Update/Core?
Comment 11 Christophe Elek CLA 2002-12-06 15:57:17 EST
Right, the specs are mine :-) will fix them
Action Plan: pass to UI
Comment 12 Nick Edgar CLA 2002-12-06 16:14:27 EST
Eduardo, could you please review Chris' patch?
Comment 13 Christophe Elek CLA 2002-12-07 12:48:29 EST
Action Taken: updated the specs. Installed 1207. Added new workbench.jar from my
eclipse. Started Eclipse. Everything went on. Tools Spy doesn't show update.core
upon startup meaning update.core hasn't been initialized.
Comment 14 Eduardo Pereira CLA 2002-12-09 11:35:59 EST
Created attachment 2728 [details]
Few changes on top of the fix proposed by Chris.

There are still places where we assume that the plugin id and feature id are
the same.
Comment 15 Eduardo Pereira CLA 2002-12-16 12:50:02 EST
Released Workbench.java with one more change.
- Update plugin is not activated anymore.
- Still need to check places where we assume that plugin id and feature id are 
the same.
Comment 16 Jeff McAffer CLA 2003-01-21 09:10:10 EST
Please confirm that any dependencies are removed.
Comment 17 Eduardo Pereira CLA 2003-01-21 17:46:23 EST
Changed/Released the code. It works as before but I could not test the new 
functionality due to bug 29929.
Comment 18 Dejan Glozic CLA 2003-02-11 20:06:24 EST
Eduardo, the referenced defect has now been fixed. Can you verify so that we 
can close bug 26945?
Comment 19 Andrew Irvine CLA 2003-02-18 11:27:17 EST
Verified in 20020317