Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart)
Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1078017] Fri, 02 August 2013 12:31 Go to next message
Xander Uiterlinden is currently offline Xander UiterlindenFriend
Messages: 6
Registered: July 2009
Junior Member
Currently I'm investigating whether using the e4 bridge is a feasible way of migrating our Eclipse 3.7 RCP application to Eclipse 4.

Therefore I took one of our simpler views and rewrote it to match the e4 programming model and tried the view both in a Eclipse 3.7 application using the e4 bridge as well as in an Eclipse 4 application.

The good news is all seems to be running fine in the Eclipse 4 application. The e4 bridge however seems to be lacking some functionality.

- I used DIViewPart to wrap my e4 View for Eclipse 3 use. DIViewPart does not seem to handle the @PreDestroy correctly since it only gets called on application exit rather than on closing the view. Copying the dispose() method from DIEditorPart seems to do the trick. Is there a reason it has not been implemented on DIViewPart ?

- I tried to use the @UIEventTopic annotation for handling events. Where this works fine in my Eclipse 4 application (it gets notified of all events subscribed to), in the Eclipse 3 application only one single event is received upon opening the view and all subsequent events are not offered to the handling method. A workaround is to obtain the EventBroker from the Eclipse context and subscribe there. But it would be much nicer to be able to use the @UIEventTopic annotation instead.

Please let me know if I can be of any assistance in solving these issues.
Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1079414 is a reply to message #1078017] Sun, 04 August 2013 14:49 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

both seems to be Bugs, let me look into it, I will get back to you...

Regards
Jonas

Am 02.08.2013 14:31, schrieb Xander Uiterlinden:
> Currently I'm investigating whether using the e4 bridge is a feasible
> way of migrating our Eclipse 3.7 RCP application to Eclipse 4.
>
> Therefore I took one of our simpler views and rewrote it to match the e4
> programming model and tried the view both in a Eclipse 3.7 application
> using the e4 bridge as well as in an Eclipse 4 application.
>
> The good news is all seems to be running fine in the Eclipse 4
> application. The e4 bridge however seems to be lacking some functionality.
>
> - I used DIViewPart to wrap my e4 View for Eclipse 3 use. DIViewPart
> does not seem to handle the @PreDestroy correctly since it only gets
> called on application exit rather than on closing the view. Copying the
> dispose() method from DIEditorPart seems to do the trick. Is there a
> reason it has not been implemented on DIViewPart ?

>
> - I tried to use the @UIEventTopic annotation for handling events. Where
> this works fine in my Eclipse 4 application (it gets notified of all
> events subscribed to), in the Eclipse 3 application only one single
> event is received upon opening the view and all subsequent events are
> not offered to the handling method. A workaround is to obtain the
> EventBroker from the Eclipse context and subscribe there. But it would
> be much nicer to be able to use the @UIEventTopic annotation instead.
>
> Please let me know if I can be of any assistance in solving these issues.
Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1079419 is a reply to message #1078017] Sun, 04 August 2013 14:57 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
One addtional question:
By Eclipse 3 application, do you mean a 3.7 application or an
Application running against the 4.3 compatibility layer?


Am 02.08.2013 14:31, schrieb Xander Uiterlinden:
> Currently I'm investigating whether using the e4 bridge is a feasible
> way of migrating our Eclipse 3.7 RCP application to Eclipse 4.
>
> Therefore I took one of our simpler views and rewrote it to match the e4
> programming model and tried the view both in a Eclipse 3.7 application
> using the e4 bridge as well as in an Eclipse 4 application.
>
> The good news is all seems to be running fine in the Eclipse 4
> application. The e4 bridge however seems to be lacking some functionality.
>
> - I used DIViewPart to wrap my e4 View for Eclipse 3 use. DIViewPart
> does not seem to handle the @PreDestroy correctly since it only gets
> called on application exit rather than on closing the view. Copying the
> dispose() method from DIEditorPart seems to do the trick. Is there a
> reason it has not been implemented on DIViewPart ?

