[
https://issues.jboss.org/browse/JBIDE-21399?page=com.atlassian.jira.plugi...
]
Viacheslav Kabanovich edited comment on JBIDE-21399 at 1/5/16 7:45 PM:
-----------------------------------------------------------------------
Editor is saved in a separate job that can be executed while shown in modal dialog or in
background depending on preference RUN_IN_BACKGROUND. The fix should be tested in both
modes. Unfortunately, I cannot find this preference in Preferences dialog.
OpenShiftResourceDocumentProvider.SaveOperation sets info.fCanBeSaved=false when
doSaveDocument() returns, it can happen before or after job is completed. If in some use
case SaveOperation is the last one to touch info.fCanBeSaved, the fix will not work.
Anyway, trying to fix the issue with setting info.fCanBeSaved and firing state changed
event seems the best approach.
Maybe this can protect from uncertainty:
1. In the beginning of doSaveDocument create
final Exception[] exc = new Exception[1];
2. In catch block of jobs set
exc[0] = e;
3. In the end of doSaveDocument check:
if(exc[0] != null) {
throw new CoreException(
);
}
was (Author: scabanovich):
Editor is saved in a separate job that can be executed while shown in modal dialog or in
background depending on preference RUN_IN_BACKGROUND. The fix should be tested in both
modes. Unfortunately, I cannot find this preference in Preferences dialog.
OpenShiftResourceDocumentProvider.SaveOperation sets info.fCanBeSaved=false when
doSaveDocument() returns, it can happen before or after job is completed. If in some use
case SaveOperation is the last one to touch info.fCanBeSaved, the fix will not work.
Anyway, trying to fix the issue with setting info.fCanBeSaved and firing state changed
event seems the best approach.
Editor should be shown as dirty if saving of modified resource
failed
---------------------------------------------------------------------
Key: JBIDE-21399
URL:
https://issues.jboss.org/browse/JBIDE-21399
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.3.0.Final
Reporter: Marián Labuda
Assignee: Fred Bricon
Fix For: 4.3.1.Beta2
After editing resource to inappropriate state and save it, there is an error that update
of a resource failed but content of text editor is saved and its state does not reflect
current state of resource on OS 3 server. If update of a resource was not successful,
opened text editor with the given resource json should be still shown as dirty.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)