-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add ability to Pin PopupDialog #1906
Add ability to Pin PopupDialog #1906
Conversation
Test Results 1 210 files ±0 1 210 suites ±0 1h 12m 36s ⏱️ + 19m 10s Results for commit 6656068. ± Comparison against base commit bc6e3ec. This pull request skips 3 tests.
♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user can not know which Window belongs to which context
Indeed, and it would be nice to improve it some time. But still this improvement is helpful, doesn't harm standard usage nor the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few issues with the current PR:
- Major one It changes menu for every popup dialog, even for those who probably never intended to be "pinned". I'm not sure
- On Linux it doesn't work as expected: once focus is lost, pinned dialog is closed (tried with the Quick Type Hierarchy).
- The menu text is not added to properties file.
- The checkbox "pinned" state seem to be persisted. Not sure this is intended, as "pinning" is most likely needed only for special occasions, not by default.
- Since pinning doesn't work for me I can't test how it would behave with multiple dialogs.
So far the major change I would expect here: this feature should be optional and client code should decide if it should be turned on.
Indeed, but actually, it may be occasionally useful be able to pin any pop-up dialog. Think about Ctrl+3 when you don't remember what you want to type in an need to close then reopen, or when using JDT open symbols.
OK, that's strange as I tested it works. But I will retry it with Quick Type hierarchy to make sure.
Missing
What do you mean by persisted? The status should only affect the current dialog and not be persisted from 1 dialog to the other. If it does, it's indeed a problem.
I think it's really making things much more complex than they have to be whule reducing the potential benefits of this feature to all PopupDialogs. |
The "Quick Text Hierarchy" seems to be a very particular case, it's actually the HierarchyInformationControl which itself implements JDT's AbstractInformationControl . This control seems to not close the dialog when clicking out, but instead just makes it invisible and reopens it later if it wasn't really closed (eg closed with Esc or an element got selected). Here is the stacktrace hiding the dialog instead of closing it (thus rendering "Pin" non-functional)
|
But this is an example of custom code that doesn't need "pin/close" actions and where adding actions that don't do anything would be understood as a bug by users. That is yet another reason to make the new code optional. |
ok. |
2bfa819
to
867f696
Compare
I've pushed a new patch taking an extra constructor flag. |
see consumer: eclipse-platform/eclipse.platform#1403 |
PR needs a rebase before merge anyway. |
Just quickly scanning through the code it seem OK. Couldn't test as the second PR can't be rebased on master. |
867f696
to
3974a68
Compare
57f6a99
to
8fca735
Compare
@iloveeclipse I'd like to merge this soon. Any issue left? |
I think this can have merits for many, if not all popup dialogs. As it could allow to eg easily compare Type hierarchies and so on. But it requires adoption from consumers to enable more use-cases. At least, this PR makes things possible.
As demoed in eclipse-platform/eclipse.platform#1403 , this works, at least in some cases; that may not be all of them, but at least cover the initial story that brought to this contribution (comparing values from 2 distinct executions).
That's because your example here only deals with "flat" objects which have a nice |
To be honest, I didn't know that it was possible to send an "evaluated" expression to this view. I always type code in so this gets re-evaluated on every context change.
They are often more usable to me, because they allow side by side comparison of values as trees, which is crucial in many cases. |
8fca735
to
b9dfa9b
Compare
@jukzi I think all your concerns about working or not and overall usability/usefulness were covered. Anything else? |
bundles/org.eclipse.jface/src/org/eclipse/jface/messages.properties
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix action name, the rest looks OK
In some circumstances (eg comparisons), users may want PopopDialogs to remain visible when switching attention to another area. This introduces an opt-in flag to present a "Pin dialog" menu (and a "Close") to allow the dialog to stick when users selects it. Fixes eclipse-platform#1905
b9dfa9b
to
6656068
Compare
I think it's more a topic for eclipse-platform/eclipse.platform#1403 , but I'll try to make it work as this can be useful.
IMO, this is acceptable. Auto-closing a pinned dialog would semantically be incorrect. Keeping the dialog open and having such message showing its content are outdated is consistent with expectation.
I don't think it's a major issue, and it's for sure not a regression. It would moreover be difficult to know what "Close All" mean: class all inspect windows, close all inspect windows for the current launch, close all pop-up dialogs...
I know that many people want a more efficient way to compare values from different stackframes/launches. I don't claim this is the perfect way, but I think it's a better way than everything we have so those people would be happy to use it.
Indeed. |
934ccc6
into
eclipse-platform:master
In some circumstances (eg comparisons), users may want PopopDialogs to remain visible when switching attention to another area. This introduces a "Pin dialog" menu (and a "Close") to allow the dialog to stick when users selects it.
Fixes #1905