Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Question about FilteredItemsSelectionDialog
Question about FilteredItemsSelectionDialog [message #323638] Fri, 04 January 2008 11:19 Go to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

I'm writing a dialog that extends
org.eclipse.ui.dialogs.FilteredItemsSelectionDialog and I have a
requirement to pre-select items in the list. I see that I can call
setInitialSelections() inherited from
org.eclipse.ui.dialogs.SelectionDialog but it appears that is not used
by FilteredItemsSelectionDialog.
Is there any way to set the selection of the viewer in
FilteredItemsSelectionDialog?

TIA,
Eric
Re: Question about FilteredItemsSelectionDialog [message #323655 is a reply to message #323638] Fri, 04 January 2008 13:34 Go to previous messageGo to next message
Eclipse UserFriend
Off the top of my head, I would create a subclass and override
createDialogArea, and then just call setSelection() to whatever value
the initial selection is set to since the viewer is up at that point.

I would also file a bug on this; the FilteredItemsSelectionDialog should
respect this.

Eric Rizzo wrote:
> I'm writing a dialog that extends
> org.eclipse.ui.dialogs.FilteredItemsSelectionDialog and I have a
> requirement to pre-select items in the list. I see that I can call
> setInitialSelections() inherited from
> org.eclipse.ui.dialogs.SelectionDialog but it appears that is not used
> by FilteredItemsSelectionDialog.
> Is there any way to set the selection of the viewer in
> FilteredItemsSelectionDialog?
>
> TIA,
> Eric
Re: Question about FilteredItemsSelectionDialog [message #323741 is a reply to message #323655] Mon, 07 January 2008 10:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Francis Upton wrote:
> Off the top of my head, I would create a subclass and override
> createDialogArea, and then just call setSelection() to whatever value
> the initial selection is set to since the viewer is up at that point.

The TableViewer is private with no getter method, so a subclass has no
reference to it.

> I would also file a bug on this; the FilteredItemsSelectionDialog should
> respect this.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=214491



> Eric Rizzo wrote:
>> I'm writing a dialog that extends
>> org.eclipse.ui.dialogs.FilteredItemsSelectionDialog and I have a
>> requirement to pre-select items in the list. I see that I can call
>> setInitialSelections() inherited from
>> org.eclipse.ui.dialogs.SelectionDialog but it appears that is not used
>> by FilteredItemsSelectionDialog.
>> Is there any way to set the selection of the viewer in
>> FilteredItemsSelectionDialog?
>>
>> TIA,
>> Eric
Re: Question about FilteredItemsSelectionDialog [message #323756 is a reply to message #323741] Mon, 07 January 2008 13:45 Go to previous messageGo to next message
Eclipse UserFriend
Oops, the setSelection() that I saw was in an inner class. Sorry.

Eric Rizzo wrote:
> Francis Upton wrote:
>> Off the top of my head, I would create a subclass and override
>> createDialogArea, and then just call setSelection() to whatever value
>> the initial selection is set to since the viewer is up at that point.
>
> The TableViewer is private with no getter method, so a subclass has no
> reference to it.
>
>> I would also file a bug on this; the FilteredItemsSelectionDialog
>> should respect this.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214491
>
>
>
>> Eric Rizzo wrote:
>>> I'm writing a dialog that extends
>>> org.eclipse.ui.dialogs.FilteredItemsSelectionDialog and I have a
>>> requirement to pre-select items in the list. I see that I can call
>>> setInitialSelections() inherited from
>>> org.eclipse.ui.dialogs.SelectionDialog but it appears that is not
>>> used by FilteredItemsSelectionDialog.
>>> Is there any way to set the selection of the viewer in
>>> FilteredItemsSelectionDialog?
>>>
>>> TIA,
>>> Eric
Re: Question about FilteredItemsSelectionDialog [message #323765 is a reply to message #323638] Mon, 07 January 2008 19:16 Go to previous messageGo to next message
Eclipse UserFriend
Have a look at FilteredResourcesSelectionDialog.open(). It sets the
initial selection by setting the pattern (it gets the selection from the
window). I think this will do what you want. Sorry for the earlier red
herring.

Eric Rizzo wrote:
> I'm writing a dialog that extends
> org.eclipse.ui.dialogs.FilteredItemsSelectionDialog and I have a
> requirement to pre-select items in the list. I see that I can call
> setInitialSelections() inherited from
> org.eclipse.ui.dialogs.SelectionDialog but it appears that is not used
> by FilteredItemsSelectionDialog.
> Is there any way to set the selection of the viewer in
> FilteredItemsSelectionDialog?
>
> TIA,
> Eric
Re: Question about FilteredItemsSelectionDialog [message #894462 is a reply to message #323765] Mon, 09 July 2012 06:20 Go to previous message
Eclipse UserFriend
Any update on this topic?
Previous Topic:FilteredItemsSelectionDialog - refreshing content provider
Next Topic:error creating a JPA project
Goto Forum:
  


Current Time: Sun Jul 13 01:36:35 EDT 2025

Powered by FUDForum. Page generated in 0.03821 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top