eclipse / reddeer

RedDeer Project
Eclipse Public License 2.0
40 stars 43 forks source link

PreferenceDialog does currently not support pop-ups after saving before focus on parent shell #2227

Closed thahnen closed 7 months ago

thahnen commented 7 months ago

Issue

We implemented our own preference pages which show a pop-up once "Apply and Close" is clicked. The user has to acknowledge it and then is released back to the main window.

The problem is that Reddeer currently does not support that behavior, as PreferenceDialog.ok() always awaits the focus to be given back to the main window.

Proposed solution

Add an additional PreferenceDialog.ok(Shell followUpShell) implementation for this case. If you agree with me that this is a valid option, I can implement it myself.

odockal commented 7 months ago

@thahnen Hello there! Thanks for reporting the issue. If you could propose a PR yourself, that would be the best since we are not anymore involved in RedDeer. I can try to then do a review and if merged, you could get nightly bits to test. But I am not sure that I will be able to do a release. Depending on if we want to rebuild reddeer against latest eclipse or against last version that worked. We can try but I am not promising anything. wdyt?

thahnen commented 7 months ago

Hi @odockal,

thank you very much for the quick response. I'm going to propose a PR, which might take a few days. Regarding that you're not involved in Reddeer anymore (I've also seen some messages that it is not maintained), is there any official news? I couldn't find anything here in the repo or on the Eclipse website.

odockal commented 7 months ago

Add an additional PreferenceDialog.ok(Shell followUpShell) implementation for this case. If you agree with me that this is a valid option, I can implement it myself.

Solution looks fine, we just need to make sure not to break API. Adding new method is fine as long as we keep the functionality untouched for actual users of that call.

Reddeer anymore (I've also seen some messages that it is not maintained), is there any official news? I couldn't find anything here in the repo or on the Eclipse website.

We have sent some mail on the mailing list to the reddeer-dev and to the eclipse's cross-project-issues-dev. But I agree we can be more sound about such important change. updating readme maybe can improve the state.

odockal commented 7 months ago

@thahnen Here is the email: https://www.eclipse.org/lists/cross-project-issues-dev/msg19742.html

thahnen commented 7 months ago

Hi @odockal,

We reconsidered based on the information about Reddeer being not maintained anymore (let's hope there will be someone to maintain it again 🤞). I won't propose a PR for now.

We went with a different intermediate solution not breaking anything (that might be interesting for others as well): Instead of the pop-up showing up directly (in tests handled via a timeout system property, not in production) we give Reddeer some time to let the focus go back to the main window and then just have a WaitUntil condition afterward for the pop-up to "show" up.

When we have some time, we might reconsider this and I'll get back to this issue. For now, I will close it.

thahnen commented 7 months ago

@odockal maybe it is worth adding the information about the maintenance status to the README 👍

odockal commented 7 months ago

@thahnen -> https://github.com/eclipse/reddeer?tab=readme-ov-file#at-this-time-reddeer-is-not-actively-maintained