eclipse-platform / eclipse-platform/eclipse.platform

The workspace will exit with unsaved changes in this session.

Open
#865 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
165
Forks
174
Avg merge
2d 8h
Merged PRs (30d)
22

Description

I regularly get "The workspace will exit with unsaved changes in this session." when using Eclipse in an embedded environment (Tycho) but this can also be seen in various test-cases of platform itself.

The problem seems to that the Workspace expect that "something" is happen on shutdown and even though there is the WorkspaceSave job that regularly saves the state it seem not to happen on shutdown of the bundle.

Currently I do `ResourcesPlugin.getWorkspace().save(true, new NullProgressMonitor());` in the user code, but this has of course several drawbacks:

1. If I do not use the workspace at all this call would init the workspace just to save it
2. After that call theoretically something can "dirty" the workspace again

What I'm wondering is if the `ResourcePlugin` itself in its shutdown sequence can't perform that action itself? The plugin itself should be able to best decide if/what needs to be saved and at the moment it seems to be already notice that there *was* a change ...

Another option of course would be to have some `TRANSIENT_WORKSPACE` preference one can set that tells the `ResourcePlugin` to never persist any changes (what would be fine for tests and for Tycho as well).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.