Bug 207921 - [syntax highlighting] number syntax highlighting should contain type suffixes
Summary: [syntax highlighting] number syntax highlighting should contain type suffixes
Status: RESOLVED DUPLICATE of bug 63573
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: André Søreng CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-10-30 05:51 EDT by Martin Aeschlimann CLA
Modified: 2007-10-31 13:16 EDT (History)
2 users (show)

See Also:


Attachments
Semantic syntax highlight support for numbers (8.72 KB, patch)
2007-10-30 14:16 EDT, André Søreng CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2007-10-30 05:51:30 EDT
20071030-0010

type suffixes ('L', 'l', 'D', ...) are part of the number literal and should be colored as well

long serialVersionUID = 1L;

double d= 1.1D;
float f= 1.1F;
Comment 1 Dani Megert CLA 2007-10-30 07:53:05 EDT
André do you have time to look at this today or tomorrow? As number coloring is a new feature advertised in the New & Noteworthy we should fix this. It was also already mentioned in bug 63573.
Comment 2 André Søreng CLA 2007-10-30 07:59:16 EDT
Ye, I'll try to look at it later today. Can't promise anything certain,
but should be feasible.
Comment 3 Dani Megert CLA 2007-10-30 08:03:48 EDT
Great. Shouldn't be a big deal. The reason I ask is because we like people to own and maintain their contributions if possible.
Comment 4 André Søreng CLA 2007-10-30 10:08:57 EDT
Daniel, do you know if it's possible to use the new semantic highlighting
functionality to highlight numbers instead of writing all the pattern matching
code ourselves?
Comment 5 Dani Megert CLA 2007-10-30 10:13:43 EDT
You could write a new semantic highlighting which can access the AST. For entry point see: org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightings
Comment 6 André Søreng CLA 2007-10-30 14:16:14 EDT
Created attachment 81613 [details]
 Semantic syntax highlight support for numbers

Attaching a hopefully final patch for highlighting of numbers.
This one uses semantic highlighting. Hence, whatever the
"real-time" compiler in eclipse considers a number literal
will be highlighted.
Comment 7 Dani Megert CLA 2007-10-31 13:14:41 EDT
Marking as dup of the main feature request which also contains the patch.

*** This bug has been marked as a duplicate of bug 63573 ***