mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
13 KiB
13 KiB
This FAQ is a topical index of questions that have been asked (and answered) on our IntelliJ IDEA Open API and Plugin Development forum.
See also Explore the IntelliJ Platform API for more information and strategies.
{type="tip"}
Unresolved Classes after Upgrading to 2019.2 or later
Action System
Accessing and Modifying the Source Code
- 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 insert whitespace into the PSI?
- How do I add properties to a .properties file?
- How do I find specific method calls inside a PsiMethod?
- What is the lifecycle of a PSI element?
- How do I find a file given its name (but no path)?
- How do I create a new class in the given package?
- How do I make a PsiClass extend another PsiClass?
- How do I find references to a class from non-Java files?
- How do I find the source file given the path to a .class file?
- How do I find classes with the specified non-qualified name?
Working with XML and XML DOM
- How do I change the value of an XML attribute through the PSI?
- How do I programmatically register a DTD or schema?
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?
Refactoring
- How can I receive notifications about refactoring events?
- How do I show a refactoring dialog programmatically?
Make/Compile
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?
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 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 highlight elements in a source code editor?
- How do I allow to navigate between highlighted elements using Find Next?
- How do I get the active editor instance?
- How do I get the cursor position in the current editor?
- How do I clear the read-only status of a file?
- How can I show an editor with error highlighting in a tool window?
Inspections
- How can I provide a quick fix that creates a method?
- Is it possible to inspect only the elements that have been modified after the last full inspection?
- ExternalAnnotator not in sync with current editor
Project Structure
- Can I add a new module dependency storage format?
- What is the Pair to be passed to JavaModuleBuilder.setSourcePaths()?
- How do I access all configured JDKs?
Custom Languages
- How do I provide auto-popup code completion in my language?
- How to make a closing brace unindent?
- How do I enable debugging for my custom language which is compiled into Java?
- How do I generate virtual Java classes mirroring the classes of my language?
User Interface
- How do I provide animated status bar notifications?
- How do I enable file name completion in a combo box?
- 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?
- Is it possible to extend the Project View tree?
- How do I show the "Project Structure" dialog programmatically?
- How do I print messages in the console view?
- How do I show the package selector dialog programmatically?
- How do I provide syntax and error highlighting in a combo box editor?
- How can I provide Close and Rerun buttons in my Usage View window?
- How can I display the SDK list in a JComboBox?