Qualifying Context Pattern Plugin Methods
Calling Plugins from Context Patterns
As you may already be aware you can call java plugin methods from within context patterns, for example:
{uc}pluginMethod:getUseCases
But you may not know that you can qualify that with a specific plugin. Doing so has two advantages:
- Performance. If you don't qualify it then Rhapsody looks in every currently loaded plugin for a public method with that name. If you qualify it then Rhapsody only has to check that plugin.
- Name Clashes. If another loaded plugin has a public method with the same name as the one you want to call its a crapshoot - Rhapsody will use the first one it finds.
Qualifying Method Calls
To qualify the method simply prefix the method with the name of the plugin and a colon. That is the name of the plugin from the HEP file that loads it (not the java class name). For example:
{uc}pluginMethod:MyPlugin:getUseCases