RInfixData infixData = RInfixData.create();
AceEditor editor = (AceEditor) docDisplay_;
if (editor != null)
{
CodeModel codeModel = editor.getSession().getMode().getCodeModel();
TokenCursor cursor = codeModel.getTokenCursor();
if (cursor.moveToPosition(input_.getCursorPosition()))
{
String token = "";
if (cursor.currentType() == "identifier")
token = cursor.currentValue();
String cursorPos = "left";
if (cursor.currentValue() == "=")
cursorPos = "right";
TokenCursor clone = cursor.cloneCursor();
if (clone.moveToPreviousToken())
if (clone.currentValue() == "=")
cursorPos = "right";
// Try to get a dplyr join completion
DplyrJoinContext joinContext =
codeModel.getDplyrJoinContextFromInfixChain(cursor);
// If that failed, try a non-infix lookup
if (joinContext == null)
{
String joinString =
getDplyrJoinString(editor, cursor);
if (!StringUtil.isNullOrEmpty(joinString))
{
requester_.getDplyrJoinCompletionsString(
token,
joinString,
cursorPos,
implicit,
context_);
return true;
}
}
else
{
requester_.getDplyrJoinCompletions(
joinContext,
implicit,
context_);
return true;
}
// Try to see if there's an object name we should use to supplement
// completions
if (cursor.moveToPosition(input_.getCursorPosition()))
infixData = codeModel.getDataFromInfixChain(cursor);
}
}
String filePath = getSourceDocumentPath();
if (filePath == null)