go_to_symbol_contributor.md: sync code sample

This commit is contained in:
Yann Cébron 2021-06-08 12:39:41 +02:00
parent 98fbdcefed
commit 3dbe04530f

View File

@ -14,25 +14,25 @@ Add the following method to `SimplePsiImplUtil`:
```java
public static ItemPresentation getPresentation(final SimpleProperty element) {
return new ItemPresentation() {
@Nullable
@Override
public String getPresentableText() {
return element.getKey();
}
@Nullable
@Override
public String getPresentableText() {
return element.getKey();
}
@Nullable
@Override
public String getLocationString() {
return element.getContainingFile().getName();
}
@Nullable
@Override
public String getLocationString() {
PsiFile containingFile = element.getContainingFile();
return containingFile == null ? null : containingFile.getName();
}
@Nullable
@Override
public Icon getIcon(boolean unused) {
return SimpleIcons.FILE;
}
@Override
public Icon getIcon(boolean unused) {
return SimpleIcons.FILE;
}
};
}
}
```
## Update Grammar and Regenerate the Parser