Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » E4 persistence state load issues
E4 persistence state load issues [message #1778040] Fri, 08 December 2017 13:59 Go to next message
Josselin Kerdraon is currently offline Josselin KerdraonFriend
Messages: 29
Registered: February 2016
Junior Member
Hi,

I'm developing a pure-e4 application. I create my views in model fragments, using placeholders to insert them in each perspective.
I wanted to test the workspace persistence system, but when I restart the app, there is a bug, probably due to placeholders.

I catch an IllegalArgumentException when model calls bringToTop function for a view created with a placeholder.

If we see the code of the function:

	@Override
	public void bringToTop(MUIElement element) {
		if (element instanceof MApplication) {
			return;
		}

		MWindow window = getTopLevelWindowFor(element);
		if (window == element) {
			if (!element.isToBeRendered()) {
				element.setToBeRendered(true);
			}

			window.getParent().setSelectedElement(window);
		} else {
			showElementInWindow(window, element);
		}
		UIEvents.publishEvent(UIEvents.UILifeCycle.BRINGTOTOP, element);
	}



"element" is the view. getTopLevelWindowFor(element) returns null, so showElementInWindow(window, element); throws an exception.

I guess this problem happens beacause I use Placeholders and fragments. Am I doing something that is not possible ?

EDIT: When I clear persisted state the container of the view is the Trimmed Window. That's why getTopLevelWindowFor doesn't return null.
But when a persisted state is loaded the container is StringModelFragmentImpl....

[Updated on: Fri, 08 December 2017 15:29]

Report message to a moderator

Re: E4 persistence state load issues [message #1778050 is a reply to message #1778040] Fri, 08 December 2017 16:05 Go to previous message
Josselin Kerdraon is currently offline Josselin KerdraonFriend
Messages: 29
Registered: February 2016
Junior Member
Problem solved. I just added a property to my fragments in the plugin.xml:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=469229
Previous Topic:E4 Application Model issues
Next Topic:Eclipse Neo Scada
Goto Forum:
  


Current Time: Sat Nov 17 08:27:42 GMT 2018

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

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

Back to the top