Most people don’t know that you can use the Insert key to add a property to an entity in the LightSpeed designer. And part of the reason most people don’t know it is that it isn’t very useful. You’re typically going to be applying some settings to the property, like setting its data type, which means you’re probably going to be reaching for the mouse anyway.
But wait, power users! The latest nightly build of the designer now comes with super sparkle keyboard support! Super sparkle makes it easy for you to enter a bunch of properties without taking your hands away from the keyboard — a big time-saver if you’re doing model-first development and you’re a quick typist.
Beginning with the current nightly build, if you edit a property name and put a type name before it, then LightSpeed will apply the type name as the data type instead of treating it dumbly as part of the name. So you can now hit Insert to create the property and just start typing to set the data type as well as the name. Take a look:
Super sparkle recognises int as a type name and sets the property data type appropriately (and strips the prefix from the property name):
You can use any data type name that appears in the Data Type drop-down, including user-defined and provider-defined types. The designer also recognises command C# and Visual Basic aliases such as int, long, integer, etc. And if you want the property to be nullable, just suffix a question mark to the type name, e.g. int? Height.
So if you’ve got a bunch of properties to set up, you can just hit the Insert key, enter the type and name of the first property, hit Enter, hit Insert again, enter the type and name of the second property, hit Enter, and so on. No need to go to the Properties window, no need to open the right-click menu, no need to reach for the mouse.
Super sparkle is available in the current nightly build (free Express edition here or retail edition from the store). Get it quick, before Marketing changes the name to Keyboard Productivity Enhancement Tools 2010 Wave Community Technology Preview.