Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not store preferences when workspace has already stopped #6464

Merged
merged 1 commit into from
Sep 28, 2017

Conversation

vzhukovs
Copy link
Contributor

What does this PR do?

This changes proposal fix the problem when IDE could rewrite IDE state when workspace has already stopped. It means that when workspace stops, IDE stores opened files to the preferences and when it looses the focus - state could be rewritten with empty values.

Signed-off-by: Vladyslav Zhukovskyi vzhukovs@redhat.com

What issues does this PR fix or reference?

#6461

Changelog

Do not store preferences when workspace has already stopped

Release Notes

N/A

Docs PR

N/A

Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
@vzhukovs vzhukovs added kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. team/plugin labels Sep 27, 2017
@vzhukovs vzhukovs self-assigned this Sep 27, 2017
@@ -481,7 +490,10 @@ public ActiveRuntime getActiveRuntime() {

@Override
public void onWindowClosing(WindowActionEvent event) {
appStateManager.get().persistWorkspaceState(getWorkspaceId());
Workspace workspace = getWorkspace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What reason call getWorkspace() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because, onWindowClosing may be called when workspace has stopped. And calling getWorkspaceId will throw an exception, because current workspace if not provided. So we'll be on the safe side, we'll check if we have a workspace as initialized object.

@codenvy-ci
Copy link

@vzhukovs vzhukovs merged commit a8516c3 into master Sep 28, 2017
@vzhukovs vzhukovs deleted the che#6461 branch September 28, 2017 07:57
@vzhukovs vzhukovs added this to the 5.19.0 milestone Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants