Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Problem using new transient ui element feature(Problem using new transient ui element feature)
Problem using new transient ui element feature [message #1809155] Wed, 10 July 2019 09:47 Go to next message
Stefan Folkesson is currently offline Stefan FolkessonFriend
Messages: 1
Registered: July 2019
Junior Member
Hi,

In eclipse 4.11, there is a new feature where a ui element can be marked to not be persisted (https://www.eclipse.org/eclipse/news/4.11/platform_isv.php)

part.getPersistedState().put(IWorkbench.PERSIST_STATE, "false");

When I use this feature, the view will not be persisted to the workbench.xmi file, but eclipse still persists that this view was selected in the partstack when I closed the application and when I restart, the application throws an exception and resets the perspective together with all other views which should be persisted.

Here is the tag that cannot be parsed by eclipse
<children xsi:type="basic:PartStack" xmi:id="_PYv99KL2EemRTJKPOqiKJQ" elementId="persist.partstack.sample" contributorURI="platform:/plugin/persist" containerData="5000" selectedElement="_PYv99qL2EemRTJKPOqiKJQ">

The exception mentions the ID in selectedElement

Is this a glitch in the new feature or am I missing something?

Here is the exception
Caused by: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '_PYv99qL2EemRTJKPOqiKJQ'. (file:/C:/Users/stefan.folkesson/runtime-persist.product/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi, 8, 219)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1197)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1282)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 20 more


I have attached an example project with two views. One is always open and should be persisted. The other is opened through the open command and is marked not to be persisted, see OpenHandler.java.

To reproduce the error, open the second view (leave the new view selected in the partstack), close the application, and open the application again. This gives the exception and the perspective is reset.
  • Attachment: persist.zip
    (Size: 70.22KB, Downloaded 5 times)
Re: Problem using new transient ui element feature [message #1809350 is a reply to message #1809155] Sat, 13 July 2019 19:29 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 62
Registered: April 2012
Member
This is a bug, please create a new bug for Eclipse - Platform - UI, at https://bugs.eclipse.org/bugs/
Re: Problem using new transient ui element feature [message #1810409 is a reply to message #1809350] Fri, 09 August 2019 16:42 Go to previous message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 62
Registered: April 2012
Member
I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=549943
Previous Topic:Is deferring method injection after PostConstruct possible?
Next Topic: integrating custom help on click of next and previous in custom spring boot wizard
Goto Forum:
  


Current Time: Mon Dec 09 07:55:57 GMT 2019

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

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

Back to the top