Community
Participate
Working Groups
To reproduce: 1. Create a Test Suite 2. Add a Replace Text module to the test suite, and in the datasets view, enter a value for TEXT. 3. Save the Test Suite -- The selection in the editor is no longer on the Replace Text module, but the datasets view (and properties, and component names view) still show the data as if it were -- 4. Without reselecting the Replace text module, edit the entry in the datasets view and save 5. Select the Replace Text module -> the changed data has not been saved. If steps 1-3 are repeated and the Replace Text module is selected before editing further, then all changes are saved. My suggestion would be that we retain the selection in the editor after saving so that users can continue working where they were without having to reselect and without losing data.
This issue is not only related to the selection not being set correctly when saving in the TSE / TCE. I made the necessary modifications (see the attached git patch) and that did not help to resolve this issue - it seems as if the properties view does either not update / or correctly react on the newly set selection. As I won't be able to continue working on this issue for the next three weeks I am re-assigning this bug to the default assignee. I am also adjusting the priority as it's currently planned in as a normal sprint task (--> p2).
Created attachment 221340 [details] Partial fix for this issue
Upon closer investigation, I've noticed that the selection service only really tracks selection changes for the active part (see o.e.ui.internal.AbstractSelectionService#setActivePart(...)). The problem seems to be that the editor is not the active part when the save operation is triggered. This is often the case when editing data using the Properties View, as the user tends to activate a cell editor in the Properties View, make the necessary changes, press Enter, and then press Ctrl + S to save (the Properties View being the active view part at the time the save operation is triggered). This can be demonstrated by adding a step 2.5 to the steps to reproduce in comment 0: 2.5. Activate the Test Suite Editor by clicking in the editor's tab (no need to actually click inside the editor and possibly change the selection therein). With this step, the problem no longer occurs (although the unnecessary selection change without the patch from Markus is still kind of annoying). I'm planning to look into how to change this so that the Properties View updates itself even though it is the currently active part. I was also able to reproduce this problem using the Data Sets View, and I suspect that the Component Names View is also affected.
On second thought, trying to work around the Selection Service seems like a fragile hack. I've been thinking about why this poses a problem for our editors and whether I should file a bug with Platform UI. Then it occurred to me why other (resource-based) editors aren't having this problem: They're not tinkering with the editor input and selection while the editor is being saved. After a save, both the editor input and the selection stay the same, so the Properties View's (as well as other PageBook views') state and contents are still valid. I'm shifting my focus for this bug from outsmarting the Selection Service and Properties View to keeping a consistent editor state when saving.
fixed on master with: http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=f8b61cf07b1ee1c19a4746f2eca29037d9ed8118 Due to the potential for new errors in a scenario with concurrent users and the effort required to specify and test such scenarios, I consider this commit too risky to include in any release before Kepler. If we get enough automated tests in this direction, then we may be able to apply this for Juno SR2.
Comment on attachment 221340 [details] Partial fix for this issue Marking patch as obsolete as it was not used in the solution. Since the editor is not completely reloaded, the selection does not change.
Tested, i was not able to reproduce the described behavior neither by following the given steps nor by trying other ways.