Child pages
  • Plugin Development FAQ
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

This FAQ is a topical index of questions that have been asked (and answered) on our OpenAPI forum. This is a work in progress.

Thanks to Sasha Weinreuter for his help in compiling the FAQ.

Open-Source Plugins

How do I compile the Scala plugin?

Version Differences

How do I replace my usage of Project.getProjectFile() in 7.0?
How do I replace my usage of DataConstants with DataKeys in 7.0?
How do I replace my usage of ToolWindowManager.registerToolWindow() in 7.0?
How do I replace my usage of PsiSearchHelper.findReferences() in 7.0?

Action System

How do I trigger actions programmatically?
How do I add a main menu item?
How do I customize the "New..." menu?
How do I customize the compiler output context menu?
How do I get the context of an action (selected file, active project etc.)?
How do I change the icon of an action dynamically?


How do I find all subclasses of a class?
How do I find all anonymous classes created in a class?
How do I calculate the value of a string literal token?
How do I rename or move a Java class?
How do I build the list of all classes used by a given class or package?
How do I change the value of an XML attribute through the PSI?
How do I insert whitespace into the PSI?
How do I add properties to a .properties file?
How do I find specific method calls inside a PsiMethod?
How do I add custom references to Java elements in XML files?
What is the lifecycle of a PSI element?

Code Completion

How do I determine what type of code completion was invoked?
How do I provide additional code completion in specific places of a Java file?

Version Control Integration

Can I provide line status markers for files in a custom file system?
How do I update the state of VCS actions depending on file status?
How can I find out the module of a deleted file?
Can I provide additional decorations for changelists in the Changes view?
How do I report out-of-date files?

Test Framework

How do I create a library dependency in my test module?


What is the "strict" parameter in DomElement.getParentOfType()?

Plugin Descriptors

Why are the extension elements in my plugin.xml red?

Editors, Documents and Files

Why doesn't the file change on disk after I changed it through the PSI?
Can I hook into the file save logic?
Can I mark a part of a file as read-only? How do I control what happens when the user tries to edit such a part?
How do I implement a custom editor?
How can I show several editors for a single file in tabs?
Can I open an editor which has no underlying file on disk?
How do I save the content of my custom editor when the user saves all documents?
How do I highlight elements in a source code editor? How do I allow to navigate between highlighted elements using Find Next?
How do I force code to be re-analyzed?


Can I build an inspection that processes XML files?

Project Structure

Can I add a new module dependency storage format?

Custom Languages

How do I provide Parameter Info support for my language?
How do I provide auto-popup code completion in my language?
How to make a closing brace unindent?
How to automatically insert closing quotes?
How do I provide Ctrl+mouse popups for my language?

User Interface

How do I provide animated status bar notifications?
How do I enable file name completion in a combobox?
How do I show a popup with left-aligned and right-aligned parts for each item?
Can I use an embedded Web browser from my plugin?
How do I provide a custom icon for files/PSI elements?
Can I show a progress indicator for WriteActions?
How do I make it possible to search the options of my plugin in the Settings dialog?
How do I show a custom window or popup based on Structure View?


How do I get the currently active project outside of an AnAction?
How do I detect when a project is closing?

  • No labels