mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
simple language: cleanup SimpleReference
This commit is contained in:
parent
420cc1a328
commit
742a193219
@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package org.intellij.sdk.language;
|
||||
|
||||
@ -14,11 +14,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SimpleReference extends PsiReferenceBase<PsiElement> implements PsiPolyVariantReference {
|
||||
final class SimpleReference extends PsiReferenceBase<PsiElement> implements PsiPolyVariantReference {
|
||||
|
||||
private final String key;
|
||||
|
||||
public SimpleReference(@NotNull PsiElement element, TextRange textRange) {
|
||||
SimpleReference(@NotNull PsiElement element, TextRange textRange) {
|
||||
super(element, textRange);
|
||||
key = element.getText().substring(textRange.getStartOffset(), textRange.getEndOffset());
|
||||
}
|
||||
@ -31,7 +31,7 @@ public class SimpleReference extends PsiReferenceBase<PsiElement> implements Psi
|
||||
for (SimpleProperty property : properties) {
|
||||
results.add(new PsiElementResolveResult(property));
|
||||
}
|
||||
return results.toArray(new ResolveResult[results.size()]);
|
||||
return results.toArray(new ResolveResult[0]);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
Loading…
x
Reference in New Issue
Block a user