FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Oh hai. I maded u a fix

 
Post new topic   Reply to topic     Forum Index -> Descent
View previous topic :: View next topic  
Author Message
mjomble



Joined: 18 Jan 2009
Posts: 7

PostPosted: Fri Jan 30, 2009 4:03 pm    Post subject: Oh hai. I maded u a fix Reply with quote

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
View user's profile Send private message
asterite



Joined: 01 Jun 2006
Posts: 235
Location: Buenos Aires, Argentina

PostPosted: Sat Jan 31, 2009 8:03 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
mjomble



Joined: 18 Jan 2009
Posts: 7

PostPosted: Sat Jan 31, 2009 8:15 am    Post subject: Reply with quote

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
View user's profile Send private message
asterite



Joined: 01 Jun 2006
Posts: 235
Location: Buenos Aires, Argentina

PostPosted: Sat Jan 31, 2009 8:21 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
mjomble



Joined: 18 Jan 2009
Posts: 7

PostPosted: Sat Jan 31, 2009 1:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
mjomble



Joined: 18 Jan 2009
Posts: 7

PostPosted: Sun Feb 01, 2009 6:34 am    Post subject: Reply with quote

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
View user's profile Send private message
asterite



Joined: 01 Jun 2006
Posts: 235
Location: Buenos Aires, Argentina

PostPosted: Sun Feb 01, 2009 9:08 am    Post subject: Reply with quote

The special tokens are __FILE__, __LINE__, etc.

What's wrong with the pragmas highligting?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
mjomble



Joined: 18 Jan 2009
Posts: 7

PostPosted: Sun Feb 01, 2009 9:10 am    Post subject: Reply with quote

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
View user's profile Send private message
asterite



Joined: 01 Jun 2006
Posts: 235
Location: Buenos Aires, Argentina

PostPosted: Sun Feb 01, 2009 9:58 am    Post subject: Reply with quote

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. Embarassed
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
mjomble



Joined: 18 Jan 2009
Posts: 7

PostPosted: Sun Feb 01, 2009 10:01 am    Post subject: Reply with quote

Will you be changing the highlighting?
Back to top
View user's profile Send private message
mjomble



Joined: 18 Jan 2009
Posts: 7

PostPosted: Sun Feb 01, 2009 10:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Descent All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group