Lines 53-69
Link Here
|
53 |
} |
53 |
} |
54 |
|
54 |
|
55 |
public static SourceFileInfo getSourceFileInfo(String functionSignature) { |
55 |
public static SourceFileInfo getSourceFileInfo(String functionSignature) { |
56 |
int indexOf = functionSignature.lastIndexOf("+"); //NOI18N |
56 |
int indexOf = functionSignature.indexOf("+"); //NOI18N |
|
|
57 |
int functionOffsetIndex = -1; |
57 |
//now we should get source file info (if presented) |
58 |
//now we should get source file info (if presented) |
58 |
while (indexOf > 0) { |
59 |
while (indexOf > 0) { |
59 |
if (functionSignature.length() > indexOf + 1 |
60 |
if (functionSignature.length() > indexOf + 2 |
60 |
&& functionSignature.charAt(indexOf + 1) == '0') { //NOI18N |
61 |
&& functionSignature.charAt(indexOf + 1) == '0' && //NOI18N |
61 |
break; |
62 |
functionSignature.charAt(indexOf + 2) == 'x') { //NOI18N |
|
|
63 |
functionOffsetIndex = indexOf; |
62 |
} |
64 |
} |
63 |
indexOf = functionSignature.indexOf("+", indexOf + 1); //NOI18N |
65 |
indexOf = functionSignature.indexOf("+", indexOf + 1); //NOI18N |
64 |
} |
66 |
} |
|
|
67 |
//find function qualififed name |
68 |
String functionQualifiedName = getFunctionQName(functionSignature); |
69 |
int prev = indexOf; |
70 |
indexOf = functionSignature.indexOf(functionQualifiedName); |
71 |
if (indexOf >= 0 ){ |
72 |
indexOf = indexOf + functionQualifiedName.length(); |
73 |
} |
74 |
if (indexOf == 0){ |
75 |
indexOf = prev; |
76 |
} |
65 |
//here we are: after the function offset there could be : which starts file:line |
77 |
//here we are: after the function offset there could be : which starts file:line |
66 |
int indexOfFile = functionSignature.indexOf(":", indexOf); //NOI18N |
78 |
int indexOfFile = functionSignature.indexOf(":", functionOffsetIndex); //NOI18N |
67 |
if (indexOfFile < 0) { |
79 |
if (indexOfFile < 0) { |
68 |
return null; |
80 |
return null; |
69 |
} |
81 |
} |