--- title: Plugin Development FAQ --- This FAQ is a topical index of questions that have been asked (and answered) on our [OpenAPI forum](https://devnet.jetbrains.com/community/idea/open_api_and_plugin_development) ## Open-Source Plugins * [How do I compile the Scala plugin?](https://devnet.jetbrains.com/thread/266848) ## Version Differences * [How do I replace my usage of Project.getProjectFile() in 7.0?](https://devnet.jetbrains.com/thread/269447) * [How do I replace my usage of DataConstants with DataKeys in 7.0?](https://devnet.jetbrains.com/thread/269493) * [How do I replace my usage of ToolWindowManager.registerToolWindow() in 7.0?](https://devnet.jetbrains.com/thread/269001) * [How do I replace my usage of PsiSearchHelper.findReferences() in 7.0?](https://devnet.jetbrains.com/thread/268094) * [How do I replace my usage of DelayedFileStatusProvider in 6.0?](https://devnet.jetbrains.com/thread/213530) ## Action System * [How do I trigger actions programmatically?](https://devnet.jetbrains.com/thread/268927) * [How do I add a main menu item?](https://devnet.jetbrains.com/thread/267076) * [How do I customize the "New..." menu?](https://devnet.jetbrains.com/thread/247161) * [How do I customize the compiler output context menu?](https://devnet.jetbrains.com/thread/257558) * [How do I get the context of an action (selected file, active project etc.)?](https://devnet.jetbrains.com/thread/234000) * [How do I change the icon of an action dynamically?](https://devnet.jetbrains.com/thread/233379) * [How do I add icons to the IDEA toolbar?](https://devnet.jetbrains.com/thread/148491) * [Where do I get the list of built-in action IDs?](https://devnet.jetbrains.com/thread/162503) ## Accessing and Modifying the Source Code * [How do I find all subclasses of a class?](https://devnet.jetbrains.com/thread/268652) * [How do I find all anonymous classes created in a class?](https://devnet.jetbrains.com/thread/267506) * [How do I calculate the value of a string literal token?](https://devnet.jetbrains.com/thread/267171) * [How do I rename or move a Java class?](https://devnet.jetbrains.com/thread/268809) * [How do I build the list of all classes used by a given class or package?](https://devnet.jetbrains.com/thread/267757) * [How do I insert whitespace into the PSI?](https://devnet.jetbrains.com/thread/216585) * [How do I add properties to a .properties file?](https://devnet.jetbrains.com/thread/220800) * [How do I find specific method calls inside a PsiMethod?](https://devnet.jetbrains.com/thread/222157) * [What is the lifecycle of a PSI element?](https://devnet.jetbrains.com/thread/251579) * [How do I find a file given its name (but no path)?](https://devnet.jetbrains.com/thread/124081) * [How do I create a new class in the given package?](https://devnet.jetbrains.com/thread/265094) * [How do I make a PsiClass extend another PsiClass?](https://devnet.jetbrains.com/thread/263617) * [How do I find references to a class from non-Java files?](https://devnet.jetbrains.com/thread/143947) * [How do I find the source file given the path to a .class file?](https://devnet.jetbrains.com/thread/148446) * [How do I find classes with the specified non-qualified name?](https://devnet.jetbrains.com/thread/156040) * [How do I find the module in which a class is located?](https://devnet.jetbrains.com/thread/159258) ## Working with XML and XML DOM * [How do I change the value of an XML attribute through the PSI?](https://devnet.jetbrains.com/thread/267398) * [How do I add custom references to Java elements in XML files?](https://devnet.jetbrains.com/thread/196522) * [How do I programmatically register a DTD or schema?](https://devnet.jetbrains.com/thread/256637) * [What is the "strict" parameter in DomElement.getParentOfType()?](https://devnet.jetbrains.com/thread/269542) ## Code Completion * [How do I determine what type of code completion was invoked?](https://devnet.jetbrains.com/thread/265400) * [How do I provide additional code completion in specific places of a Java file?](https://devnet.jetbrains.com/thread/266818) ## Refactoring * [How can I receive notifications about refactoring events?](https://devnet.jetbrains.com/thread/248923) * [How do I show a refactoring dialog programmatically?](https://devnet.jetbrains.com/thread/162502) ## Run/Debug * [How do I implement a custom run configuration?](https://devnet.jetbrains.com/thread/251054) ## Make/Compile * [How do I get access to class files generated by javac?](https://devnet.jetbrains.com/thread/146746) ## Version Control Integration * [Can I provide line status markers for files in a custom file system?](https://devnet.jetbrains.com/thread/269503) * [How do I update the state of VCS actions depending on file status?](https://devnet.jetbrains.com/thread/268542) * [How can I find out the module of a deleted file?](https://devnet.jetbrains.com/thread/267779) * [Can I provide additional decorations for changelists in the Changes view?](https://devnet.jetbrains.com/thread/267462) * [How do I report out-of-date files?](https://devnet.jetbrains.com/thread/269156) ## Test Framework * [How can I use the new test framework?](https://devnet.jetbrains.com/thread/247156) * [How do I create a library dependency in my test module?](https://devnet.jetbrains.com/thread/269495) ## Plugin Architecture * [Why are the extension elements in my plugin.xml red?](https://devnet.jetbrains.com/thread/269517) * [How can I read the plugin descriptor of my plugin from code?](https://devnet.jetbrains.com/thread/225115) * [How do I provide a custom exception reporter for my plugin?](https://devnet.jetbrains.com/thread/264619) * [How can I add the help topics of my plugin to the IntelliJ IDEA help system?](https://devnet.jetbrains.com/thread/261416) * [How do I get the version of IntelliJ IDEA under which my plugin is running?](https://devnet.jetbrains.com/thread/156440) ## Editors, Documents and Files * [Why doesn't the file change on disk after I changed it through the PSI?](https://devnet.jetbrains.com/thread/269379) * [Can I hook into the file save logic?](https://devnet.jetbrains.com/thread/269246) * [Can I mark a part of a file as read-only?](https://devnet.jetbrains.com/thread/267895) * [How do I control what happens when the user tries to edit such a part?](https://devnet.jetbrains.com/thread/269406) * [How do I implement a custom editor?](https://devnet.jetbrains.com/thread/214836) * [How can I show several editors for a single file in tabs?](https://devnet.jetbrains.com/thread/256436) * [Can I open an editor which has no underlying file on disk?](https://devnet.jetbrains.com/thread/267233) * [How do I save the content of my custom editor when the user saves all documents?](https://devnet.jetbrains.com/thread/268178) * [How do I highlight elements in a source code editor?](https://devnet.jetbrains.com/thread/215366) * [How do I allow to navigate between highlighted elements using Find Next?](https://devnet.jetbrains.com/thread/215724) * [How do I force code to be re-analyzed?](https://devnet.jetbrains.com/thread/224999) * [How do I get the active editor instance?](https://devnet.jetbrains.com/thread/264626) * [How do I get the cursor position in the current editor?](https://devnet.jetbrains.com/thread/263035) * [How do I clear the read-only status of a file?](https://devnet.jetbrains.com/thread/260112) * [How do I show a popup hint in an editor?](https://devnet.jetbrains.com/thread/138488) * [How do I create live template-like red box edit regions in an editor?](https://devnet.jetbrains.com/thread/158355) * [How can I show an editor with error highlighting in a toolwindow?](https://devnet.jetbrains.com/thread/158409) ## Inspections * [Can I build an inspection that processes XML files?](https://devnet.jetbrains.com/message/5188503) * [Why are the inspection results shown multiple times?](https://devnet.jetbrains.com/thread/256665) * [How can I provide a quick fix that creates a method?](https://devnet.jetbrains.com/thread/253735) * [Is it possible to inspect only the elements that have been modified after the last full inspection?](https://devnet.jetbrains.com/thread/146143) ## Project Structure * [Can I add a new module dependency storage format?](https://devnet.jetbrains.com/thread/269362) * [What is the Pair to be passed to JavaModuleBuilder.setSourcePaths()?](https://devnet.jetbrains.com/thread/247157) * [How do I access all configured JDKs?](https://devnet.jetbrains.com/thread/262185) ## Custom Languages * [How do I provide Parameter Info support for my language?](https://devnet.jetbrains.com/thread/264574) * [How do I provide auto-popup code completion in my language?](https://devnet.jetbrains.com/thread/268106) * [How to make a closing brace unindent?](https://devnet.jetbrains.com/thread/213765) * [How to automatically insert closing quotes?](https://devnet.jetbrains.com/thread/212228) * [How do I provide Ctrl+mouse popups for my language?](https://devnet.jetbrains.com/thread/215354) * [How do I enable debugging for my custom language which is compiled into Java?](https://devnet.jetbrains.com/thread/220451) * [How do I generate virtual Java classes mirroring the classes of my language?](https://devnet.jetbrains.com/thread/220280) ## User Interface * [How do I provide animated status bar notifications?](https://devnet.jetbrains.com/thread/268421) * [How do I enable file name completion in a combobox?](https://devnet.jetbrains.com/thread/267558) * [How do I show a popup with left-aligned and right-aligned parts for each item?](https://devnet.jetbrains.com/thread/269169) * [Can I use an embedded Web browser from my plugin?](https://devnet.jetbrains.com/thread/267280) * [How do I provide a custom icon for files/PSI elements?](https://devnet.jetbrains.com/thread/215468) * [Can I show a progress indicator for WriteActions?](https://devnet.jetbrains.com/thread/245819) * [How do I make it possible to search the options of my plugin in the Settings dialog?](https://devnet.jetbrains.com/thread/204909) * [How do I show a custom window or popup based on Structure View?](https://devnet.jetbrains.com/thread/255255) * [Is it possible to extend the Project View tree?](https://devnet.jetbrains.com/thread/263998) * [How do I show the "Project Structure" dialog programmatically?](https://devnet.jetbrains.com/thread/264241) * [How do I print messages in the console view?](https://devnet.jetbrains.com/thread/263776) * [How do I show the package selector dialog programmatically?](https://devnet.jetbrains.com/thread/260537) * [How do I provide syntax and error highlighting in a combo box editor?](https://devnet.jetbrains.com/thread/150616) * [How can I get notified when my toolwindow is activated?](https://devnet.jetbrains.com/thread/153237) * [How can I provide Close and Rerun buttons in my Usage View window?](https://devnet.jetbrains.com/thread/155452) ## General * [How do I get the currently active project outside of an AnAction?](https://devnet.jetbrains.com/thread/267876) * [How do I detect when a project is closing?](https://devnet.jetbrains.com/thread/267877) * [How can I implement a custom stack trace analyzer?](https://devnet.jetbrains.com/thread/252590) * [Where is the state of an ApplicationComponent stored?](https://devnet.jetbrains.com/thread/264364) * [How do I open a project programmatically?](https://devnet.jetbrains.com/thread/150233) * [How do I get the folder of the currently selected file?](https://devnet.jetbrains.com/thread/156790) * [How do I encrypt some values in the configuration data of my plugin?](https://devnet.jetbrains.com/thread/148273) * [How can I track exceptions from my plugin?](https://devnet.jetbrains.com/message/5527276)