@@ -4,18 +4,15 @@ import PhpNamespace from 'common/PhpNamespace';
44import { AutoloadNamespaceIndexData } from 'indexer/autoload-namespace/AutoloadNamespaceIndexData' ;
55import AutoloadNamespaceIndexer from 'indexer/autoload-namespace/AutoloadNamespaceIndexer' ;
66import IndexManager from 'indexer/IndexManager' ;
7- import Common from 'util/Common' ;
87import { Hover , HoverProvider , Position , TextDocument } from 'vscode' ;
98
109export default class XmlClasslikeHoverProvider implements HoverProvider {
1110 private namespaceIndexData : AutoloadNamespaceIndexData | undefined ;
1211
1312 public async provideHover ( document : TextDocument , position : Position ) : Promise < Hover | null > {
14- Common . startStopwatch ( 'hover' ) ;
1513 const range = document . getWordRangeAtPosition ( position , / " [ ^ " ] * " / ) ;
1614
1715 if ( ! range ) {
18- Common . stopStopwatch ( 'hover' ) ;
1916 return null ;
2017 }
2118
@@ -24,7 +21,6 @@ export default class XmlClasslikeHoverProvider implements HoverProvider {
2421 const namespaceIndexData = this . getNamespaceIndexData ( ) ;
2522
2623 if ( ! namespaceIndexData ) {
27- Common . stopStopwatch ( 'hover' ) ;
2824 return null ;
2925 }
3026
@@ -35,14 +31,12 @@ export default class XmlClasslikeHoverProvider implements HoverProvider {
3531 ) ;
3632
3733 if ( ! classUri ) {
38- Common . stopStopwatch ( 'hover' ) ;
3934 return null ;
4035 }
4136
4237 const phpFile = await PhpDocumentParser . parseUri ( document , classUri ) ;
4338 const classLikeInfo = new ClasslikeInfo ( phpFile ) ;
4439
45- Common . stopStopwatch ( 'hover' ) ;
4640 return new Hover ( classLikeInfo . getHover ( ) , range ) ;
4741 }
4842
0 commit comments