@@ -107,8 +107,8 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
107107 ? modeledMethodsProp
108108 : modeledMethodsProp . slice ( 0 , 1 ) ;
109109
110- const jumpToUsage = useCallback (
111- ( ) => sendJumpToUsageMessage ( method ) ,
110+ const jumpToMethod = useCallback (
111+ ( ) => sendJumpToMethodMessage ( method ) ,
112112 [ method ] ,
113113 ) ;
114114
@@ -126,11 +126,11 @@ const ModelableMethodRow = forwardRef<HTMLElement | undefined, MethodRowProps>(
126126 < MethodClassifications method = { method } />
127127 < MethodName { ...props . method } />
128128 { viewState . mode === Mode . Application && (
129- < UsagesButton onClick = { jumpToUsage } >
129+ < UsagesButton onClick = { jumpToMethod } >
130130 { method . usages . length }
131131 </ UsagesButton >
132132 ) }
133- < ViewLink onClick = { jumpToUsage } > View</ ViewLink >
133+ < ViewLink onClick = { jumpToMethod } > View</ ViewLink >
134134 { props . modelingInProgress && < ProgressRing /> }
135135 </ ApiOrMethodRow >
136136 </ VSCodeDataGridCell >
@@ -206,8 +206,8 @@ const UnmodelableMethodRow = forwardRef<
206206> ( ( props , ref ) => {
207207 const { method, viewState, revealedMethodSignature } = props ;
208208
209- const jumpToUsage = useCallback (
210- ( ) => sendJumpToUsageMessage ( method ) ,
209+ const jumpToMethod = useCallback (
210+ ( ) => sendJumpToMethodMessage ( method ) ,
211211 [ method ] ,
212212 ) ;
213213
@@ -222,11 +222,11 @@ const UnmodelableMethodRow = forwardRef<
222222 < ModelingStatusIndicator status = "saved" />
223223 < MethodName { ...props . method } />
224224 { viewState . mode === Mode . Application && (
225- < UsagesButton onClick = { jumpToUsage } >
225+ < UsagesButton onClick = { jumpToMethod } >
226226 { method . usages . length }
227227 </ UsagesButton >
228228 ) }
229- < ViewLink onClick = { jumpToUsage } > View</ ViewLink >
229+ < ViewLink onClick = { jumpToMethod } > View</ ViewLink >
230230 < MethodClassifications method = { method } />
231231 </ ApiOrMethodRow >
232232 </ VSCodeDataGridCell >
@@ -238,12 +238,10 @@ const UnmodelableMethodRow = forwardRef<
238238} ) ;
239239UnmodelableMethodRow . displayName = "UnmodelableMethodRow" ;
240240
241- function sendJumpToUsageMessage ( method : Method ) {
241+ function sendJumpToMethodMessage ( method : Method ) {
242242 vscode . postMessage ( {
243- t : "jumpToUsage" ,
244- method,
245- // In framework mode, the first and only usage is the definition of the method
246- usage : method . usages [ 0 ] ,
243+ t : "jumpToMethod" ,
244+ methodSignature : method . signature ,
247245 } ) ;
248246}
249247
0 commit comments