Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » IEventBroker inside of the LifeCycle?
IEventBroker inside of the LifeCycle? [message #1008635] Wed, 13 February 2013 11:19 Go to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
Hello!
I tried to use the IEventBroker inside of the LifeCycleManader, to know about

But my trigger is never executed when the application windows is shown.

Why doesn't it work? Any Ideas?

    @PostConstruct
    void postConstruct(final IEclipseContext context) {

        IEventBroker broker = context.get(IEventBroker.class);
        broker.subscribe(UIEvents.UILifeCycle.BRINGTOTOP, new EventHandler() {
            @Override
            public void handleEvent(Event event) {
                Shell shell = context.get(Shell.class);
                System.out.println("Bringtop");
            }
        });
    }
Re: IEventBroker inside of the LifeCycle? [message #1009248 is a reply to message #1008635] Thu, 14 February 2013 18:52 Go to previous messageGo to next message
Eclipse UserFriend
The life cycle manager uses a separate set of annotations. See:

http://wiki.eclipse.org/Eclipse4/RCP/Lifecycle

Brian,
Re: IEventBroker inside of the LifeCycle? [message #1009730 is a reply to message #1009248] Fri, 15 February 2013 15:51 Go to previous messageGo to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
I am aware of that, but there is no BRINGTOTOP annotation among of them?
Re: IEventBroker inside of the LifeCycle? [message #1009741 is a reply to message #1009730] Fri, 15 February 2013 16:09 Go to previous message
Eclipse UserFriend
My apologies -- I thought your trigger was referring to your postConstruct() method not being fired.

If you mean BRINGTOTOP being fired, then no, it is only fired by a call to EModelService.bringToTop().

You probably want to listen for UIEvents.ElementContainer.TOPIC_SELECTEDELEMENT.

Brian.
Previous Topic:Window icons in several sizes
Next Topic:Eclipse Service with DI
Goto Forum:
  


Current Time: Tue Mar 19 10:22:03 GMT 2024

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

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

Back to the top