Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 184041 - Changing target environment does not update the plugin container
Summary: Changing target environment does not update the plugin container
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.3 RC1   Edit
Assignee: Brian Bauman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-25 11:44 EDT by Pascal Rapicault CLA
Modified: 2007-05-12 22:49 EDT (History)
1 user (show)

See Also:
wassim.melhem: review+


Attachments
patch (18.23 KB, patch)
2007-05-11 17:45 EDT, Brian Bauman CLA
baumanbr: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2007-04-25 11:44:01 EDT
I20070418-1012
I have noticed that when I change my target environment the plug-in dependencies do not get updated which can cause problems. 
Here are steps to reproduce:
- start eclipse
- create a plug-in with some UI dependencies
- expand the plug-in dependencies and notice that the swt fragment for your platform is present. good.
- change the target platform to point at an RCP based target containing the delta pack. reload. apply. the plug-in dependencies are left unchanged. good.
- now modify the environment variables in the target platform to something else, notice that the reference to the swt fragment is not modified properly.
Comment 1 Brian Bauman CLA 2007-05-11 11:25:26 EDT
CC'ing Wassim so he can review patch when it is ready.
Comment 2 Brian Bauman CLA 2007-05-11 17:45:47 EDT
Created attachment 66943 [details]
patch

The patch contains code that was refactored out of MinimalState into TargetPlatformHelper, so that we calculate the platform properties using the same method no matter where we are.

When the user selects OK on the TargetEnvironmentTab, we check to see if any of the values have changed.  If they have, we get the "current state" (either the ModelManger's state or a new PDEState if the user choose a new target), and reset the platform properties.  If the current state == the ModelManager's state (meaning the user did not load a new target), we send an event to the ModelManager to reresolve the state since the platform properties have changed.  If the current state != the ModelManager's state, there is no reason to send the event since all the Workspace projects will get refreshed when the state gets reset.
Comment 3 Wassim Melhem CLA 2007-05-12 22:49:45 EDT
Released patch.  Brian is awesome.