Search in sources :

Example 1 with QueryInfo

use of com.intellij.tasks.youtrack.lang.YouTrackHighlightingAnnotator.QueryInfo in project intellij-community by JetBrains.

the class YouTrackHighlightingAnnotator method collectInformation.

@Nullable
@Override
public QueryInfo collectInformation(@NotNull PsiFile file, @NotNull Editor editor, boolean hasErrors) {
    final YouTrackIntellisense intellisense = file.getUserData(YouTrackIntellisense.INTELLISENSE_KEY);
    if (intellisense == null || !intellisense.getRepository().isConfigured()) {
        return null;
    }
    final String text = file.getText();
    final int offset = editor.getCaretModel().getOffset();
    //LOG.debug(String.format("Highlighting YouTrack query: '%s' (cursor=%d)", text, offset));
    return new QueryInfo(offset, text, intellisense);
}
Also used : YouTrackIntellisense(com.intellij.tasks.youtrack.YouTrackIntellisense) QueryInfo(com.intellij.tasks.youtrack.lang.YouTrackHighlightingAnnotator.QueryInfo) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

YouTrackIntellisense (com.intellij.tasks.youtrack.YouTrackIntellisense)1 QueryInfo (com.intellij.tasks.youtrack.lang.YouTrackHighlightingAnnotator.QueryInfo)1 Nullable (org.jetbrains.annotations.Nullable)1