Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » dirty parts sometimes not shown for saving on application closing(bug or desired behaviour: dirty parts sometimes not shown for saving on application closing)
dirty parts sometimes not shown for saving on application closing [message #1843593] Tue, 10 August 2021 07:06 Go to next message
Markus Seifert is currently offline Markus SeifertFriend
Messages: 1
Registered: August 2021
Junior Member
We have a problem with our Eclipse RCP application after we upgraded from Eclipse 4.5 to Eclipse 4.17 (2020-09). When closing our application the dirty parts are no longer handled in a (in our view) consistent way. It all depends on the fact if a dirty part is visible in the active perspective or not. Imagine the following scenarios with two dirty parts:

Scenario 1: Both dirty parts are visible when closing. When closing the application a dialog is shown to save both resources. That is the desired behaviour.

Scenario 2: Only one dirty part is visible then closing. When closing the application a dialog is shown to save the visible dirty part. When you save now, the application is closed and the changes of the non-visible part is lost. In this case the same dialog as in scenario 1 should be shown, since there are 2 dirty parts and not only one.

Scenario 3: Both dirty parts are not visible when closing and no other dirty parts are visible. Just like in scenario 1 a dialog to save both resources are shown.

When taking a look at the code, in Workbench.saveAllParts() the dirty parts are indirectly determined using the EPartService-instance. PartServiceImpl.getParts() determines the Parts using the searchFlags 'EModelService.OUTSIDE_PERSPECTIVE | EModelService.IN_ACTIVE_PERSPECTIVE | EModelService.IN_SHARED_AREA'. So it looks like dirty parts, that are not visible right at this moment, are ignored. I wrote some code that uses EModelService.ANYWHERE instead as the searchFlags-value and in the resulting list all dirty parts are contained for all of the 3 scenarios. This also applies to the most current code I found in the git repository of Eclipse. So there shouldn't be a difference to a newer version that 4.17.

I was wondering if this is a bug or desired behaviour?
Re: dirty parts sometimes not shown for saving on application closing [message #1843676 is a reply to message #1843593] Fri, 13 August 2021 11:52 Go to previous message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
Sounds like a bug to me (even a regression because it used to work before). Please open a bug report.
Previous Topic:Bundle lib uses getSystemResource
Next Topic:Duplicate toolbars
Goto Forum:
  


Current Time: Fri Dec 27 00:18:14 GMT 2024

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

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

Back to the top