Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346336 - [target] Improve check state handling on content tab when plug-ins are missing
Summary: [target] Improve check state handling on content tab when plug-ins are missing
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.8 M6   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 346216
Blocks:
  Show dependency tree
 
Reported: 2011-05-18 16:06 EDT by Curtis Windatt CLA
Modified: 2012-02-23 17:50 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2011-05-18 16:06:21 EDT
To fix regression bug 346216 we had to remove some code that will refresh the table contents.  This means that the check state of 'missing' plug-ins (which are displayed as errors in the content tab) is not updated correctly when filters are applied/removed.

When testing, Mike saw that the check state of bundles was inconsistent as well (when trying combinations of filters/tree structure).  However, no reproducable test case has been found.

We should see if there is a hack to make this work (implementing equals/hashcode on resolved bundles for error statuses showed some promise, preserveSelection() might be another avenue).  We could also look at how the missing plug-ins are handled and change the architecture, but this would involve at least some change to the provisional API.
Comment 1 Curtis Windatt CLA 2012-01-24 11:26:26 EST
In addition, unchecked missing bundles are not added to the content tab when opened.  The selected count does include them, and if the group by setting is changed they are visible.  If the missing plug-ins is reselected (vis group by or by removing/adding the location), they are visible again.

1) Create target platform with missing bundle (eg. bad bundles.info)
See that the missing bundle is listed on content tab
2) Deselect the missing bundle
3) Apply a filter or hit ok and reopen
See that the missing bundle is no longer listed on content tab

I will try to fix this smaller issue in M6.
Comment 2 Curtis Windatt CLA 2012-02-23 17:50:57 EST
Fixed in master

There were two problems here,
1) The working copy used to edit a target did not clear the include list before copying. This by itself is not a problem as we load information from the other target definition.  However, as we use the same code we use to read from a file stream, we have a check for previous entries in case the file lists multiple includeBundles elements.

2) Each time filtering, refresh, etc. happens, the invalid bundles are created as new instances. Since the instances fail the equality check, the filtered checkbox tree kept on adding additional entries to its checkstate. Fixed by adding better equals checks in InvalidTargetBundle and using a set in the contents group.