Denis Kudriashov wrote> ^CmdShortcutCommandActivation by: *$r meta* for: ClyPackageBrowserContext> Generally it is same like having pragma with parameters.
> But with annotation you are not restricted by literal objects. So
> annotation parameters can be anything.
>
> And it is important feature for Commander.
> For example I need instance of KMKeyCombination to define shortcut for
> command. So I just use normal expression for this:
>
> RenamePackageCommand class>>packageBrowserShortcutActivati on
> <classAnnotation>
>
>
> It will be very complicated to express it with method pragma and it will
> be
> restricted anyway.
Would it?
With pure method tags, you'd do something like:
SomeClass >> #renamePackage: aPackage
<command: 'Rename package'
category: 'Package'
order: 25
shortcut: #($r meta)>
... method renaming package here ...
Then have different pragma traversers capable of creating the actual menus /
commands invoking such methods.
(And yes, all caching/invalidation would be the responsibility of the
traverser(s) if necessary, as usual)
Cheers,
Henry
Free forum by Nabble | Edit this page |