Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Gallery Widget + ISelectionProvider
Gallery Widget + ISelectionProvider [message #40227] Wed, 19 September 2007 03:57 Go to next message
Eclipse UserFriend
Originally posted by: swetha.yahoo.co.in

Hi,

I have a Rcp view which is developed using Gallery Widget... I want this
to be registered as a selection provider.. For this I need to implement
the ISelectionProvider...

getSite().addSelectionProvider(ISelectionProvider)....just like
TreeViewer..

How can implement ISelectionProvider for the gallery.. Is this posiible?

Can anyone point me in the right direction?


Thanks,
Swetha
Re: Gallery Widget + ISelectionProvider [message #40601 is a reply to message #40227] Sat, 29 September 2007 16:50 Go to previous messageGo to next message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi,

You can implement ISelectionProvider for the Gallery, I did it actually.
But my case is more complicated than yours because my selection provider
can use selection from several widgets, which are defined through
extension points.

You will have to write yourself a simpler implementation. Just implement
all methods of ISelectionProvider in a new class.

If you want to see how I did this, you can look at :
http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trun k/org.sharemedia.core/src/org/sharemedia/gui/views/AbstractS electionProviderViewPart.java?view=log
http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trun k/org.sharemedia.core/src/org/sharemedia/gui/views/library2/ LibraryView2.java?view=log
and
http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trun k/org.sharemedia.library.view.gallery/src/org/sharemedia/gui /libraryviews/GalleryLibraryView.java?view=log

This could be the beginning of the gallery viewer :-)

--
Nicolas

Swetha a écrit :
> Hi,
> I have a Rcp view which is developed using Gallery Widget... I want
> this to be registered as a selection provider.. For this I need to
> implement the ISelectionProvider...
> getSite().addSelectionProvider(ISelectionProvider)....just like
> TreeViewer..
>
> How can implement ISelectionProvider for the gallery.. Is this posiible?
>
> Can anyone point me in the right direction?
>
>
> Thanks,
> Swetha
>
Re: Gallery Widget + ISelectionProvider [message #44784 is a reply to message #40601] Fri, 14 December 2007 04:01 Go to previous message
Peter Centgraf is currently offline Peter CentgrafFriend
Messages: 52
Registered: July 2009
Member
BTW,

I have posted a patch for an implementation of a JFace Viewer for
Gallery, in the style of TreeViewer. I also included an adapter that
lets you use Gallery with an IStructuredContentProvider if you don't
care about groups. This code inherits the ISelectionProvider
implementation from AbstractTreeViewer. You might want to follow the bug:

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

--
Peter
Re: Gallery Widget + ISelectionProvider [message #585044 is a reply to message #40227] Sat, 29 September 2007 16:50 Go to previous message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi,

You can implement ISelectionProvider for the Gallery, I did it actually.
But my case is more complicated than yours because my selection provider
can use selection from several widgets, which are defined through
extension points.

You will have to write yourself a simpler implementation. Just implement
all methods of ISelectionProvider in a new class.

If you want to see how I did this, you can look at :
http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trun k/org.sharemedia.core/src/org/sharemedia/gui/views/AbstractS electionProviderViewPart.java?view=log
http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trun k/org.sharemedia.core/src/org/sharemedia/gui/views/library2/ LibraryView2.java?view=log
and
http://sharemedia.svn.sourceforge.net/viewvc/sharemedia/trun k/org.sharemedia.library.view.gallery/src/org/sharemedia/gui /libraryviews/GalleryLibraryView.java?view=log

This could be the beginning of the gallery viewer :-)

--
Nicolas

Swetha a écrit :
> Hi,
> I have a Rcp view which is developed using Gallery Widget... I want
> this to be registered as a selection provider.. For this I need to
> implement the ISelectionProvider...
> getSite().addSelectionProvider(ISelectionProvider)....just like
> TreeViewer..
>
> How can implement ISelectionProvider for the gallery.. Is this posiible?
>
> Can anyone point me in the right direction?
>
>
> Thanks,
> Swetha
>
Re: Gallery Widget + ISelectionProvider [message #586975 is a reply to message #40601] Fri, 14 December 2007 04:01 Go to previous message
Peter Centgraf is currently offline Peter CentgrafFriend
Messages: 52
Registered: July 2009
Member
BTW,

I have posted a patch for an implementation of a JFace Viewer for
Gallery, in the style of TreeViewer. I also included an adapter that
lets you use Gallery with an IStructuredContentProvider if you don't
care about groups. This code inherits the ISelectionProvider
implementation from AbstractTreeViewer. You might want to follow the bug:

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

--
Peter
Previous Topic:CDateTime stable release date
Next Topic:Horisontal scrolling during column draging
Goto Forum:
  


Current Time: Fri Apr 26 23:32:58 GMT 2024

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

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

Back to the top