Bug 72511 - PDE Target Platform pref page should keep checked state
Summary: PDE Target Platform pref page should keep checked state
Status: RESOLVED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2004-08-24 11:42 EDT by Dani Megert CLA
Modified: 2009-03-16 11:34 EDT (History)
4 users (show)

See Also:


Attachments
Patch to retain selection on target reload (5.57 KB, patch)
2008-01-18 04:32 EST, Les Jones CLA
no flags Details | Diff
Patch to retain selection on target reload (6.33 KB, patch)
2008-01-18 05:00 EST, Les Jones CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2004-08-24 11:42:09 EDT
I200408170800

When reloading or setting a new Target Platform (Browse...) the PDE Target
Platform pref page checks all plug-ins - it should only select those that have
been selected before.

Assume you have
1. set the PDE Target Platform to be WSAD IE
2. out of those many plug-ins randomly checked 5 (let's say every 200th)

Scenario 1:
1. wait some days
2. on the PDE Target Platform pref page press Reload
   ==> all plug-ins are now checked, now you have to
   a) still remember which 5 plug-ins you had selected before
   b) re-select them again (assuming you remember them again ;-)


Scenario 2:
1. wait some days
2. set the target platform to some other WSAD IE install location
   ==> all plug-ins are now checked, now you have to
   a) still remember which 5 plug-ins you had selected before
   b) re-select them again (assuming you remember them again ;-)
Comment 1 Chris Aniszczyk CLA 2008-01-17 17:33:56 EST
marking bugday
Comment 2 Les Jones CLA 2008-01-18 04:32:27 EST
Created attachment 87238 [details]
Patch to retain selection on target reload

Did you mean something like this?
Comment 3 Les Jones CLA 2008-01-18 04:38:39 EST
Found a slight problem with 'Enable All' while looking at this; so have raised bug 215760.
Comment 4 Les Jones CLA 2008-01-18 05:00:18 EST
Created attachment 87240 [details]
Patch to retain selection on target reload

Refactored out the retrieval of selected ids. It was bugging me that I'd just dumped the logic into the handleReload() method. ;-)
Comment 5 Brian Bauman CLA 2008-01-18 12:32:34 EST
This algorithm is going to confuse a lot of people.  If you used the concept set forth, then if you changed your TP to anything other than eclipse, everything would be deselected (since by default the self hosted Eclipse plug-ins are selected).  This is not the desired behavior as it makes changing targets a two button process.

One option is to keep track of the unchecked plug-ins.  This way new plug-ins are automatically checked (which I believe is the actual behavior we are after).  My concern though is that a target platform represents a configuration.  When we create a new configuration, is carrying the history from the past configuration actually the way we want to go or might the past configuration be out of date.

The second concern I have is what about version #s?  If I deselect org.eclipse.pde v3.2.0 in my TP and then load Eclipse 3.4, org.eclipse.pde v3.4.0 is really a different plug-in.  Should that be checked?  Do you want to include the plug-in now that you are loading a completely different version of Eclipse, esp. since certain plug-ins may now depend on it which didn't before?

The case I completely agree with you on is the reload.  I think we can do a better job on reload in order to not recheck everything the user has already checked.

Les, lets hold off on this one for the moment until we can figure out how we want to make the target platform function.
Comment 6 Les Jones CLA 2008-01-18 12:47:18 EST
Agreed that the version numbering mechanism can make this quite a lot more complex. I thought it might be useful to see it in action anyway to try to better understand how it might work.

If I'm honest, I found it a little confusing even when just switching between my 3.4M4 and 3.4M3 installs (I've got Mylyn in one and UMLTools in the other). i.e. that you deselect a single plugin in the M4 target, switch to M3 and then switch back to M4 and now you've got a lot deselected.
Comment 7 Dani Megert CLA 2008-01-25 08:01:24 EST
To be honest my use case is not exactly the one described in comment 0 (which describes the general case): I want my workspace to be self-contained i.e. all required stuff is imported and all target plug-ins disabled/unchecked. The only thing I really need is to leave all plug-ins disabled when I change to a different target.
Comment 8 Dani Megert CLA 2008-01-25 08:02:00 EST
So, this
>One option is to keep track of the unchecked plug-ins. 
would solve my needs.
Comment 9 Brian Bauman CLA 2008-01-25 10:21:58 EST
> The only
> thing I really need is to leave all plug-ins disabled when I change to a
> different target.

Why would you change your target platform if you aren't using any plug-ins in it (they are all deselected)? 

Comment 10 Dani Megert CLA 2008-01-25 10:27:17 EST
To import them.
Comment 11 Brian Bauman CLA 2008-01-25 10:32:21 EST
Have you tried using the ability to import plug-ins from Eclipse locations other than your target platform?  Is that not meeting your needs?  Seems like it might save you time instead of changing your target platform.
Comment 12 Dani Megert CLA 2008-01-25 11:15:43 EST
>Have you tried using the ability to import plug-ins from Eclipse locations
other than your target platform?
>Yes.

>Is that not meeting your needs?  
Exactly. Just try it out once: immediately after changing the location a warning is thrown at me saying that I must add the source location. When I click on that button it takes me to the preference page. Did I miss something?
Comment 13 Curtis Windatt CLA 2009-03-16 11:34:15 EDT
While it still isn't clear what the best way to handle identical plug-ins with different versions (see bugs like bug 233095) we do a better job in the new target platform story storing the included plug-ins.  We don't forget what is included if you reload/reresolve.  Marking as WORKSFORME.