@@ -125,17 +125,18 @@ protected static void extractMappingSymbol(MethodInvocation node, TextDocument d
125125 try {
126126
127127 Location location = new Location (doc .getUri (), doc .toRange (methodNameStart , node .getLength () - (methodNameStart - invocationStart )));
128- WebfluxHandlerMethodIndexElement handler = extractHandlerInformation (node , path , httpMethods , contentTypes , acceptTypes );
129- WebfluxRouteElementRangesIndexElement elements = extractElementsInformation (pathElements , httpMethods , contentTypes , acceptTypes );
130-
131- if (handler != null ) indexElementsCollector .add (handler );
132- if (elements != null ) indexElementsCollector .add (elements );
133128
134129 WorkspaceSymbol symbol = RouteUtils .createRouteSymbol (location , path , getElementStrings (httpMethods ),
135130 getElementStrings (contentTypes ), getElementStrings (acceptTypes ));
136131
137132 context .getGeneratedSymbols ().add (new CachedSymbol (context .getDocURI (), context .getLastModified (), symbol ));
138133
134+ WebfluxHandlerMethodIndexElement handler = extractHandlerInformation (node , path , httpMethods , contentTypes , acceptTypes , location .getRange (), symbol .getName ());
135+ WebfluxRouteElementRangesIndexElement elements = extractElementsInformation (pathElements , httpMethods , contentTypes , acceptTypes );
136+
137+ if (handler != null ) indexElementsCollector .add (handler );
138+ if (elements != null ) indexElementsCollector .add (elements );
139+
139140 } catch (BadLocationException e ) {
140141 log .error ("bad location while extracting mapping symbol for " + doc .getUri (), e );
141142 }
@@ -319,7 +320,7 @@ private static void extractNestedValue(ASTNode node, Collection<WebfluxRouteElem
319320 }
320321
321322 private static WebfluxHandlerMethodIndexElement extractHandlerInformation (MethodInvocation node , String path , WebfluxRouteElement [] httpMethods ,
322- WebfluxRouteElement [] contentTypes , WebfluxRouteElement [] acceptTypes ) {
323+ WebfluxRouteElement [] contentTypes , WebfluxRouteElement [] acceptTypes , Range range , String symbolLabel ) {
323324
324325 List <?> arguments = node .arguments ();
325326
@@ -336,7 +337,8 @@ private static WebfluxHandlerMethodIndexElement extractHandlerInformation(Method
336337 String handlerMethod = methodBinding .getMethodDeclaration ().toString ();
337338 if (handlerMethod != null ) handlerMethod = handlerMethod .trim ();
338339
339- return new WebfluxHandlerMethodIndexElement (handlerClass , handlerMethod , path , getElementStrings (httpMethods ), getElementStrings (contentTypes ), getElementStrings (acceptTypes ));
340+ return new WebfluxHandlerMethodIndexElement (handlerClass , handlerMethod , path , getElementStrings (httpMethods ), getElementStrings (contentTypes ),
341+ getElementStrings (acceptTypes ), range , symbolLabel );
340342 }
341343 }
342344 }
0 commit comments