Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » ESelectionService(Can we use the ESelectionService in e(fx)clipse)
ESelectionService [message #1128157] Mon, 07 October 2013 11:57 Go to next message
Uwe San is currently offline Uwe San
Messages: 96
Registered: January 2012
Member
Looking at e(fx)clipse's contacts demo, I notice that it uses code like the following to hand over a selected item from one widget to another:

listView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {
   @Override
   public void changed(ObservableValue<? extends Object> arg0, Object arg1, Object arg2) {
      application.getContext().set(Object.class, arg2);
   }
});


Could we use the ESelectionService as well? I tried to inject it into the relevant parts of the code but no instance was available. Can this service be used with e(fx)clipse?

Thanks,
Uwe
Re: ESelectionService [message #1128213 is a reply to message #1128157] Mon, 07 October 2013 13:01 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5321
Registered: July 2009
Senior Member
Yes it should be available. IIRC the ESelectionService is provided by
the e4-framework so we should get it for free, not sure why you don't
get one. Can you enter a bug for it.

Tom

On 07.10.13 13:57, Uwe San wrote:
> Looking at e(fx)clipse's contacts demo, I notice that it uses code like
> the following to hand over a selected item from one widget to another:
>
>
> listView.getSelectionModel().selectedItemProperty().addListener(new
> ChangeListener<Object>() {
> @Override
> public void changed(ObservableValue<? extends Object> arg0, Object
> arg1, Object arg2) {
> application.getContext().set(Object.class, arg2);
> }
> });
>
>
> Could we use the ESelectionService as well? I tried to inject it into
> the relevant parts of the code but no instance was available. Can this
> service be used with e(fx)clipse?
>
> Thanks,
> Uwe
Re: ESelectionService [message #1128991 is a reply to message #1128213] Tue, 08 October 2013 07:25 Go to previous messageGo to next message
Uwe San is currently offline Uwe San
Messages: 96
Registered: January 2012
Member
Here's the bugzilla entry: Bug 418881
Re: ESelectionService [message #1129042 is a reply to message #1128991] Tue, 08 October 2013 08:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5321
Registered: July 2009
Senior Member
Hi,

Looks like the creation of the ESelectionService was modified in Kepler,
in former versions it was created through a ContextFunction and now it
is done in the E4Application bootstrapping.

Fixed in master

Tom

On 08.10.13 09:25, Uwe San wrote:
> Here's the bugzilla entry:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=418881
Re: ESelectionService [message #1129046 is a reply to message #1129042] Tue, 08 October 2013 08:28 Go to previous message
Uwe San is currently offline Uwe San
Messages: 96
Registered: January 2012
Member
Cool, thanks!
Previous Topic:How to build Test Project
Next Topic:e4 dynamic menu contributions not work?
Goto Forum:
  


Current Time: Wed Sep 17 15:39:16 GMT 2014

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

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