summaryrefslogtreecommitdiff
path: root/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandlerFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandlerFactory.java')
-rw-r--r--java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandlerFactory.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandlerFactory.java b/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandlerFactory.java
index def7501d93e5..b096aeb40a89 100644
--- a/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandlerFactory.java
+++ b/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandlerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,21 +15,19 @@
*/
package com.intellij.codeInsight.highlighting;
-import com.intellij.codeInsight.TargetElementUtilBase;
import com.intellij.openapi.editor.Editor;
import com.intellij.psi.*;
+import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* @author Bas Leijdekkers
*/
-public class HighlightImportedElementsHandlerFactory implements HighlightUsagesHandlerFactory {
+public class HighlightImportedElementsHandlerFactory extends HighlightUsagesHandlerFactoryBase {
@Nullable
@Override
- public HighlightUsagesHandlerBase createHighlightUsagesHandler(Editor editor, PsiFile file) {
- final int offset = TargetElementUtilBase.adjustOffset(file, editor.getDocument(), editor.getCaretModel().getOffset());
- final PsiElement target = file.findElementAt(offset);
+ public HighlightUsagesHandlerBase createHighlightUsagesHandler(@NotNull Editor editor, @NotNull PsiFile file, @NotNull PsiElement target) {
if (!(target instanceof PsiKeyword) || !PsiKeyword.IMPORT.equals(target.getText())) {
return null;
}