| 1895 | } |
| 1896 | |
| 1897 | String BfAutoComplete::GetFilter(BfAstNode* node) |
| 1898 | { |
| 1899 | String filter = node->ToString(); |
| 1900 | |
| 1901 | if (mIsGetDefinition) |
| 1902 | { |
| 1903 | mInsertEndIdx = node->GetSrcEnd(); |
| 1904 | } |
| 1905 | else |
| 1906 | { |
| 1907 | // Only use member name up to cursor |
| 1908 | auto bfParser = node->GetSourceData()->ToParser(); |
| 1909 | int cursorIdx = bfParser->mCursorIdx; |
| 1910 | filter = filter.Substring(0, BF_CLAMP(cursorIdx - node->GetSrcStart(), 0, (int)filter.length())); |
| 1911 | mInsertEndIdx = cursorIdx; |
| 1912 | } |
| 1913 | |
| 1914 | const char* cPtr = filter.c_str(); |
| 1915 | while (cPtr[0] == '@') |
| 1916 | { |
| 1917 | mInsertStartIdx++; |
| 1918 | cPtr++; |
| 1919 | } |
| 1920 | |
| 1921 | return filter; |
| 1922 | } |
| 1923 | |
| 1924 | bool BfAutoComplete::CheckMemberReference(BfAstNode* target, BfAstNode* dotToken, BfAstNode* memberName, bool onlyShowTypes, BfType* expectingType, bool isUsingDirective, bool onlyAttribute) |
| 1925 | { |
no test coverage detected