View previous topic :: View next topic |
Author |
Message |
mjomble
Joined: 18 Jan 2009 Posts: 7
|
Posted: Fri Jan 30, 2009 4:03 pm Post subject: Oh hai. I maded u a fix |
|
|
The preview box on the syntax coloring preferences page seems to have had the sample code changed at one point, but the hardcoded highlights from the old one are still there.
Before:
After applying this:
More may be coming up after I finish debugging the next one. |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sat Jan 31, 2009 8:03 am Post subject: |
|
|
Thanks!
I didn't notice it was broken. I'll need to add the semantic highlighting ranges after your patch (I still can't figure out what are the line, col, length parameters since everything is in a single line). |
|
Back to top |
|
|
mjomble
Joined: 18 Jan 2009 Posts: 7
|
Posted: Sat Jan 31, 2009 8:15 am Post subject: |
|
|
I was actually thinking of doing a new sample code as well, the current one doesn't have a lot of OOP in it. For most of the previously hardcoded segments there doesn't seem to be a match in this sample.
Maybe I'll cook something up soon. |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sat Jan 31, 2009 8:21 am Post subject: |
|
|
Yeah, I was thinking the same... If you could do it, that would be great!
I think the current example was taken from the first example in the D homepage. |
|
Back to top |
|
|
mjomble
Joined: 18 Jan 2009 Posts: 7
|
Posted: Sat Jan 31, 2009 1:13 pm Post subject: |
|
|
asterite wrote: | I still can't figure out what are the line, col, length parameters since everything is in a single line |
Hmm, looks like the preview code is in two separate places:
The PREVIEW constant in descent.internal.ui.preferences.formatter.CodeFormatterConfigurationBlock
and as a text file in descent.ui\src\descent\internal\ui\preferences\ColorSettingPreviewCode.txt
Seems to me like only the latter is being used, at least when I access it via Window -> Preferences -> D -> Editor -> Syntax Coloring. And there the line numbers make perfect sense. |
|
Back to top |
|
|
mjomble
Joined: 18 Jan 2009 Posts: 7
|
Posted: Sun Feb 01, 2009 6:34 am Post subject: |
|
|
Hmm, what's the "Special tokens" syntax highlighting element for?
Also, I noticed that "Pragmas" highlights stuff like
#!/usr/bin/dmd -run
rather than
pragma(msg, "Compile time message"); |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sun Feb 01, 2009 9:08 am Post subject: |
|
|
The special tokens are __FILE__, __LINE__, etc.
What's wrong with the pragmas highligting? |
|
Back to top |
|
|
mjomble
Joined: 18 Jan 2009 Posts: 7
|
Posted: Sun Feb 01, 2009 9:10 am Post subject: |
|
|
asterite wrote: | What's wrong with the pragmas highligting? |
It's highlighting something different than what the digitalmars site refers to as pragmas: http://www.digitalmars.com/d/2.0/pragma.html |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sun Feb 01, 2009 9:58 am Post subject: |
|
|
Oh, DMD calls "PRAGMA" to the lines that start with #.
And "pragma" to the ones you are talking about.
It's a matter of case. |
|
Back to top |
|
|
mjomble
Joined: 18 Jan 2009 Posts: 7
|
Posted: Sun Feb 01, 2009 10:01 am Post subject: |
|
|
Will you be changing the highlighting? |
|
Back to top |
|
|
mjomble
Joined: 18 Jan 2009 Posts: 7
|
Posted: Sun Feb 01, 2009 10:34 am Post subject: |
|
|
Also figured out that the other main problem I've been having seems to be related to anonymous enums. Which, according to some comments I noticed, seems to be a tricky area.
So I guess it's a known issue that they may cause some odd problems? |
|
Back to top |
|
|
|