@@ -229,6 +229,7 @@ public static void writeEMailAddress(Writer out, String address)
229
229
* @param urlPrefix a defined instance
230
230
* @param project a possibly defined instance or null
231
231
* @param symbol the symbol to write
232
+ * @param id the symbol to write, normalized according to language-specific conventions
232
233
* @param keywords a set of keywords recognized by this analyzer (no links
233
234
* will be generated if the symbol is a keyword)
234
235
* @param line the line number on which the symbol appears
@@ -240,7 +241,7 @@ public static void writeEMailAddress(Writer out, String address)
240
241
* @throws IOException if an error occurs while writing to the stream
241
242
*/
242
243
public static boolean writeSymbol (Writer out , Definitions defs ,
243
- String urlPrefix , Project project , String symbol , Set <String > keywords ,
244
+ String urlPrefix , Project project , String symbol , String id , Set <String > keywords ,
244
245
int line , boolean caseSensitive , boolean isKeyword )
245
246
throws IOException {
246
247
String [] strs = new String [1 ];
@@ -255,7 +256,7 @@ public static boolean writeSymbol(Writer out, Definitions defs,
255
256
return false ;
256
257
}
257
258
258
- if (defs != null && defs .hasDefinitionAt (symbol , line , strs )) {
259
+ if (defs != null && defs .hasDefinitionAt (id , line , strs )) {
259
260
// This is the definition of the symbol.
260
261
String type = strs [0 ];
261
262
String style_class = "d" ;
@@ -281,15 +282,15 @@ public static boolean writeSymbol(Writer out, Definitions defs,
281
282
out .append ("<a class=\" " );
282
283
out .append (style_class );
283
284
out .append ("\" name=\" " );
284
- Util .htmlize (symbol , out );
285
+ Util .htmlize (id , out );
285
286
out .append ("\" />" );
286
287
}
287
288
288
289
// 2) Create a link that searches for all references to this symbol.
289
290
out .append ("<a href=\" " );
290
291
out .append (urlPrefix );
291
292
out .append ("refs=" );
292
- Util .qurlencode (symbol , out );
293
+ Util .qurlencode (id , out );
293
294
appendProject (out , project );
294
295
out .append ("\" class=\" " );
295
296
out .append (style_class );
@@ -298,8 +299,8 @@ public static boolean writeSymbol(Writer out, Definitions defs,
298
299
out .append (">" );
299
300
Util .htmlize (symbol , out );
300
301
out .append ("</a>" );
301
- } else if (defs != null && defs .occurrences (symbol ) == 1 ) {
302
- writeSameFileLinkSymbol (out , symbol );
302
+ } else if (defs != null && defs .occurrences (id ) == 1 ) {
303
+ writeSameFileLinkSymbol (out , symbol , id );
303
304
} else {
304
305
// This is a symbol that is not defined in this file, or a symbol
305
306
// that is defined more than once in this file. In either case, we
@@ -308,7 +309,7 @@ public static boolean writeSymbol(Writer out, Definitions defs,
308
309
out .append ("<a href=\" " );
309
310
out .append (urlPrefix );
310
311
out .append ("defs=" );
311
- Util .qurlencode (symbol , out );
312
+ Util .qurlencode (id , out );
312
313
appendProject (out , project );
313
314
out .append ("\" " );
314
315
out .append (" class=\" intelliWindow-symbol\" " );
@@ -325,10 +326,11 @@ public static boolean writeSymbol(Writer out, Definitions defs,
325
326
* exactly one location in the same file.
326
327
* @param out a defined, target instance
327
328
* @param symbol the symbol to write
329
+ * @param id the symbol to write, normalized according to language-specific conventions
328
330
* @throws IOException if {@link Writer#append(java.lang.CharSequence)}
329
331
* fails
330
332
*/
331
- public static void writeSameFileLinkSymbol (Writer out , String symbol )
333
+ public static void writeSameFileLinkSymbol (Writer out , String symbol , String id )
332
334
throws IOException {
333
335
// This is a reference to a symbol defined exactly once in this file.
334
336
String style_class = "d" ;
@@ -337,7 +339,7 @@ public static void writeSameFileLinkSymbol(Writer out, String symbol)
337
339
out .append ("<a class=\" " );
338
340
out .append (style_class );
339
341
out .append (" intelliWindow-symbol\" href=\" #" );
340
- Util .URIEncode (symbol , out );
342
+ Util .URIEncode (id , out );
341
343
out .append ("\" " );
342
344
out .append (" data-definition-place=\" defined-in-file\" " );
343
345
out .append (">" );
0 commit comments