Skip to content

Make Terminal operate on and cache colors instead of RGB values#2481

Merged
HeikoKlare merged 1 commit intoeclipse-platform:masterfrom
vi-eclipse:color-terminal
Mar 4, 2026
Merged

Make Terminal operate on and cache colors instead of RGB values#2481
HeikoKlare merged 1 commit intoeclipse-platform:masterfrom
vi-eclipse:color-terminal

Conversation

@HeikoKlare
Copy link
Contributor

No description provided.

RGB rgb = null;
if (fPreferenceStore != null) {
try {
rgb = StringConverter.asRGB(
Copy link
Contributor

Choose a reason for hiding this comment

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

should this here not be an color already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's an RGB value that is later wrapped into a color.

@@ -694,7 +695,7 @@
if (rgb == null) {
rgb = TerminalColorPresets.INSTANCE.getDefaultPreset().getRGB(terminalColor);
Copy link
Contributor

Choose a reason for hiding this comment

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

here as well ...

Comment on lines +88 to +89
Color defaultFg = fStyleMap.getForegroundColor(null);
doubleBufferGC.setForeground(defaultFg);
Copy link
Contributor

Choose a reason for hiding this comment

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

as we have Color getDefaultBackgroundColor() should the not better be a Color getForegroundColor() as well?

This would prevent repeating the code used here and in setupGC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a repetition as here it's about the default color (style == null) and in setupGC its the style-specific color. We can of course introduce additional methods like getDefaultForegroundColor() or the like, but it's will only be for consistency, not for reuse.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Test Results

 1 980 files  ±0   1 980 suites  ±0   1h 30m 56s ⏱️ - 9m 40s
 4 750 tests ±0   4 726 ✅ ±0   24 💤 ±0  0 ❌ ±0 
14 250 runs  ±0  14 068 ✅ ±0  182 💤 ±0  0 ❌ ±0 

Results for commit 6f9f2ef. ± Comparison against base commit 54d8cdd.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review March 2, 2026 12:50
@eclipse-platform-bot
Copy link
Contributor

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

terminal/bundles/org.eclipse.terminal.control/META-INF/MANIFEST.MF
terminal/features/org.eclipse.terminal.feature/feature.xml

Warning

🚧 This PR cannot be modified by maintainers because edits are disabled or it is created from an organization repository. To obtain the required changes apply the git patch manually as an additional commit.

Git patch
From a6f648699297d8ba9f107deb0ed3c87eb4d07b01 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Mon, 2 Mar 2026 12:57:10 +0000
Subject: [PATCH] Version bump(s) for 4.40 stream


diff --git a/terminal/bundles/org.eclipse.terminal.control/META-INF/MANIFEST.MF b/terminal/bundles/org.eclipse.terminal.control/META-INF/MANIFEST.MF
index 7e5c81cce0..5b19142d13 100644
--- a/terminal/bundles/org.eclipse.terminal.control/META-INF/MANIFEST.MF
+++ b/terminal/bundles/org.eclipse.terminal.control/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.terminal.control; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
 Bundle-Activator: org.eclipse.terminal.internal.control.impl.TerminalPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/terminal/features/org.eclipse.terminal.feature/feature.xml b/terminal/features/org.eclipse.terminal.feature/feature.xml
index a273750f1c..94b37131c2 100644
--- a/terminal/features/org.eclipse.terminal.feature/feature.xml
+++ b/terminal/features/org.eclipse.terminal.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.terminal.feature"
       label="%featureName"
-      version="1.0.200.qualifier"
+      version="1.0.300.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
-- 
2.53.0

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

# Conflicts:
#	terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/textcanvas/TextLineRenderer.java
@HeikoKlare HeikoKlare merged commit 189e8e5 into eclipse-platform:master Mar 4, 2026
18 checks passed
@HeikoKlare HeikoKlare deleted the color-terminal branch March 4, 2026 08:33
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