slide1 l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
VSX: Extend Your Development Experience PowerPoint Presentation
Download Presentation
VSX: Extend Your Development Experience

Loading in 2 Seconds...

play fullscreen
1 / 63

VSX: Extend Your Development Experience - PowerPoint PPT Presentation


  • 254 Views
  • Uploaded on

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?.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'VSX: Extend Your Development Experience' - sandra_john


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
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
Objectives

Why you should care about VSX?

What is VSX?

How can you take advantage of VSX?

visual studio
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)

visual studio gallery
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.
using source outliner

Using Source Outliner

Leveraging on VSX

by using Visual Studio extensions

http://www.visualstudiogallery.com

why build extensions
Why Build Extensions?

Customize VS to your environment

Apply policies across teams

Avoid repetitive work

Faster and higher quality development

Business Opportunity

visual studio extensibility map
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

common visual studio objects

Graphical designers

Common Visual Studio Objects

Text Documents

(in tabs here)

Tool Windows

(in tabs here)

Toolbox items in compartments

visual studio objects menus commands
Visual Studio ObjectsMenus & Commands

Menu

Toolbar

Button / Icon

Group

Buttons and icons are associated with invisible objects: a command

visual studio objects no user interface
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.
extending visual studio another perspective
Extending Visual Studio (Another Perspective)

Diagrams

Customize

Extend

Languages

Add-ins

Macros

Customization

Visual Studio

technologies and tools to customize and extend visual studio
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

window types
Window Types

Document Window

Tool Window

services
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

where are we basic ide extensibility
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

a precision about menus and commands
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

graphical model designers
Graphical Model Designers

Creating Graphical Designers with the DSL Tools

where are we graphical modeling languages
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

graphical languages designers
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;

}

}

}

adding our own languages
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)
process of creating dsl using the dsltools
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

dsl tools demo

DSL Tools demo

Creating a simple graphical designer

Generating C# code for inheritance

what is g enerated

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

team foundation server extensibility31
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

team foundation server
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.
reference assemblies
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);
tfs extensibility

TFS Extensibility

A change log using the TFS assemblies

trying to model version control
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)

tfs extensibility summary
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
team foundation server extensibility39
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

introducing visual studio 2008 shell
Introducing: Visual Studio 2008 Shell
  • Empty “Shell” with IDE features.
  • No Visual Studio as a pre-requisite.
  • Accelerates development.
integrated vs isolated modes
Integrated vs. Isolated Modes

VS Shell (isolated) Runtime

VS Shell (isolated) Runtime

storyboard designer

Storyboard Designer

A Specialized Tool Built on

Visual Studio 2008 Shell (isolated mode)

vs ecosystem growth
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.
resources
Resources

http://msdn.com/vsx

for french reading audience
For French reading audience
  • http://www.dslfactory.org
package architecture

IVsPackage

Package Architecture

Package

  • Visual Studio’s logical unit of extensibility.
  • Each package contains a CoCreate-able COM object (IVsPackage) and supporting COM objects.
  • Same architecture is used for MS built features as well as 3rd party extensions.

Service

  • Basic programming model of the IDE.
  • A service is an interface contract implemented by a single COM object.
  • Packages can register the services they proffer through the Global Service Provider (IDE).
  • Packages can also use Global Service Provider (IDE) to query services proffered by other packages.

IDE

SVsShell

SVsUIShell

SVsToolbox

Proffers

MyPackage

MyService

managed package framework
Managed Package Framework

Project Base Classes

Microsoft.VisualStudio.LanguageService.dll

Microsoft.VisualStudio.Shell.dll

  • Managed framework for package development
  • Provides many base class implementations to simplify development
  • Core scenarios:
  • Menus and commands
  • Tool windows
  • Options pages
  • Task List, Error List, Properties Window integration
  • Registration attributes
  • Managed project systems
slide54

Everything you need to start building VS Shell applications and VS extensions

  • Frequent updates and release
  • Get it today at http://msdn.com/vsx

DSL

Help Integration

Team Build

Reusable Components

Work Item Tracking

Debugger

Data Design

Extensibility

SCC Provider

TFS Reporting

Test Extensibility

IDE Integration

Team System Integration

Editor

Language

Project System

TFS Core Services

Process Customization

Basic IDE Integration

development vs deployment
Development vs. Deployment

Development

Deployment

+

+

+

how to create a dsl
How to Create a DSL ?
  • A project type (choose a template)
  • Modify the Domain Model
  • Update the Designer Definition
  • Write custom code for validation, coherence … advanced graphical aspects, and integration with VS
  • T4 code for code generators
  • All this would require a few hours ….

Forum Architecte - 23 février 2003

elaborating the domain model
Elaborating the Domain Model

Class

Property

Agregation

Reference

Inheritance

as far as the presentation is concerned
As far as the presentation is concerned

It is possible to :

  • Decide how a class should be represented
    • Geometric shape, Image, Compartments shape, But also Diagram, SwimLane, Port
  • Decide how to represent a relationship (compartment, connector)
  • Add decorators (textuals its texts is mapped to a property), Icon. Their visibility might be conditional.
validation of the dsls
Validation of the DSLs
  • 2 attributes to remember :
    • On the class being validated

[ValidationState(ValidationState.Enabled)]

publicpartialclassStep

{

...

}

  • On the method computing a validation

[ValidationMethod(ValidationCategories.Open|ValidationCategories.Menu

|ValidationCategories.Save)]

voidValidateFinalStateShouldBeSuccesOrFailure(ValidationContextcontext)

{

...

}

  • Trigger validation in domain definition explorer
coherence rules for the dsls
Coherence Rules for the DSLs
  • AddRule
  • DeletingRule
  • DeleteRule
  • ChangeRule
  • RolePlayerChangeRule
  • RolePlayerPositionChangeRule
  • TransactionBeginningRule
  • TransactionCommitingRule
  • TransactionRollingBackRule
coherence rules for dsls
Coherence rules for DSLs
  • Attribute to determine what the rule applies to.

[RuleOn(typeof(Creator), FireTime=TimeToFire.TopLevelCommit)]

classCreatingModelCreatesInformationAndBehavior : AddRule

{

...

}

  • Take rule into account in Domain Model

publicpartialclassLanguageGeometryDomainModel

{

protectedoverrideType[] GetCustomDomainModelTypes()

{

returnnewType[]

{

typeof(CreatingModelCreatesInformationAndBehavior )

};

}

}