The source is a Visual Studio 2010 Solution, with a C# 4.0 project inside. I think the Visual Studio 2010 SDK would probably have to be installed to compile it. It can be debugged by hitting the run button just like most.. Visual Studio Magic!

There's a few "obvious" known issues at present, they don't bother me so much at the moment, but someone else might want to rectify them. Maybe I'll update it sometime..
  • For me, it doesn't seem to be working on first use. I have to restart VS a couple of times to make it work. Weird!
  • When renaming an element, the old element isn't removed from the dictionaries, so it still gets highlighted afterwards. This is a difficult problem to solve due to the limited amount of information the ElementChanged event provides... Added a workaround, to reload the dictionaries - there's now a button on the statistics form that does this.
  • The case of failing to open the Intellisense database could be handled better, if something funky is happening with the db (it might be locked or even in some other location or some other name).
  • There's no filtering based on the current file's includes, it just tests against everything relevant that Intellisense found.
  • If variables have the same name as a type, they are highlighted as if they were that type. It's probably a Good Thing to not name variables the same as a type, but it could be fixed, with a bit of work. I have even used commercial highlighting extensions with this bug (won't mention names)... Which might indicate the difficulty of solving it. Maybe if I have a spare weekend or two.
  • It could probably be made to be a lot more memory efficient - I don't have any really huge projects to test with right now, but I probably will soon. If memory becomes a problem I'll be sure to work on a fix.
  • The whole thing could do with a lot more testing. I've only tested it on this one PC so far, and a handful of different projects. Feedback or suggestions would be appreciated!

The HLSL support has its own classifier and classifier factory. I implemented it because the main C++ project I'm working on also has some HLSL files, which were depressingly black when I opened them. This thing's probably going to have its own set of issues..
  • Only operates on files *.hlsl, should probably be configurable.
  • The words it detects are all just "hard-coded", would probably be better with some sort of data source, so extra words can be added easily.
  • It's probably missing a lot of words, I've only tested it on a few files so far.
  • It has some pre-defined commonly used semantics (coloured like enums - SV_Position, etc), but doesn't do semantics like it really should. They should be handled like user-defined types.
  • It just makes me want Intellisense for HLSL even more. Maybe a HLSL Intellisense Presenter could be implemented... It would have to get a lot smarter for that though.. I imagine all that being rather time-consuming to implement. There's probably already more than one out there somewhere, which means I'll probably have to add an option to disable the HLSL highlighting (and for that matter the C++ highlighting...).


Here's some things which you might expect from future versions of Highlighterr:
  • Renaming of code items in C++. I've been thinking of possible ways to do this, because it's a feature I would find very handy. I really miss that refactor menu (not that it ever really existed for VC++ without a 3rd party plugin), it's so useful in C#. Currently in progress..
  • Possibly some extension to Intellisense for C++, like auto-display completion list...
  • HLSL Intellisense (not for a while yet though). Just something simple, using the same word set as the HLSLHighlighterr, maybe including user types and variables (which I also plan on fixing in the highlighter).
Check out the Issue Tracker for more information and to vote on future functionality...

Last edited Aug 7, 2010 at 1:25 PM by dexy, version 33

Comments

No comments yet.