Skip to content

Commit

Permalink
Land #283, Always have a FindUsagesProvider#getType
Browse files Browse the repository at this point in the history
  • Loading branch information
KronicDeth committed Mar 31, 2016
2 parents d48302b + 7228a82 commit bba9f5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/org/elixir_lang/FindUsagesProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ public String getHelpId(@NotNull PsiElement psiElement) {
@NotNull
@Override
public String getType(@NotNull final PsiElement element) {
// Intentionally use `null` to trigger `@NotNull` when a new element type is passed.
String type = null;
String type = "unknown element type";

if (element instanceof Call) {
Call call = (Call) element;
Expand Down Expand Up @@ -126,6 +125,8 @@ public String getType(@NotNull final PsiElement element) {
type = "use";
} else if (element instanceof AtUnqualifiedNoParenthesesCall) {
type = "module attribute";
} else {
type = "unknown call type";
}
} else if (element instanceof MaybeModuleName) {
MaybeModuleName maybeModuleName = (MaybeModuleName) element;
Expand All @@ -135,7 +136,6 @@ public String getType(@NotNull final PsiElement element) {
}
}

//noinspection ConstantConditions
return type;
}

Expand Down

0 comments on commit bba9f5a

Please sign in to comment.