File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
extensions/ql-vscode/src/view/data-extensions-editor Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,25 @@ export const MethodClassifications = ({ externalApiUsage }: Props) => {
3636 const inTest = allUsageClassifications . has ( CallClassification . Test ) ;
3737 const inGenerated = allUsageClassifications . has ( CallClassification . Generated ) ;
3838
39+ const tooltip = useMemo ( ( ) => {
40+ if ( inTest && inGenerated ) {
41+ return "This method is only used from test and generated code" ;
42+ }
43+ if ( inTest ) {
44+ return "This method is only used from test code" ;
45+ }
46+ if ( inGenerated ) {
47+ return "This method is only used from generated code" ;
48+ }
49+ return "" ;
50+ } , [ inTest , inGenerated ] ) ;
51+
3952 if ( inSource ) {
4053 return null ;
4154 }
4255
4356 return (
44- < ClassificationsContainer >
57+ < ClassificationsContainer title = { tooltip } >
4558 { inTest && < ClassificationTag > Test</ ClassificationTag > }
4659 { inGenerated && < ClassificationTag > Generated</ ClassificationTag > }
4760 </ ClassificationsContainer >
You can’t perform that action at this time.
0 commit comments