Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Re: Save reference of input of a Part
Re: Save reference of input of a Part [message #896810] Thu, 19 July 2012 17:45 Go to next message
Eclipse UserFriend
All context informations are temporary and not saved (most of them could
be saved at all).

You store informations directly in the MPart associated with your part
by creating something like this in your class

class MyPart {
@Inject
public MyPart(MPart p) {
....
}

@PersistState
void persist(MPart part) {
part.getPersistedState()
}
}

So when you create you part using the handler before showing it I'd also
set the informations instead of using the IEclipseContext.

The other option you have is to create an MInputPart which has a url field.

You better ask e4 questions on the e4 newsgroup.

Tom

Am 19.07.12 18:26, schrieb Valerio Santinelli:
> Hello,
>
> I'm slowly trying to port an existing RCP application to the 4.2
> framework and I can't understand one important thing.
>
> I have a handler that is being called to open a new part. Before showing
> the part, I inject the input needed by that part in the application
> context and then i show the part and it works fine.
>
> I then close the application and reopen it. When the application reopens
> the part that whose state was saved by the workbench, I get an error
> saying that it can't inject the input property because it can't be found
> in the context. How am I supposed to persist it?
> Thanks in advance!
>
Re: Save reference of input of a Part [message #896854 is a reply to message #896810] Fri, 20 July 2012 03:16 Go to previous messageGo to next message
Eclipse UserFriend
Hi Tom,
where is the e4 newsgroup? The link in Eclipsepedia just points back to the forum.
Re: Save reference of input of a Part [message #896860 is a reply to message #896854] Fri, 20 July 2012 03:41 Go to previous messageGo to next message
Eclipse UserFriend
There it is:
news://news.eclipse.org/eclipse.e4
Re: Save reference of input of a Part [message #896861 is a reply to message #896854] Fri, 20 July 2012 03:45 Go to previous message
Eclipse UserFriend
You are already here - this was just a copy over from rcp newsgroup ;-)

Tom

Am 20.07.12 09:16, schrieb Christoph Keimel:
> Hi Tom,
> where is the e4 newsgroup? The link in Eclipsepedia just points back to
> the forum.
Previous Topic:E4 how to layout parts in a perspective
Next Topic:Using ESelectionService.setSelection(null) for DI?
Goto Forum:
  


Current Time: Fri Jul 04 23:05:23 EDT 2025

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

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

Back to the top