index > Visual Studio Team System - Domain-Specific Language Tools > Context menu item localization

Context menu item localization


Can I localize context menu item in my diagram (Add, Collaps, Delete...)?

Thanks

Ivana

Ivana Vozkova

The standard menu text comes from Microsoft.VisualStudio.Modeling.Sdk.Shell.dll. The menu text comes from within this DLL. Having said that, it dose not prevent you from writing your own command set. In another words, you can simply override

protected virtual IList<MenuCommand> GetMenuCommands()

defined in Microsoft.VisualStudio.Modeling.Shell namespace. In your generated language, you have a commandset.cs file generated for you (in your GeneratedCode folder under your DslPackage project.). Yon will need to create a partial class MyLangCommandSet and override this command to supply your own menu text (which can be localized if you wish). NOtice that we're using the double-derived scheme for you to customize your code. In your case, you would simply skiping what the base (in Microsoft.VisualStudio.Modeling.Sdk.Shell.dll) proffer and roll your own own command handlers...




Patrick Tseng
Patrick Tseng
reply 2

You can use google to search for other answers

 

More Articles

DSL Support For Reverse Engineering, Object Persistence and ASP.N...
UML Sequence diagram in DSL?
How to Dynamically create shapes
Licence options for the generated model
How to generate additional property for embedding elements
Problems with DSL Tools walk-through
A better name for a BlankLanguage
Custom connector target (June CTP)
Concept's Properties
Dynamically Create Links OnAttributeChange Event`s
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Double Click on Compartment Item
Validation when dropping an element on t…
updated DSL Customization Samples and Gu…
changing defaults in inherited propeties
Popup dialog in DSL
Has the hosting question been resolved?
timescale for DSL additions
Defining custom multiplicities
"DSL DM -> DD" for November…
Compartment Shape for Model
Using a Template to iterate on all model…
Shapes that are not directly related to …
VS SDK March 2006 CTP
Transcript of Web Chat: Using the Domain…
Question on using the domain model desig…

Hot Articles

Diagram Size
GAC support in Templating Engine (Featur…
Compartment Shape Equivalents
blog post suggestions: mdfddt/mdfomt fil…
Dynamically Create Links OnAttributeChan…
How to access the Session in subdomain?
T4 Example of passing parameters to Text…
Changing Role Players in the Properties …
More than one Diagram / File - Extension…
2 problems with V1 release
diagram.AutoLayoutChildShapes(???)
Using Pictures
November 2005 CTP available
Changing image displayed by image shape …
Why must the ShapeField's value be assoc…

Recommend Articles

No items in the toolbox
DSL Tools outside VS?
How to make Tree's?
Shape Icon and Shape Tool Minor Bug
How to migrate / implement CustomStorage…
How can i force the placement of a port …
How to remove non application menu-items…
How to change the font of a shape?
How to add a custom dialog for properties?
Troubleshooting: replicating toolbox items
where can ? find info about DSL?
Serialize reference type class member
Workaround: Recovering invalid model fil…
DSL Toolkit for August CTP ?
Come Join the World's Largest Software F…