Skip to content

Conversation

@Phillipus
Copy link
Contributor

@Phillipus Phillipus commented Jan 3, 2026

Added this as requested here.

Not sure about how these things are named so called it the next in line Snippet 389 (Edit - now Snippet 390)

Please let me know if any changes required.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

Test Results

  176 files  ±0    176 suites  ±0   27m 43s ⏱️ + 2m 16s
4 672 tests ±0  4 650 ✅ ±0  22 💤 ±0  0 ❌ ±0 
  482 runs  ±0    476 ✅ ±0   6 💤 ±0  0 ❌ ±0 

Results for commit 069a87e. ± Comparison against base commit 892be33.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@ShahzaibIbrahim ShahzaibIbrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to add the entry for this snippet in snippet.md for this snippet to be accessible from SnippetExplorer.

Look this: #2912 for the reference.

@Phillipus
Copy link
Contributor Author

I think you need to add the entry for this snippet in snippet.md for this snippet to be accessible from SnippetExplorer.

Look this: #2912 for the reference.

Thanks. As Snippet389 is taken already I changed this one to Snippet390.

Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing the snippet.

import org.eclipse.swt.widgets.Shell;

/**
* <p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* <p>

The SnippetExplorer uses the first line of the Javadoc as the description of the snippet, so

would not look that nice :-)

image

@@ -0,0 +1,85 @@
/*******************************************************************************
* Copyright (c) 2025 Eclipse Platform Contributors and others.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (c) 2025 Eclipse Platform Contributors and others.
* Copyright (c) 2026 Eclipse Platform Contributors and others.

- [compare algorithms for rendering disabled images](https://github.com/eclipse-platform/eclipse.platform.swt/tree/master/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet384.java)[(preview)](https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/examples/org.eclipse.swt.snippets/previews/Snippet384.png "Preview for Snippet 384")
- [draw an image with watermark using ImageGcProvider](https://github.com/eclipse-platform/eclipse.platform.swt/tree/master/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet385.java)[(preview)](https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/examples/org.eclipse.swt.snippets/previews/Snippet385.png "Preview for Snippet 385")
- [options for programmatically creating an image](https://github.com/eclipse-platform/eclipse.platform.swt/tree/master/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet387.java)[(preview)](https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/examples/org.eclipse.swt.snippets/previews/Snippet387.png "Preview for Snippet 387")
- [draw an image from an SVG file](https://github.com/eclipse-platform/eclipse.platform.swt/tree/master/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet390.java)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a screenshot of the snippet and add it here as - [(preview)](https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/examples/org.eclipse.swt.snippets/previews/Snippet390.png "Preview for Snippet 390")?
That preview will also automatically be shown in the SnippetExplorer, which otherwise lacks a preview image.

@Phillipus
Copy link
Contributor Author

Changes made. Getting there... ;-)

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.

3 participants