Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Provide a shared color blend helper in JFace

Aperta
#4,486 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #4489 di @vogella — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
18/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Start with org.eclipse.jface.resource.JFaceColors and the existing private blend copies listed in the issue, such as PopupDialog.blend and Colors.blend. The open question is the ratio type, which the issue leaves undecided, so the design needs maintainer input. A pull request (#4489) is already open against this issue, so check its state and discussion before starting. Done means one public RGB blend in JFaceColors with the public Forms and Workbench versions delegating to it, and no color shift.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Blending two RGB values by a ratio is implemented over a dozen times in platform.ui, each with its own parameter type and rounding:

  • PopupDialog.blend (jface)
  • SWTUtil.mix (jface.databinding)
  • Colors.blend, SourceViewerInformationControl.blend, OverviewRuler.interpolate, DiffPainter.interpolate (jface.text)
  • SourceViewerInformationControl.blend (ui.editors)
  • FormColors.blend, public (ui.forms)
  • ColorUtil.blend, public, ShowViewDialog.blend, HeapStatus.blend (ui.workbench)
  • CTabRendering.blend (e4 renderers)

The two public versions live in Forms and Workbench, so JFace-level code cannot use them.
As more UI derives colors from the theme instead of fixed system colors, this pattern keeps spreading.

Proposal: add a public blend method for RGB to the existing org.eclipse.jface.resource.JFaceColors, which every bundle above already depends on.
FormColors.blend and ColorUtil.blend delegate to it, and the private copies migrate to it.
The ratio type needs to be decided up front: the existing callers use int percent, float and double, and a migration should not shift colors.

Copies in other repositories (Compare in eclipse.platform, JDT UI, PDE) can follow once the API is released.

Lingua principale
Java
Stelle
124
Fork
269
Merge medio
2g 3h
PR unite (30g)
69

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-platform/eclipse.platform.ui

Tutte le issue di eclipse-platform/eclipse.platform.ui

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.