Skip to content

Replace manual image instantiation of Image in AsynchronousViewer and TreeModelLabelProvider with createImage() for better scaling of icons#1892

Merged
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
vi-eclipse:bug/arunjose696/199/ImageDescriptors
Jun 9, 2025
Merged

Replace manual image instantiation of Image in AsynchronousViewer and TreeModelLabelProvider with createImage() for better scaling of icons#1892
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
vi-eclipse:bug/arunjose696/199/ImageDescriptors

Conversation

@arunjose696
Copy link
Copy Markdown
Contributor

@arunjose696 arunjose696 commented Jun 4, 2025

Replaced direct image creation using new Image(..., descriptor.getImageData()) with descriptor.createImage() in both AsynchronousViewer and TreeModelLabelProvider. This change ensures that icons now render sharply even at higher zoom levels (e.g., 225%).

Screenshots at 225% (I have circled in red in the first image for the icon that is being affected with the change)


Current Behavior

After This Change

Steps to Reproduce
To observe the change in AsynchronousViewer, run the Memory View in Eclipse CDT. The icons are shown during debugging when a C++ application is monitored with memory watches, and the variable’s memory address changes.

While it requires some effort to set up, the change itself is minimal and self-explanatory.

Contributes to: vi-eclipse/Eclipse-Platform#199

@arunjose696 arunjose696 force-pushed the bug/arunjose696/199/ImageDescriptors branch 2 times, most recently from a8d2162 to cf93e41 Compare June 4, 2025 12:30
@arunjose696
Copy link
Copy Markdown
Contributor Author

arunjose696 commented Jun 4, 2025

The change in TreeModelLabelProvider can be seen in more places, eg in icons of the breakpoints. Below are images in 225% zoom


Current Behavior

After This Change

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2025

Test Results

 1 893 files  ±0   1 893 suites  ±0   1h 27m 44s ⏱️ - 3m 5s
 4 381 tests ±0   4 357 ✅ ±0   24 💤 ±0  0 ❌ ±0 
13 143 runs  ±0  12 976 ✅ ±0  167 💤 ±0  0 ❌ ±0 

Results for commit 65cf0a9. ± Comparison against base commit 4ed0923.

♻️ This comment has been updated with latest results.

@arunjose696 arunjose696 changed the title Replace manual image instantiation with createImage() for better scaling Replace manual image instantiation of Image in AsynchronousViewer and TreeModelLabelProvider with createImage() for better scaling of icons Jun 4, 2025
Copy link
Copy Markdown
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.

Good catch, thank you! The change looks good.

@arunjose696 can you please remove the reference to the "external" vi-eclipse GitHub organization from the commit message?

@arunjose696 arunjose696 force-pushed the bug/arunjose696/199/ImageDescriptors branch from cf93e41 to f9b08d8 Compare June 5, 2025 13:51
@arunjose696
Copy link
Copy Markdown
Contributor Author

Good catch, thank you! The change looks good.

@arunjose696 can you please remove the reference to the "external" vi-eclipse GitHub organization from the commit message?

done.

@arunjose696 arunjose696 closed this Jun 5, 2025
@arunjose696 arunjose696 reopened this Jun 5, 2025
@HeikoKlare HeikoKlare force-pushed the bug/arunjose696/199/ImageDescriptors branch from f9b08d8 to 568753f Compare June 5, 2025 13:58
@eclipse-platform-bot
Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 662132da1b71f18a371cbe21f0b705f62cfa8545 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Thu, 5 Jun 2025 14:03:25 +0000
Subject: [PATCH] Version bump(s) for 4.37 stream


diff --git a/debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF
index 9474268cec..82916aa04e 100644
--- a/debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true
-Bundle-Version: 3.18.800.qualifier
+Bundle-Version: 3.18.900.qualifier
 Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.49.0

Further information are available in Common Build Issues - Missing version increments.

@HeikoKlare HeikoKlare force-pushed the bug/arunjose696/199/ImageDescriptors branch 2 times, most recently from fe0689f to 8245679 Compare June 6, 2025 14:47
Replaced direct image creation using new
Image(...,descriptor.getImageData()) descriptor.getImageData()) with
descriptor.createImage() in AsynchronousViewer and
TreeModelLabelProvider. This change makes icons now render sharply even
at higher zoom levels (e.g.,225%).
@HeikoKlare HeikoKlare force-pushed the bug/arunjose696/199/ImageDescriptors branch from 8245679 to 65cf0a9 Compare June 9, 2025 07:48
@HeikoKlare HeikoKlare merged commit 2a1400a into eclipse-platform:master Jun 9, 2025
18 checks passed
@HeikoKlare HeikoKlare deleted the bug/arunjose696/199/ImageDescriptors branch June 9, 2025 08:40
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