Activities this quarter
- Learned Existing Code Base – I think a very big chunk of the quarter was spent learning what was already previously coded. Since my main assignment was to update the existing Fact Editor to use the new managed classes it was very important for me to figure out how everything was currently working.
- Implemented Managed Language Service – With help from Ryan I researched and implemented a managed language service for the New Fact Editor. This provides intellisense, word completion (closely related to intellisense), syntax highlighting, and parsing entered text. To get this to work I had to research the entire architecture of how packages are implemented in Visual Studio. Visual Studio requires you to register your language service before it can be used. There were a total of 6 classes that needed to be implemented to get the main functionality working. These were LanguageService class, AuthoringScope, Declarations, Scanner, Source, and ViewFilter. I had first thought that the language service was directly tied to the Code Window, though I was wrong. After a few days I found some decent documentation on MSDN that went over some of the basics of implementing your own Language Service and it was much easier after that.
- Implemented New Fact Editor Tool Window – I think the main challenge of the project was making a new fact editor that could be used with the existing ORMToolwindow. My first attempt was to get a code window contained within a UserControl that could be used in multiple places. The SDK sample documentation had something similar so I used that as a template. However this ended up not working as I was hoping. There were major repaint issues and it would seemingly randomly work at times and not at others. The original sample was used in a dialog, though I’m not sure what implications that had on my implementation. With a suggestion from Kevin I looked at another sample project in the SDK and tried to directly tie the new editor into a tool window. The goal was the encapsulate all of the functionality into one class and eventually inherit from the ORMToolwindow, which is what all the other toolwindow’s were using. I ended up having to implement a COM interface (which is what I was trying to avoid) though with some help from Kevin we were able to get the editor functional within the toolwindow and totally encapsulated.
Learning experiences
- Learning an Existing Application’s Code Base – I was a bit surprised at how much effort it took to learn the existing code base. Since most of the projects I’ve worked on have been from scratch I suppose I didn’t really think on this point a whole lot. I was a little shocked to find that all of the code I had written for the quarter zipped into a file of only 24k. I consider myself a “Code Monkey”, though most of my project time was spent researching what COM interfaces did what, what classes they were used by, and just the overall architecture of the Visual Studio SDK and the NORMA tool. This brings to light just how essential the documentation and design of software is in a project.
- Paired Programming – Kevin sat down with me a few times to help with certain aspects of the COM implantations. It was extremely helpful to be able to have someone there that knows the tool better than you helping as you code. He also was able to give me a few insights on the use of C# that I wasn’t previously aware of. I think I struggled a bit with this. My laptop is sort of MY home. MY territory. Having someone else take over at the keyboard sometimes was a little unnerving for me. In previous project classes I was usually working on something that I had lots of knowledge about and didn’t need much if any help. NORMA has shown me that there are certainly aspects where two people working on a problem can solve it much quicker.
I learned a lot this quarter in NORMA and I'm looking forward to learning a lot more next quarter!
