From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26752 invoked by alias); 3 Aug 2005 21:49:56 -0000 Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org Received: (qmail 26732 invoked from network); 3 Aug 2005 21:49:51 -0000 Received: from unknown (202.80.33.51) by sourceware.org with QMTP; 3 Aug 2005 21:49:51 -0000 Received: (qmail 29297 invoked from network); 3 Aug 2005 21:49:50 -0000 X-Anti-Virus: Message scanned for viruses by TVL Received: from unknown (HELO sakuraindustries.com) ([202.80.36.102]) (envelope-sender ) by mail.vanuatu.com.vu (qmail-ldap-1.03) with SMTP for ; 3 Aug 2005 21:49:50 -0000 Message-ID: <42F271D3.10007@sakuraindustries.com> Date: Wed, 03 Aug 2005 21:49:00 -0000 From: Steven Johnson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040115 MIME-Version: 1.0 To: "Th.R.Klein" CC: insight@sources.redhat.com Subject: Re: [RFC] syntax highlighting References: <42F134B1.8080805@web.de> In-Reply-To: <42F134B1.8080805@web.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-q3/txt/msg00044.txt.bz2 This is a good idea. Im not sure of anyone else doing this, so the work is very appreciated. My comments are as follows: 1. What variant of Assembler are you syntax highlighting here? There are many varients, using different comment characters, asm directives, opcode directives, etc. 2. It would be useful, if your comment block for the 2 "hard coded" highlighters (the asm one especially) defined the types of things you are scanning for and highlighting. (what are the keywords, comments, etc.) it would make understanding the code easier. 3. It would be useful if the extensions that used one or other of the hard-coded highlighters could be set by the user in a configuration option. Or maybe even dynamically from the test widget (im thinking a little drop down that lets you select, for a window, highlight "asm" "c/c++" "none". While auto choosing is good, sometimes it isnt what you want. Some people dont like syntax highlighting, so there should be an option to turn it off. 4. Also, GDB can debug other languages. It would be great if there was a parameterised "soft coded" syntax highlighter. So the user could (say, for a given extension) set what the end of line comments are, keywords, etc and get any file to syntax highlight. Looking at it, it seems all of the languages youve got already, "asm" and "c" could be done with a common "Tager" that was parameterised, rather than hard coded. 5. Colors, you should be able to select from the config what colors you want to use to highlight. Ideally, you would want to be able to set differnet colors for different highlighters. 6. Regarding the comment "The method isn't the fastest but it seems OK for the moment. " It seems OK, from a code complexity perspective to me, if it might be slow on some PC's, then a global enable option, which bypasses all of this, and just does what Insight does now would be a good option, then a user could say "bugger this its just too slow for me" and revert to the existing behaviour, that would have negligible performance impact. Ill try and test it this week also. If you can add a parameter to globally "enable"/"disable" this to the config page, and it works as expected, then i would be advocating its checking in to the source tree, so its in future snapshots. Then further work like paramterising, refining etc, can be worked on. I wouldnt want to see this added to the source tree if it forced everyone to use it (which is why i suggest the "global enable" option). Good work though. Steven Th.R.Klein wrote: > Hi > > I've ask Vineeth if the developing of the Patch already have started. > Since Vineeth told me that this is not the case. > So I'm sending here a patch, which should carefully reviewed. > The method isn't the fastest but it seems OK for the moment. > > cheers, > Thomas [snip patch]