File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 2626 /**
2727 * In how many ways is this command used. Will always be at least 1.
2828 */
29- int getNumberOfUsages ( ) { result = count ( CommandUsage e | e .getCommandName ( ) = this | e ) }
29+ int getNumberOfUsages ( ) { result = count ( this .getAUse ( ) ) }
30+
31+ /**
32+ * Get a usage of this command.
33+ */
34+ CommandUsage getAUse ( ) { result .getCommandName ( ) = this }
3035
3136 /**
3237 * Get the canonical first usage of this command, to use for the location
3540 * the alert.
3641 */
3742 CommandUsage getFirstUsage ( ) {
38- result .getCommandName ( ) = this and
39- forall ( CommandUsage e | e .getCommandName ( ) = this |
40- e .getLocationOrdinal ( ) >= result .getLocationOrdinal ( )
41- )
43+ result = max ( CommandUsage use | use = this .getAUse ( ) | use order by use .getLocationOrdinal ( ) )
4244 }
4345 }
4446
You can’t perform that action at this time.
0 commit comments