-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap viewer in CheckboxTablePart within a FilteredTable #1666
base: master
Are you sure you want to change the base?
Conversation
@Override | ||
protected void preservingSelection(Runnable updateCode) { | ||
super.preservingSelection(updateCode); | ||
// The super class implementation will preserve a root element's check | ||
// mark but that can cause newly unfiltered children to become check | ||
// marked. | ||
// See https://github.com/eclipse-pde/eclipse.pde/issues/62 | ||
restoreCachedState(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In hindsight, I'm not really sure if this is really needed. There aren't multiple levels of children, so this issue probably can't happen here.
<resource path="src/org/eclipse/pde/internal/ui/shared/CachedCheckboxTableViewer.java" type="org.eclipse.pde.internal.ui.shared.CachedCheckboxTableViewer"> | ||
<filter comment="Extends CheckboxTableViewer to match CachedCheckboxTreeviewer" id="571473929"> | ||
<message_arguments> | ||
<message_argument value="CheckboxTableViewer"/> | ||
<message_argument value="CachedCheckboxTableViewer"/> | ||
</message_arguments> | ||
</filter> | ||
</resource> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure whether inheritance is better than composition. But otherwise it's not possible to respond to e.g. calling setAllChecked() on the viewer.
By using the FilteredTable, we get a quick-filter for all extending parts for free. This includes: - The Cross-platform page of the "Deployable features" export wizard. - The Update Java Classpath page of the "Update classpath..." action - The Selection page of the "Import Plug-ins and Fragments" wizard - The Update Java Classpath page of the "Plug-in from Existing JAR Archives" wizard. - The Template Selection page of the "Plug-in Project" page. Together with the quick-filter comes a caching of the checked table items. Those elements remain checked, even if currently hidden by the filter and will be restored once they become visible again. Furthermore, the PluginListPage has been adapted to use a CheckboxTablePart rather than a CheckboxTreePart (effectively reverting 4c1edad), to match the list of plugins that it displays. Contributes to eclipse-pde#1497
12ec3ef
to
54ce71c
Compare
By using the FilteredTable, we get a quick-filter for all extending parts for free. This includes:
Together with the quick-filter comes a caching of the checked table items. Those elements remain checked, even if currently hidden by the filter and will be restored once they become visible again.
Furthermore, the PluginListPage has been adapted to use a CheckboxTablePart rather than a CheckboxTreePart (effectively reverting 4c1edad), to match the list of plugins that it displays.
Contributes to #1497