1 / 63

VSX: Extend Your Development Experience

VSX: Extend Your Development Experience. James K. Lau jameslau@microsoft.com Lead Program Manager, VS Ecosystem. Jean-Marc Prieur jmprieur@microsoft.com Program Manager, VS Ecosystem. Objectives. Why you should care about VSX?. What is VSX?. How can you take advantage of VSX?.

sandra_john
Télécharger la présentation

VSX: Extend Your Development Experience

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VSX: Extend Your Development Experience James K. Lau jameslau@microsoft.com Lead Program Manager, VS Ecosystem Jean-Marc Prieur jmprieur@microsoft.com Program Manager, VS Ecosystem

  2. Objectives Why you should care about VSX? What is VSX? How can you take advantage of VSX?

  3. Evolution of Tools

  4. Extensible Tools

  5. Visual Studio Custom Environment (i.e. Hardware controller programming) Modeling (e.g. UML editor) Productivity (e.g. Windows Manager) Controls (e.g. Custom DataGrid) Coding (e.g. Refactoring tool) Data (e.g. Oracle database tool) Build (e.g. Distributed build) Programming Languages (e.g. COBOL) Analysis (e.g. Code scanner) Team Development (e.g. SVN plug-in)

  6. Visual Studio Gallery • One-stop location for Visual Studio extensions. • Hundreds of extensions available from Microsoft and 3rd parties, both free and paid. • Anyone can publish their extensions onto VS Gallery.

  7. Using Source Outliner Leveraging on VSX by using Visual Studio extensions http://www.visualstudiogallery.com

  8. Why Build Extensions? Customize VS to your environment Apply policies across teams Avoid repetitive work Faster and higher quality development Business Opportunity

  9. Introduction to Visual Studio Extensibility

  10. Visual Studio Extensibility Map Brace matching IntelliSense Colorization Project Location Code snippets • Feature Customizations Integration to Object browser And Class View • Data Designer Extensibility providers • Splash Screen Code Editor Language Services SandCastle Extension F1 Integration CodeModel • Shell customization Multi View Editor Validation Help documentation Document Editors Dynamic help Integration Text document • Application Id Coherence • Help • Integration Project Properties pages GraphicalModellingDesigner Custom Test type Project Type T4 Technology Team Test Project Template Code Generator Custom Host Adapters Single file Generator Project model Item Template • IDE • Extensibility Team System Extensibility Custom Wizards Solution Template • Source control • Client Provider Source control Tracking External Tools TFS Reporting Componentmodel • Team Foundation Server VSCT Menus/Commands Properties Windows User Interface VS Commands Process Templates Work Item Tracking • Debugger Output Window Error List Team Build Toolbox Debug Engines Expression Evaluator Help About Box Debugger Visualizers Tool Windows Task List Options Pages Status

  11. Graphical designers Common Visual Studio Objects Text Documents (in tabs here) Tool Windows (in tabs here) Toolbox items in compartments

  12. Visual Studio ObjectsMenus & Commands Menu Toolbar Button / Icon Group Buttons and icons are associated with invisible objects: a command

  13. Visual Studio Objects(no user interface) • There are objects we do not see (because they are internal) • Commands (presented by buttons/icons) • Packages • Hint might be given by their registration information (Splash / About) • Providing Services, Projects types, Editors, Views, Code Generators, etc … • Different technologies are available to manipulate those objects and to add new objects.

  14. Extending Visual Studio (Another Perspective) Diagrams Customize Extend Languages Add-ins Macros Customization Visual Studio

  15. Technologies and toolsto customize and extend Visual Studio Graphical Designers Extend with the VS SDK DSL Tools Customize Extend Managed Package Native code package Package wizardVS SDK Assist Babel MLEX/MPPG Managed Package Framework Add-ins Macros Automation API Customization Visual Studio(core + COM interfaces) SandCastle wix

  16. Window Types Document Window Tool Window

  17. Services Packages proffer their services to the Core, which allows other packages to access them IVsProvided Visual Studio provides many services Packages can also provide services SVsProvided Outliner Lite Package C# Package IVsSolution3 IVsSolution2 IVsOutputWindow IVsSolution Visual Studio Core SVsOutputWindow SVsSolution

  18. Where are we? Basic IDE extensibility Brace matching IntelliSense Colorization Project Location Code snippets • Feature Customizations Integration to Object browser And Class View • Data Designer Extensibility providers • Splash Screen Code Editor Language Services SandCastle Extension F1 Integration CodeModel • Shell customization Multi View Editor Validation Help documentation Document Editors Dynamic help Integration Text document • Application Id Coherence • Help • Integration Project Properties pages GraphicalModellingDesigner Custom Test type Project Type T4 Technology Team Test Project Template Code Generator Custom Host Adapters Single file Generator Project model Item Template • IDE • Extensibility Team System Extensibility Custom Wizards Solution Template • Source control • Client Provider Source control Tracking External Tools TFS Reporting Componentmodel • Team Foundation Server VSCT Menus/Commands Properties Windows User Interface VS Commands Process Templates Work Item Tracking • Debugger Output Window Error List Team Build Toolbox Debug Engines Expression Evaluator Help About Box Debugger Visualizers Tool Windows Task List Options Pages Status

  19. Basic IDE Extension

  20. A precision about Menus and Commands <?xmlversion="1.0"encoding="utf-8"?> <CommandTablexmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable"xmlns:xs="http://www.w3.org/2001/XMLSchema"> <Externhref="stdidcmd.h"/> <!--commands exposed by VisualStudio. --> <Externhref="vsshlids.h"/> <!--Command ids for the menus provided by the shell. --> <Externhref="msobtnid.h"/> <!--Definition of some VSCT specific constants --> <Commandspackage="guidSourceOutlinerLitePkg"> <Groups/> <Buttons> <Buttonguid="guidSourceOutlinerLiteCmdSet"id="cmdidSourceOutlinerLite"priority="0x0100"type="Button"> <Parentguid="guidSHLMainMenu"id="IDG_VS_WNDO_OTRWNDWS1"/> <Iconguid="guidImages"id="bmpPicSearch" /> <Strings> <CommandName>cmdidSourceOutlinerLite</CommandName> <ButtonText>Source Outliner</ButtonText> </Strings> </Button> </Buttons> <!--The bitmaps section is used to define the bitmaps that are used for the commands.--> <Bitmaps> <Bitmapguid="guidImages"href="Resources\Images_32bit.bmp"usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/> </Bitmaps> </Commands> <Symbols> <!-- This is the package guid. --> <GuidSymbolname="guidSourceOutlinerLitePkg"value="{1d3cffcc-a3a1-4a6d-873b-e0766357b056}" /> <!-- This is the guid used to group the menu commands together --> <GuidSymbolname="guidSourceOutlinerLiteCmdSet"value="{64966bb1-cb92-44bd-8d41-f2026708d74a}"> <IDSymbolname="MyMenuGroup"value="0x1020" /> <IDSymbolname="cmdidSourceOutlinerLite"value="0x0101" /> </GuidSymbol> <GuidSymbolname="guidImages"value="{aabbe906-8d4b-472e-a0a9-add8334f6f30}" > <IDSymbolname="bmpPic1"value="1" /> <IDSymbolname="bmpPic2"value="2" /> <IDSymbolname="bmpPicSearch"value="3" /> <IDSymbolname="bmpPicX"value="4" /> <IDSymbolname="bmpPicArrows"value="5" /> </GuidSymbol> </Symbols> </CommandTable> Statically defined in VSCT (2008+) or CTC (2005-) VSCTPowerToy.exe Helps a lot

  21. Graphical Model Designers Creating Graphical Designers with the DSL Tools

  22. Where are we? Graphical Modeling Languages Brace matching IntelliSense Colorization Project Location Code snippets • Feature Customizations Integration to Object browser And Class View • Data Designer Extensibility providers • Splash Screen Code Editor Language Services SandCastle Extension F1 Integration CodeModel • Shell customization Multi View Editor Validation Help documentation Document Editors Dynamic help Integration Text document • Application Id Coherence • Help • Integration Project Properties pages GraphicalModellingDesigner Custom Test type Project Type T4 Technology Team Test Project Template Code Generator Custom Host Adapters Single file Generator Project model Item Template • IDE • Extensibility Team System Extensibility Custom Wizards Solution Template • Source control • Client Provider Source control Tracking External Tools TFS Reporting Componentmodel • Team Foundation Server VSCT Menus/Commands Properties Windows User Interface VS Commands Process Templates Work Item Tracking • Debugger Output Window Error List Team Build Toolbox Debug Engines Expression Evaluator Help About Box Debugger Visualizers Tool Windows Task List Options Pages Status

  23. Graphical Languages & Designers • You know theclass diagram • Sometimes a picture is worththousand words • ... But we need a formal picture enabling generating code, config files, documentation ... public partial class LineTool { … protectedoverrideShape CreateElement() { return new Line(); } protected internal override void OnMouseLeftButtonDown(Point point, Shape hit) { X1 = point; X2 = point; } protected internal override void OnMouseLeftButtonUp(Point point, Shape hit) { X2 = point; Terminate(); } protected internal override void OnMouseDrag(Point point, Shape hit) { X2 = point; } } }

  24. Adding our own languages ... • ... With the DSL Tools, we can • Add a new element of type « .mymodel » to a Visual Studio Visual Studio. • Draw some model, change its properties, and automatically generate correct source code from it? • Advantages • Faster, less error prone, better code quality and maintainability • Makes it possible for user domain who are not development experts • We can have a tight integration in IDE(the DSL potentially knows all the solution, and acts on it)

  25. Process of creating DSL : using the DSLTools DSL Author (uses DSL Tools to create DSLs) Uses the Product Uses DSL to createproduct creates Package VS 2008 DSL for Specific domain generates Framework VS 2008 SDK Code, Doc config files DSL Tools builds Framework Final Product FW Visual Studio 2008

  26. Code Generation Example

  27. DSL Tools demo Creating a simple graphical designer Generating C# code for inheritance

  28. vsCustomization What is Generated Custom code Custom code for commands, designer customization … T4 Templates Coherence and validation rules Modeling Validation Diagram ShapesConnector Classes, Relationships, enums, validation of multiplicity, properties, Serialisation Directive processor Toolbox, context menu, Model Explorer, Doc, View, Package Maps Modeling Diagram Shell Modeling Text Templating

  29. Team Foundation Server Extensibility

  30. Team Foundation Server Extensibility Brace matching IntelliSense Colorization Project Location Code snippets • Feature Customizations Integration to Object browser And Class View • Data Designer Extensibility providers • Splash Screen Code Editor Language Services SandCastle Extension F1 Integration CodeModel • Shell customization Multi View Editor Validation Help documentation Document Editors Dynamic help Integration Text document • Application Id Coherence • Help • Integration Project Properties pages GraphicalModellingDesigner Custom Test type Project Type T4 Technology Team Test Project Template Code Generator Custom Host Adapters Single file Generator Project model Item Template • IDE • Extensibility Team System Extensibility Custom Wizards Solution Template • Source control • Client Provider Source control Tracking External Tools TFS Reporting Componentmodel • Team Foundation Server VSCT Menus/Commands Properties Windows User Interface VS Commands Process Templates Work Item Tracking • Debugger Output Window Error List Team Build Toolbox Debug Engines Expression Evaluator Help About Box Debugger Visualizers Tool Windows Task List Options Pages Status

  31. Team Foundation Server • Microsoft’s premier team development server: • Source control • Work Item tracking • Build monitoring • All-in-one server. • Exposes APIs that can be accessed programmatically; not only in Visual Studio.

  32. Reference Assemblies // Team server TeamFoundationServertfs = null; • VersionControlServerversionControl; • TeamProjectproject; // Get the server fromitsname. • ICredentialsProvidercredentialProvider = new UICredentialsProvider(); • tfs = • TeamFoundationServerFactory.GetServer(teamFondationServerName, • credentialProvider); • // Get the Version control server. • if (tfs != null) • { • tfs.EnsureAuthenticated(); • versionControl =tfs.GetService(typeof(VersionControlServer)) • as VersionControlServer; • } • if (!string.IsNullOrEmpty(projectName)) • project= versionControl.TryGetTeamProject(projectName);

  33. TFS Extensibility A change log using the TFS assemblies

  34. Trying to model (Version control) foreach (ChangesetchangeSetin versionControl.QueryHistory("$/"+projectName// Path , VersionSpec.Latest// Version spec , 0 // DeletionId , RecursionType.Full// Recursion , ""// User , null// from , VersionSpec.Latest// to , int.MaxValue// maxitems , false// Include changes , true) // Slotmode ) if (changeSet.CreationDate >= since) foreach (WorkItemworkIteminchangeSet.WorkItems) if (workItem.Project.Name == project.Name) …

  35. TFS ExtensibilitySummary Advantages • Simple to use Disadvantages • Difficult to draw a model… • No strongly typed relationships between classes • Everything is obtained by method call • Requires reading through documentation for initial learning

  36. Visual Studio 2008 Shell

  37. Team Foundation Server Extensibility Brace matching IntelliSense Colorization Project Location Code snippets • Feature Customizations Integration to Object browser And Class View • Data Designer Extensibility providers • Splash Screen Code Editor Language Services SandCastle Extension F1 Integration CodeModel • Shell customization Multi View Editor Validation Help documentation Document Editors Dynamic help Integration Text document • Application Id Coherence • Help • Integration Project Properties pages GraphicalModellingDesigner Custom Test type Project Type T4 Technology Team Test Project Template Code Generator Custom Host Adapters Single file Generator Project model Item Template • IDE • Extensibility Team System Extensibility Custom Wizards Solution Template • Source control • Client Provider Source control Tracking External Tools TFS Reporting Componentmodel • Team Foundation Server VSCT Menus/Commands Properties Windows User Interface VS Commands Process Templates Work Item Tracking • Debugger Output Window Error List Team Build Toolbox Debug Engines Expression Evaluator Help About Box Debugger Visualizers Tool Windows Task List Options Pages Status

  38. Introducing: Visual Studio 2008 Shell • Empty “Shell” with IDE features. • No Visual Studio as a pre-requisite. • Accelerates development.

  39. Visual Studio Shell Features More details here

  40. Integrated vs. Isolated Modes VS Shell (isolated) Runtime VS Shell (isolated) Runtime

  41. How To Build Your OwnVS Shell based Application?

  42. Storyboard Designer A Specialized Tool Built on Visual Studio 2008 Shell (isolated mode)

  43. VSIP Program

  44. VS Ecosystem Growth • Averaging 30% year-over-year partnership and product growth since VSIP program inception. • Currently over 200 Alliance/Premier VSIP partners have released ~1200 products. • Over 10,000 public products integrated into Visual Studio across all levels of extensibility.

  45. VSIP Sample Products

  46. Resources http://msdn.com/vsx

  47. Backup Slides

More Related