Other New Features of .NET

 < Free Open Study > 



In addition to the rather drastic changes to the Visual Basic language, as well as extensibility, there are a number of new .NET features that aid the add-in developer. These are highlighted in the following sections.

Recording Macros

You can automate repetitive tasks using the macro-recording features. The macros are stored as VB .NET procedures that you may edit using the Visual Studio .NET Macros IDE. The Macros IDE allows developers to edit macros and even use macros to learn about the extensibility object model.

Writing Macros

For more complex situations, you can write macros using VB .NET. You can use all the features of VB .NET in macros, including inheritance, structured error handling, and the .NET Framework.

Organizing Macros

The Macro Explorer in the Visual Studio .NET Macros IDE provides a hierarchical view of the available macros, which are organized into modules contained in macro projects. From this window, you can organize, edit, and run macros.

Manipulating Code Without Parsing

The project-neutral extensibility model, called the general extensibility model, provides access to the individual code files of your project. You can drill down to the level of an individual variable declaration and modify it without having to parse the code. Go straight to the code element you want to modify using the CodeModel object, get its location in the Document object, and modify your code.

Add-ins

As noted previously, add-ins are not new in .NET, but they certainly are different and enhanced. Add-ins are extensions to the IDE. They are compiled applications that manipulate the environment and automate tasks. Because they are compiled, add-ins are more powerful, more versatile, and more deployable than macros. Add-in projects implement the IDTExtensibility2 interface. The power of add-ins rests in the following facts:

  • You have access to all the features of .NET to modify the IDE.

  • You can write add-ins using any of the Visual Studio .NET languages.

  • Add-ins are compiled; therefore, your code is not exposed as it is in macros.

  • Add-ins are easy to distribute because they are compiled.

The Add-in Wizard is provided to create skeleton add-in projects. Chapter 2 discusses and demonstrates the use of the Add-in Wizard.

Wizards

Wizards are simplified add-ins that implement the IDTWizard interface. These applications lead users through a task step by step.

Visual Studio Integrator Program

Most users of Visual Studio .NET will find that their needs are met by the use of add-ins, macros, and wizards. Some users may find that they need to go beyond these capabilities. For example, someone might want to introduce a new programming language into the Visual Studio IDE, which could possibly create a need for a new project type, a new or customized text editor, and possibly new debugging features.

The Visual Studio Integrator Program (VSIP), although not a topic of this book, was created to allow this kind of custom extensibility. The VSIP provides you with tools and information that will facilitate the integration of custom products into the Visual Studio .NET environment. You can find out more about the program at http://www.msdn.microsoft.com/vstudio/vsip/default.asp.



 < Free Open Study > 



Writing Add-Ins for Visual Studio  .NET
Writing Add-Ins for Visual Studio .NET
ISBN: 1590590260
EAN: 2147483647
Year: 2002
Pages: 172
Authors: Les Smith

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net