Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 31 Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 37 Blog by Joel Fjordén a.k.a. Will o Wisp
Code Style Enforcer 2.2 Released 
Wednesday, March 26, 2008, 07:15 PM - Code Style Enforcer
Besides support for Visual Studio 2008, heavy optimizations have been made to the code rule violations engine. DXCore 3.0.5+ is now required for Code Style Enforcer, since DXCore 2.5+ didn’t work well with code analysis in background threads.

So What's New?

New Features

• Support for Visual Studio 2008.

• Optimizations of the code rule validation engine, which now utilizes background threads and incremental parsing.

Bug Fixes

• Rules were not always loaded when opening a solution in Visual Studio 2008.

• Context menus in code editor and on solution item didn't show.

• Name refactoring didn't work in Visual Studio 2008.

• bool.TryParse(stringValue, out boolValue) no longer reports a name violation (fix in DXCore 3.0).

• Steps taken to assure that the MSI setup works with UAC in Vista, according to this blog post

Known Issues

• Code Style Enforcer doesn't work well when UAC is turned on in Windows Vista, but for how long can you stand it anyway :).


Please send me feedback and comments about this new version, especially about the optimizations to the code rule violations engine, since it might have introduced a bug or two.
29 comments ( 362 views )   |  related link

No Keyboard Input in Modeless WPF Window 
Tuesday, March 11, 2008, 06:24 PM - WPF
Today I encountered the weirdest problem, when showing a WPF Window from a Windows Forms application. When writing letters and numbers into a textbox nothing happened, but space and backspace together with shortcuts for Cut, Copy and Paste worked as expected.

I first thought there must be some problem with my data template, but when showing it from a WPF application everything worked just fine. My next instant thought was that there must be some message filter, in the Windows Forms application, stealing the keyboard input.

I then created a new Windows Forms application and brought up the modeless WPF Window from there, by calling Show, only to notice the same problem. I then changed to a modal window, by calling ShowDialog instead, and suddenly everything responded as it should.

It was time to start some Google:ing…

The solution, to my big surprise, was to explicitly enable keyboard input from Windows Forms, by calling the static method ElementHost.EnableModelessKeyboardInterop. This call takes a Window as parameter and essentially registers an input hook with the Windows Forms application object, running the message loop, and calls ComponentDispatcher.RaiseThreadMessage. The call to EnableModelessKeyboardInterop can be made in the constructor, if the Window is inherited, or simply before calling the Show method.

For more information read about Sharing Message Loops Between Win32 and WPF.
4 comments ( 104 views )   |  related link

I Can See The Light 
Monday, February 18, 2008, 07:31 AM - Code Style Enforcer
Developer Express now seems to have fixed the deadlock issue during background code analysis, in DXCore 2.5+. I have received one of their daily build version containing this fix and I will try it more thoroughly this week, but it looks very promising.

I now hope that they will merge these changes into DXCore 3.0+ also.
1 comment ( 6 views )   |  related link

Stuck in the Middle 
Tuesday, January 29, 2008, 07:33 AM - Code Style Enforcer
Unfortunately I’ve ran into some problems with my optimization plans and DXCore 3.0+ as well. I’m really satisfied with my optimization code for Code Style Enforcer, but unfortunately DXCore doesn’t work very well with background thread analysis, resulting deadlock related situations.

I was then informed by DevExpress that the new DXCore 3.0+ version was supposed to have special support for background thread analysis through the new code issue provider model. This, on the other hand, proved to be too much beta still since it didn’t behave as expected.

Right now I’m waiting for the DevExpress support team to analysis my code and the threading issues with DXCore 2.5+. The other alternative is to wait for a newer and more final version of DXCore 3.0+ and hopefully the background thread analysis will be good enough there, even though I’m rather skeptical about it right now.

The optimization release is therefore put on hold for now, so I might look into some other issues first. Right now I feel in need of a good vacation though and therefore I’m leaving for Florida on Friday. I can only hope that I’ll get back with a lot of new enthusiasm :)!!!
2 comments ( 82 views )   |  related link

Code Style Enforcer and DXCore Version 3 
Sunday, January 6, 2008, 04:36 PM - Code Style Enforcer
DXCore version 3 is now available for download, but currently version 2 is the only supported version by Code Style Enforcer. The next release of CSE will be a performance upgrade, where optimizations have been made to the code rules checking engine, i.e. read previous log post.

After that I will begin targeting Code Style Enforcer against the new version 3 of DXCore, in order to use some new nice features of that release. This means that DXCore version 3 will soon be a requirement instead of version 2.

3 comments ( 134 views )   |  related link


Back Next