Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » @PreClose in PartDescriptor
@PreClose in PartDescriptor [message #1697983] Wed, 10 June 2015 06:22 Go to next message
Bartlomiej Cichocki is currently offline Bartlomiej CichockiFriend
Messages: 23
Registered: April 2015
Junior Member
Hello,

Can I use annotation @PreClose (org.eclipse.fx.ui.workbench.services.lifecycle.annotation.PreClose) in PartDescriptor?

@PreClose
public boolean preClose()
{
System.out.println( "Pre close " );
return false;
}

Unfortunately it does not work for me now.
Bug 469798
Re: @PreClose in PartDescriptor [message #1697987 is a reply to message #1697983] Wed, 10 June 2015 07:13 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

Hm can you show me more code? I know for sure that it works on MPart but
it could be that we miss MParts who are created through MPartDescriptors!

Let's follow up on the bug report!

Tom

On 10.06.15 08:22, Bart Cichy wrote:
> Hello,
>
> Can I use annotation @PreClose
> (org.eclipse.fx.ui.workbench.services.lifecycle.annotation.PreClose) in
> PartDescriptor?
>
> @PreClose
> public boolean preClose()
> {
> System.out.println( "Pre close " );
> return false;
> }
>
> Unfortunately it does not work for me now.
> Bug 469798
Re: @PreClose in PartDescriptor [message #1698028 is a reply to message #1697987] Wed, 10 June 2015 13:16 Go to previous messageGo to next message
Bartlomiej Cichocki is currently offline Bartlomiej CichockiFriend
Messages: 23
Registered: April 2015
Junior Member
ok, template app in bugzilla
Re: @PreClose in PartDescriptor [message #1698107 is a reply to message #1698028] Thu, 11 June 2015 10:51 Go to previous messageGo to next message
Bartlomiej Cichocki is currently offline Bartlomiej CichockiFriend
Messages: 23
Registered: April 2015
Junior Member
Quote:
Hm can you show me more code? I know for sure that it works on MPart but
it could be that we miss MParts who are created through MPartDescriptors!

Maybe I do it some wrong? I just add the package org.eclipse.fx.ui.workbench.services.lifecycle.annotation to the manifest and add method which is adnotated as @PreClose.
It does not work on MPart too.
Re: @PreClose in PartDescriptor [message #1698226 is a reply to message #1698107] Fri, 12 June 2015 10:56 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

Yes and no. You did something wrong but I opted to make your useage a
working one with changes to the ELifecycleService.

For those not following the bug the longer story is:
> 1. The way you tried to use it on MPart is (or better said was wrong see below)
> 2. MPartDescriptors did not work and has been fixed
>
> http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/commit/?id=a866915e70f3e61d2e05aca89ae7687be815e3d8
>
> On 1. Lifecycle stuff was implemented in a way that if could only be added through ELifecycleService and/or LifecycleAddon & the tag slots. I've extended the evaluation to also try the instance if the MUIElement is a MContribution so your code should now work!
>
> I've also documeted the stuff better at https://wiki.eclipse.org/Efxclipse/Runtime/e4#ELifecycleService where I advices to go with the model & tags instead of directly using the annotations inside your MPart-Object

Tom

On 11.06.15 12:51, Bartlomiej Cichocki wrote:
> Quote:
>> Hm can you show me more code? I know for sure that it works on MPart but
>> it could be that we miss MParts who are created through MPartDescriptors!
>
> Maybe I do it some wrong? I just add the package
> org.eclipse.fx.ui.workbench.services.lifecycle.annotation to the
> manifest and add method which is adnotated as @PreClose.
> It does not work on MPart too.
Previous Topic:logging with custom handlers
Next Topic:initModality in PartDescriptor (for new window)
Goto Forum:
  


Current Time: Tue Jan 14 22:54:30 GMT 2025

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

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

Back to the top