>
> - I tried to use the @UIEventTopic annotation for handling events. Where
> this works fine in my Eclipse 4 application (it gets notified of all
> events subscribed to), in the Eclipse 3 application only one single
> event is received upon opening the view and all subsequent events are
> not offered to the handling method. A workaround is to obtain the
> EventBroker from the Eclipse context and subscribe there. But it would
> be much nicer to be able to use the @UIEventTopic annotation instead.
>
> Please let me know if I can be of any assistance in solving these issues.
Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1079434 is a reply to message #1079419] Sun, 04 August 2013 15:33 Go to previous messageGo to next message
Xander Uiterlinden is currently offline Xander UiterlindenFriend
Messages: 6
Registered: July 2009
Junior Member
It's a 3.7 application.
Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1079933 is a reply to message #1079434] Mon, 05 August 2013 08:54 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,
OK, in that case, I think the first bug is clear. About the second one:
When running under 3.x, IMHO, there should be no events published over
the EventBrooker, because there is no application model in the
background. Do you receive events if you explicitly subscribe to the
brooker?
Regards

Jonas

Am 04.08.2013 17:33, schrieb Xander Uiterlinden:
> It's a 3.7 application.
Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1080322 is a reply to message #1079933] Mon, 05 August 2013 19:58 Go to previous messageGo to next message
Xander Uiterlinden is currently offline Xander UiterlindenFriend
Messages: 6
Registered: July 2009
Junior Member
Jonas Helming wrote on Mon, 05 August 2013 04:54
Do you receive events if you explicitly subscribe to the
brooker?


Yes, when subscribing to the event broker explicitly all events are being delivered instead of just one.
Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1082196 is a reply to message #1080322] Thu, 08 August 2013 08:08 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,
that totally confuses me. If you run against 3.7, IMHO no events should
be published at all. There is no Application Model in the background.
Do you have a dedicated target platform for the 3.7 case, which contains
only 3.7 bundles?
Regards
Jonas

Am 05.08.2013 21:58, schrieb Xander Uiterlinden:
> Jonas Helming wrote on Mon, 05 August 2013 04:54
>> Do you receive events if you explicitly subscribe to the brooker?
>
>
> Yes, when subscribing to the event broker explicitly all events are
> being delivered instead of just one.
Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1082414 is a reply to message #1082196] Thu, 08 August 2013 14:35 Go to previous messageGo to next message
Eric Moffatt is currently offline Eric MoffattFriend
Messages: 118
Registered: July 2009
Senior Member
Which event topics are you trying to listen on ?

Unless DIViewPart somehow creates an MPart internally there you literally be no UIElement to publish changes about. Even should it then at best you'd get changes from that MPart only.
Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1082461 is a reply to message #1082414] Thu, 08 August 2013 15:47 Go to previous messageGo to next message
Xander Uiterlinden is currently offline Xander UiterlindenFriend
Messages: 6
Registered: July 2009
Junior Member
I'm subscribing to some topics specific to our application which are being posted to eventadmin. So I'm not talking about Eclipse specific events here but about event admin in general.

This actually does work when subscribing to the eventbroker obtained from the eclipse context, but when using the @UIEventTopic it doesn't work. However in an Eclipse 4 application it does.

[Updated on: Thu, 08 August 2013 15:49]

Report message to a moderator

Re: Issues using the e4 bridge (@PreDestroy and @UIEventTopic in DIViewPart) [message #1082952 is a reply to message #1082461] Fri, 09 August 2013 08:50 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi Xander,

sorry for asking all these questions, but now it finally makes sense to
me. Could you please create two bug reports and link them here. The one
with the @PreDestory is very simple to fix. For the other one, I will
have to create a test.
Regards
Jonas

Am 08.08.2013 17:47, schrieb Xander Uiterlinden:
> I'm subscribing to some topics specific to our application which are
> being posted to eventadmin. So I'm not talking about Eclipse specific
> events here but about event admin in general.
Previous Topic:plugin_customization.ini properties
Next Topic:Using e4 workbench model as basis for a web application
Goto Forum:
  


Current Time: Tue Mar 19 09:32:06 GMT 2024

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

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

Back to the top