210 likes | 359 Views
Technical Session: Tau Power Tricks. Greg Gorman Tau Semi-Guru With apologies to non-dog-lovers…. Agenda. Simple Tricks Keyboard shortcuts Startup flags URN’s Medium Tricks Drawing shortcuts Auto-completion Auto-placement Advanced Tricks Stereotypes and tagged values Scripting
E N D
Technical Session:Tau Power Tricks Greg Gorman Tau Semi-Guru With apologies to non-dog-lovers….
Agenda • Simple Tricks • Keyboard shortcuts • Startup flags • URN’s • Medium Tricks • Drawing shortcuts • Auto-completion • Auto-placement • Advanced Tricks • Stereotypes and tagged values • Scripting • FI Debugger
Startup Flags • VCS.EXE (Windows) or tau (Unix) [–Script ScriptName] [-SuppressSplashScreen] [ProjectName]
URN’s • There are five predefined names, “u2”, “u2user”, “u2useraddins”, “u2teamaddins” and “u2companyaddins”. • u2 maps to the Tau installation directory • u2user maps to the user directory • u2useraddins maps to where user add-ins are located • u2teamaddins maps to where the team add-ins are located • u2companyaddins maps to where the company add-ins are located
Drawing Shortcuts • Varies slightly by editor • Hold down Ctrl, pallette shows you what symbols are valid in the selected context • Ctrl-Space is very helpful! • Class Diagram • Activity Diagram • Statemachine Diagram • Sequence Diagram • D&D of a signal
Auto-completion (Intellisense) • Ctrl-Space pops up a list of elements that are valid in the current context • Very useful for signals on SD, Class names, etc.
Reference Existing • Useful when you want to place a new symbol that references an existing model element • Remember, using the tool bar and putting in the same name creates a new, distinct element! • Alternative to drag/drop from Model View • Activated via right-click Sequence Diagram Class Diagram
Available on Statemachine Diagram and Activity Diagram Shift-Space activates If you have a symbol selected, then press Shift-Space, you are presented with a list of “valid” next symbols. Use the Up/Down Arrows to pick and press Enter. Symbol is placed in line and connected. Next time you press Shift -Space, if it’s valid, the same symbol is pre-selected. A super-fast way to block out a diagram! Auto-Placement
Stereotypes and Tagged Values • Sometimes you want to capture some additional information about elements in the model. • Example “Review Status” for a Diagram Create this in your model, drag/drop the ‘Diagram’ element from TTDMetamodel Apply the stereotype to any diagram Now you can Query for all Diagrams that are in a certain state!
Scripting • Create a simple Agent script to print the GUID of any element on demand [[ proc ShowGUID { triggeredBy timing context server agentParameters } { upvar 1 $agentParameters ap set sel [std::GetSelection] if {$sel == ""} {return} set guid [u2::GetValue $sel guid] std::Output "Name: [u2::GetValue $sel Name], Guid:$guid, Kind:[u2::GetMetaClassName $sel]\n" } ]]
FI Debugger • Used to examine the detailed metamodel and interconnections between UML elements • Extremely useful when writing advanced Agents and scripts • DO NOT use on a daily or “normal” basis • Very resource-intensive! • Part of the “SDK” add-in (a separate download) • Telelogic Support Web>Tau>“Tau Addins” page.