Skip to content

Add JFace snippet for a notification popup that follows its shell#4141

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:notification-popup-follows-shell-snippet
Open

Add JFace snippet for a notification popup that follows its shell#4141
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:notification-popup-follows-shell-snippet

Conversation

@vogella

@vogella vogella commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Adds Snippet086 to the JFace snippets, showing how to keep a NotificationPopup anchored to a top-level shell while the window is moved or resized. The stock NotificationPopup only positions itself once when it opens; the snippet installs a ControlListener that re-anchors the popup to the shell's bottom-right corner on every move and resize, and removes the listener again when the popup closes. The JFaceSnippets documentation page gets a matching entry under the Notification section.

Snippet086 keeps a NotificationPopup anchored to the bottom-right corner of a top-level shell by re-positioning it from a ControlListener whenever the shell is moved or resized.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   855 files  ±0     855 suites  ±0   51m 34s ⏱️ - 5m 19s
 8 083 tests ±0   7 840 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 151 runs  ±0  19 497 ✅ ±0  654 💤 ±0  0 ❌ ±0 

Results for commit 7ad628b. ± Comparison against base commit 3597fcf.

@laeubi

laeubi commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The stock NotificationPopup only positions itself once when it opens

So if it is desired behavior that it keeps at that position maybe the NotificationPopup better is enhanced than letting users install custom code?

@vogella

vogella commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

The stock NotificationPopup only positions itself once when it opens

So if it is desired behavior that it keeps at that position maybe the NotificationPopup better is enhanced than letting users install custom code?

IIRC from reading the user guides during the notification API migration from Mylyn to platform the "desired" behavior is not to move the notification so I would leave it as an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants