Skip to content

Commit

Permalink
PSI Cookbook: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
YannCebron committed May 21, 2019
1 parent cb4b62f commit dda50e0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions basics/psi_cookbook.md
Expand Up @@ -41,9 +41,12 @@ This page gives a list of recipes for the most common operations for working wit
### How do I get a reference to the containing package of a Java class?

```java
PsiJavaFile javaFile = (PsiJavaFile) psiClass.getContaningFile();
PsiJavaFile javaFile = (PsiJavaFile) psiClass.getContainingFile();
PsiPackage pkg = JavaPsiFacade.getInstance(project).findPackage(javaFile.getPackageName());
```
```
or

`com.intellij.psi.util.PsiUtil.getPackageName()`

### How do I find the methods overriding a specific method?

Expand Down

0 comments on commit dda50e0

Please sign in to comment.