Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Question about FilteredItemsSelectionDialog
Question about FilteredItemsSelectionDialog [message #323638] Fri, 04 January 2008 16: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 18:34 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
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 15: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 18:45 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
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] Tue, 08 January 2008 00:16 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
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 10:20 Go to previous message
Shiyam Hoda is currently offline Shiyam HodaFriend
Messages: 4
Registered: June 2012
Junior Member
Any update on this topic?
Previous Topic:FilteredItemsSelectionDialog - refreshing content provider
Next Topic:error creating a JPA project
Goto Forum:
  


Current Time: Fri Mar 29 14:39:12 GMT 2024

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

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

Back to the top