CodePlexProject Hosting for Open Source Software
My new team just released a new feature of Popfly website called Popfly Game Creator. In summary it is a website where you can easily create casual games most of the time without writing any code. You can then share those games with your friends. There is a detailed post about the release in Ben Anderson's blog.
I have also created a "snake" like game for fun which you can find at http://www.popfly.com/users/Bertan/WatermelonHunt.
For the last couple months, I was working on a feature to enable bug reporting on MSDN Forums. Last week we have started a pilot program with Visual Basic team and enabled bug reporting on several Visual Basic forums. Bug reporting procedure is very simple and all you have to do is select "Bug Report" while create a new post under an enabled forum and Microsoft will respond to your bug similart to other bugs submitted through Microsoft Connect. We believe having bug reporting integrated in MSDN Forums will make it much easier for people to submit bugs and also it will make resolutions, workarounds to the bugs much more visible.
You can find more detailed information related to the pilot program at Visual Basic team blog.
I have been trying to add a command filter to all text editors in Visual Studio for a project, since I had to collect information from several number of sources I wanted to collect them in one place in the hope that somebody else might find it useful.
In order to get notification when a text view is registered in Visual Studio, we first have to register an implementation of IVsTextManagerEvents as an event sink. In order to do this you can use the following code block which uses IVsTextManager service.
Now IVsTextManagerEvents.OnRegisterView method is going to be called for each new view created. In that method you can use passed IVsTextView.AddCommandFilter method to add a command filter. However, when the event is raised the window is actually not initialized fully so any command filter you add will be below the language service filters thus you won't see all of the commands. My solution to this problem was to check the text buffer each time Exec method was called on the filter and remove/add the filter once the buffer wasn't empty anymore. I am still trying to find a better solution and I will update this entry if I find anything better than relying on the buffer. One apparent problem with this solution is that as long as the text view remains empty, the filter will not be re-registered thus causing you to lose some events on empty files.
I was recently in a training about test driven development and in an exercise about testing legacy code, a very nice idea came up to inject mock objects to legacy code. The usual problem is that if a legacy code is not written taking testability in to account, there might a lot of hard coded dependencies to external sources such as databases which makes unit testing really difficult. In order to quickly unit test the legacy components, those dependencies should be replaced by mock objects so that unit tests won't require a deployed environment. There are several ways to do this, one way is to decide which object to use (mock or the actual component) based on the a global flag. This can be dangerous if the flag is not set to false when deploying to production environment. However by using reflection, you can avoid modifying the existing code and replacing the reference to the mock component in the unit test itself. Below is a quick code snippet in how you can achieve this:
This code snippet will change the value of reader.DataLayer which is a private field in the object. However there is one drawback to this method. The wrapper object that you are replacing must be inheritable otherwise you won't be able to create a mock object to replace the original instance.
I have updated VSCmdShell homepage today to include latest release. This release is our first release where all contributions are from VSCmdShell community, you can check all the included fixes at Codeplex but here is a quick summary of them:
Yesterday, we have released a new version of VSCmdShell. This new release includes several fixes as well as some new features suggested by the community. A summary of changes are:
You can download VSCmdShell 1.1 release at CodePlex project page. If you find any bugs or if you have any suggestions please create an issue at the project page.
Last edited Dec 7, 2006 at 11:16 PM by codeplexadmin, version 1
Does not work. If you type any PowerShell commands into the plugin's plain-jane window, visual studio comes crashing down.