Skip to main content


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 SanFriend
Messages: 119
Registered: January 2012
Senior 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 SchindlFriend
Messages: 6651
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 SanFriend
Messages: 119
Registered: January 2012
Senior 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 SchindlFriend
Messages: 6651
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 SanFriend
Messages: 119
Registered: January 2012
Senior Member
Cool, thanks!
Previous Topic:How to build Test Project
Next Topic:e4 dynamic menu contributions not work?
Goto Forum:
  


Current Time: Thu Apr 25 12:22:35 GMT 2024

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

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

Back to the top