int ActivationSequenceContextProcessor::findStartOfName(
        const TextEditor::AssistInterface *assistInterface,
        int startPosition)
{
    int position = startPosition;
    QChar character;
    do {
        character = assistInterface->characterAt(--position);
    } while (isValidIdentifierChar(character));

    return position + 1;
}
コード例 #2
0
int CompletionAssistProcessor::findStartOfName(int pos) const
{
    if (pos == -1)
        pos = m_interface->position();
    QChar chr;

    // Skip to the start of a name
    do {
        chr = m_interface->characterAt(--pos);
    } while (isValidIdentifierChar(chr) || (chr == '.') );

    return pos + 1;
}
コード例 #3
0
void CompletionAssistProcessor::findPrefixes(int pos, int &posMerlin, int &posQtC) const
{
    // getting a merlin substring of a format : aaaaa.bbbb.prefixQtC
    if (pos == -1)
        pos = m_interface->position();
    QChar chr;
    bool stopQtC = false;

    // Skip to the start of a name
    do {
        if (!stopQtC) {
            if (chr == '.') {
                stopQtC = true;
                posQtC = pos+1;
            } else
                posQtC--;
        }
        chr = m_interface->characterAt(--pos);
    } while (isValidIdentifierChar(chr) || (chr == '.') );

    posMerlin = pos+1;
}