div |
---|
|
HTML Table |
---|
|
Table Row (tr) |
---|
Table Cell (td) |
---|
Align |
---|
| Previous span |
---|
| Completion Contributor |
|
|
Table Cell (td) |
---|
Align |
---|
| Top span |
---|
| Custom Language Support |
|
|
Table Cell (td) |
---|
Align |
---|
|
Next span |
---|
|
Find Usages Provider Wiki Markup |
---|
{div:class=navigation}
{table:width=100%}
{tr}
{td} {align:left}[Previous|Completion Contributor] {span:class=sep}\|{span} {span:class=text}Completion Contributor{span}{align} {td}
{td} {align:center}[Top|Custom Language Support] {span:class=sep}\|{span} {span:class=text}Custom Language Support{span}{align} {td}
{td} {align:right}[Next|Find Usages Provider] {span:class=sep}\|{span} {span:class=text}Find Usages Provider{span}{align} {td}
{tr}
{table}
{div} |
References is one of the most important and tricky parts in the implementation of a custom language support. Resolving references means the ability to go from the usage of an element to the declaration of the element, completion, rename refactoring, find usages, etc.
Note |
---|
|
Every element which can be renamed or referenced needs to implement span |
---|
| Wiki Markup |
---|
{span:class=id}com.intellij.psi.PsiNamedElement{span} | interface. |
1. Define a base named element class
...
As you see the IDE now resolves the property and provides completion.

Additionally it supports
span |
---|
|
Rename Wiki Markup |
---|
{span:class=shortcut}Rename{span} |
refactoring available from definition and usages.
...
Code Block |
---|
<lang.refactoringSupport language="Simple" implementationClass="com.simpleplugin.SimpleRefactoringSupportProvider"/>
|
11. Run the project

div |
---|
|
HTML Table |
---|
|
Table Row (tr) |
---|
Table Cell (td) |
---|
Align |
---|
| Previous span |
---|
| Completion Contributor |
|
|
Table Cell (td) |
---|
Align |
---|
| Top span |
---|
| Custom Language Support |
|
|
Table Cell (td) |
---|
Align |
---|
|
Next span |
---|
|
Find Usages Provider Wiki Markup |
---|
{div:class=navigation}
{table:width=100%}
{tr}
{td} {align:left}[Previous|Completion Contributor] {span:class=sep}\|{span} {span:class=text}Completion Contributor{span}{align} {td}
{td} {align:center}[Top|Custom Language Support] {span:class=sep}\|{span} {span:class=text}Custom Language Support{span}{align} {td}
{td} {align:right}[Next|Find Usages Provider] {span:class=sep}\|{span} {span:class=text}Find Usages Provider{span}{align} {td}
{tr}
{table}
{div} |