No way to set a custom color on an individual token

Offen
#8,703 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
22/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
cpp, reverse-engineering
Bereich
devtools

Rechercherichtung

Start with InstructionTextToken and its type field, then DisassemblyTextLine.highlight, which colors whole lines, and trace how a RenderLayer's token colors reach the theme lookup. The issue leaves the design open: either add a per-token color or let plugins register a new token type. Done means a maintainer has chosen one approach and it is written up in the thread, since the code change depends on that decision.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

What is the feature you'd like to have?
A way to set an arbitrary color on an individual token (e.g. from a RenderLayer), not only a color from the current theme.

Is your feature request related to a problem?
InstructionTextToken has no color field, and DisassemblyTextLine.highlight colors the whole line. The only way to change a single token's color is to change token.type, but then the token gets the theme color of an existing type and looks like a string, keyword, etc. An unknown type value falls back to the default text color.

Are any alternative solutions acceptable?
A way for plugins to register a new token type with its own color.

Vorherrschende Sprache
C++
Sterne
1.3k
Forks
304
Ø Merge
2 T. 20 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Vector35/binaryninja-api

Alle Issues in Vector35/binaryninja-api

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.