mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
Cleanup broken and redirecting links
This commit is contained in:
parent
d21418ac5e
commit
7bc478ecb9
@ -38,7 +38,7 @@ To build and run this site on Docker, run the following commands from inside the
|
||||
|
||||
* `docker build -t intellij-sdk-docs . && docker run -p 4000:4000 -v $PWD:/usr/src/app intellij-sdk-docs`
|
||||
|
||||
This will will forward port 4000 from the Docker container (which can be configured the [Rakefile](https://github.com/JetBrains/intellij-sdk-docs/blob/master/Rakefile), just update the `p- <HOST_PORT>:<CONTAINER_PORT>` flag) and mount the working directory to `/usr/src/app` where `intellij-sdk-docs` expects to find a Jekyll site. From there, it will run `rake bootstrap && rake preview`. Finally, you can access your site at by visiting [http://localhost:4000/intellij/sdk/docs/](http://localhost:4003/intellij/sdk/docs/). Please keep in mind if you are running boot2docker, that it may bind a [different address](https://github.com/boot2docker/boot2docker#container-port-redirection).
|
||||
This will will forward port 4000 from the Docker container (which can be configured the [Rakefile](https://github.com/JetBrains/intellij-sdk-docs/blob/master/Rakefile), just update the `-p <HOST_PORT>:<CONTAINER_PORT>` flag) and mount the working directory to `/usr/src/app` where `intellij-sdk-docs` expects to find a Jekyll site. From there, it will run `rake bootstrap && rake preview`. Finally, you can access your site at by visiting [http://localhost:4000/intellij/sdk/docs/](http://localhost:4000/intellij/sdk/docs/). Please keep in mind if you are running boot2docker, that it may bind a [different address](https://github.com/boot2docker/boot2docker#container-port-redirection).
|
||||
|
||||
**OS X**
|
||||
|
||||
|
@ -6,7 +6,7 @@ title: Action System
|
||||
|
||||
The system of actions allows plugins to add their own items to IDEA menus and toolbars.
|
||||
An action is a class, derived from the
|
||||
[AnAction](https://github.com/JetBrains/intellij-community/tree/master/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java)
|
||||
[AnAction](https://github.com/JetBrains/intellij-community/blob/master/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java)
|
||||
class, whose actionPerformed method is called when the menu item or toolbar button is selected.
|
||||
For example, one of the action classes is responsible for the "File \| Open File..." menu item and for the "Open File" toolbar button.
|
||||
|
||||
@ -15,12 +15,12 @@ Subgroups of the group can form submenus of the menu.
|
||||
|
||||
Every action and action group has an unique identifier.
|
||||
Identifiers of many of the standard IDEA actions are defined in the
|
||||
[IdeActions](https://github.com/JetBrains/intellij-community/tree/master/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java)
|
||||
[IdeActions](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java)
|
||||
class.
|
||||
|
||||
Every action can be included in multiple groups, and thus appear in multiple places within the IDEA user interface.
|
||||
Different places where actions can appear are defined by constants in the
|
||||
[ActionPlaces](https://github.com/JetBrains/intellij-community/tree/master/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java)
|
||||
[ActionPlaces](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java)
|
||||
interface. For every place where the action appears, a new ```Presentation``` is created.
|
||||
Thus, the same action can have different text or icons when it appears in different places of the user interface.
|
||||
Different presentations for the action are created by copying the presentation returned by the ```AnAction.getTemplatePresentation()``` method.
|
||||
@ -101,11 +101,11 @@ Registering actions in plugin.xml is demonstrated in the following example. The
|
||||
|
||||
To register an action from code, two steps are required.
|
||||
First, an instance of the class derived from ```AnAction``` must be passed to the ```registerAction``` method of the
|
||||
[ActionManager](https://github.com/JetBrains/intellij-community/tree/master/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionManager.java)
|
||||
[ActionManager](https://github.com/JetBrains/intellij-community/blob/master/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionManager.java)
|
||||
class, to associate the action with an ID.
|
||||
Second, the action needs to be added to one or more groups.
|
||||
To get an instance of an action group by ID, it is necessary to call ```ActionManager.getAction()``` and cast the returned value to the
|
||||
[DefaultActionGroup](https://github.com/JetBrains/intellij-community/tree/master/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java)
|
||||
[DefaultActionGroup](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java)
|
||||
class.
|
||||
|
||||
You can create a plugin that registers actions on IDEA startup using the following procedure.
|
||||
|
@ -4,9 +4,9 @@ title: PSI Elements
|
||||
|
||||
A PSI (Program Structure Interface) file represents a hierarchy of PSI elements (so-called _PSI trees_). A single PSI file may include several PSI trees in a particular programming language. A PSI element, in its turn, can have child PSI elements.
|
||||
PSI elements and operations on the level of individual PSI elements are used to explore the internal structure of source code as it is interpreted by **IntelliJ IDEA**. For example, you can use PSI elements to perform code analysis, such as
|
||||
[code inspections](http://www.jetbrains.com/idea/webhelp/code-inspection.html)
|
||||
[code inspections](http://www.jetbrains.com/idea/help/code-inspection.html)
|
||||
or
|
||||
[intention actions](http://www.jetbrains.com/idea/webhelp/intention-actions.html).
|
||||
[intention actions](http://www.jetbrains.com/idea/help/intention-actions.html).
|
||||
The
|
||||
[PsiElement](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/psi/PsiElement.java)
|
||||
class is the common base class for PSI elements.
|
||||
|
@ -4,12 +4,12 @@ title: PSI Files
|
||||
|
||||
A PSI (Program Structure Interface) file is the root of a structure representing the contents of a file as a hierarchy of elements in a particular programming language.
|
||||
The
|
||||
[PsiFile](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/psi/PsiFile.java)
|
||||
[PsiFile](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/psi/PsiFile.java)
|
||||
class is the common base class for all PSI files, while files in a specific language are usually represented by its subclasses.
|
||||
For example, the
|
||||
[PsiJavaFile](https://github.com/JetBrains/intellij-community/tree/master/java/java-psi-api/src/com/intellij/psi/PsiJavaFile.java)
|
||||
[PsiJavaFile](https://github.com/JetBrains/intellij-community/blob/master/java/java-psi-api/src/com/intellij/psi/PsiJavaFile.java)
|
||||
class represents a Java file, and the
|
||||
[XmlFile](https://github.com/JetBrains/intellij-community/tree/master/xml/xml-psi-api/src/com/intellij/psi/xml/XmlFile.java)
|
||||
[XmlFile](https://github.com/JetBrains/intellij-community/blob/master/xml/xml-psi-api/src/com/intellij/psi/xml/XmlFile.java)
|
||||
class represents an XML file.
|
||||
|
||||
Unlike ```VirtualFile``` and ```Document```, which have application scope (even if multiple projects are open, each file is represented by the same ```VirtualFile``` instance), PSI has project scope (the same file is represented by multiple PsiFile instances if the file belongs to multiple projects open at the same time).
|
||||
@ -31,7 +31,7 @@ To iterate over the elements in a file, use ```psiFile.accept(new PsiRecursiveEl
|
||||
## Where does it a PSI file come from?
|
||||
|
||||
As PSI is language-dependent, PSI files are created through the
|
||||
[Language](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/lang/Language.java)
|
||||
[Language](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/lang/Language.java)
|
||||
object, by using the ```LanguageParserDefinitions.INSTANCE.forLanguage(language).createFile(fileViewProvider)``` method.
|
||||
|
||||
Like documents, PSI files are created on demand when the PSI is accessed for a particular file.
|
||||
@ -43,10 +43,10 @@ Like documents, PSI files are weakly referenced from the corresponding ```Virtua
|
||||
## How do I create a PSI file?
|
||||
|
||||
The
|
||||
[PsiFileFactory](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/psi/PsiFileFactory.java).
|
||||
[PsiFileFactory](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/psi/PsiFileFactory.java).
|
||||
```getInstance(project).createFileFromText()``` method creates an in-memory PSI file with the specified contents.
|
||||
To save the PSI file to disk, use the
|
||||
[PsiDirectory](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/psi/PsiDirectory.java).
|
||||
[PsiDirectory](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/psi/PsiDirectory.java).
|
||||
```add()``` method.
|
||||
|
||||
## How do I get notified when PSI files change?
|
||||
|
@ -6,7 +6,7 @@ title: Check Out And Build Community Edition
|
||||
The source code of IntelliJ IDEA Community Edition is stored in a Git repository.
|
||||
Therefore, in order to check out the sources, you need to have Git installed.
|
||||
We recommend using the
|
||||
[msys git](http://code.google.com/p/msysgit/)
|
||||
[msys git](https://msysgit.github.io)
|
||||
distribution on Windows and
|
||||
[git-osx-installer](http://code.google.com/p/git-osx-installer/)
|
||||
on Mac.
|
||||
@ -122,4 +122,4 @@ Ant build script in the root directory of the source code.
|
||||

|
||||
|
||||
|
||||
The results of the build execution can be found at *out/artifacts*.
|
||||
The results of the build execution can be found at *out/artifacts*.
|
||||
|
@ -6,7 +6,7 @@ This section explains how you can create a new plugin project from a scratch usi
|
||||
Optionally, you can import an existing project or import a project from external models.
|
||||
You can also add a new plugin module to an existing *Intellij IDEA* project.
|
||||
For more information, refer to
|
||||
[Intellij IDEA Web Help](http://www.jetbrains.com/idea/webhelp/index.jsp?reference.dialogs.new.project).
|
||||
[Intellij IDEA Web Help](https://www.jetbrains.com/idea/help/new-project-wizard.html).
|
||||
|
||||
## To create a plugin project:
|
||||
|
||||
@ -23,4 +23,4 @@ For more information, refer to
|
||||
|
||||
* Click **Finish** to generate project structure files
|
||||
|
||||
* Go to **File \| Project Structure** to customize project settings if required
|
||||
* Go to **File \| Project Structure** to customize project settings if required
|
||||
|
@ -69,5 +69,5 @@ If your plugin works with all products but provides some Java-specific functiona
|
||||
Before marking a plugin as compatible with all products, you should verify that it doesn't use any APIs that are specific to IntelliJ Platform. To do so, create an IntelliJ Platform SDK pointing to an installation of RubyMine/PyCharm/etc., compile your plugin against that SDK, and verify that everything compiles.
|
||||
|
||||
The
|
||||
[IntelliJ plugin repository](http://plugins.intellij.net)
|
||||
[IntelliJ plugin repository](http://plugins.jetbrains.com/)
|
||||
automatically detects the products with which a plugin is compatible, based on the rules above, and makes it available to users of those products.
|
||||
|
@ -9,9 +9,9 @@ title: Running and Debugging a Plugin
|
||||
To run or debug the plugin from within *IntelliJ IDEA*, you need a configured special profile (a Run/Debug configuration) that specifies the class to run, VM parameters and other specific options.
|
||||
In most cases, you can use the default *Run\/Debug* configuration profiles for your plugin projects.
|
||||
For information on how to change the Run/Debug configuration profile, refer to
|
||||
[Run/Debug Configuration](http://www.jetbrains.com/idea/webhelp/run-debug-configuration.html)
|
||||
[Run/Debug Configuration](http://www.jetbrains.com/idea/help/run-debug-configuration.html)
|
||||
and
|
||||
[Run/Debug Configuration: Plugin](http://www.jetbrains.com/idea/webhelp/run-debug-configuration-plugin.html)
|
||||
[Run/Debug Configuration: Plugin](http://www.jetbrains.com/idea/help/run-debug-configuration-plugin.html)
|
||||
in *Intellij IDEA* Web Help.
|
||||
Using IntelliJ IDEA's debugger, you can find out the origin of the run-time errors and exceptions.
|
||||
|
||||
|
@ -28,7 +28,7 @@ For each element type that you want to store in the stub tree, you need to perfo
|
||||
|
||||
* Make sure that the interface for the PSI element extends `StubBasedPsiElement` parameterized by the type of the stub interface ([example](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-api/src/com/intellij/lang/properties/psi/Property.java)).
|
||||
|
||||
* Make sure that the implementation class for the PSI element extends `StubBasedPsiElementBase` parameterized by the type of the stub interface ([example](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/src/com/intellij/lang/properties/psi/impl/PropertyImpl.java#L45)). Provide both a constructor that accepts an ASTNode and a constructor which accepts a stub.
|
||||
* Make sure that the implementation class for the PSI element extends `StubBasedPsiElementBase` parameterized by the type of the stub interface ([example](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/psi/impl/PropertyImpl.java#L45)). Provide both a constructor that accepts an ASTNode and a constructor which accepts a stub.
|
||||
|
||||
* Create a class which implements `IStubElementType` and is parameterized with the stub interface and the actual PSI element interface ([example](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/parsing/PropertyStubElementType.java)). Implement the createPsi() and createStub() methods for creating PSI from a stub and vice versa. Implement the serialize() and deserialize() methods for storing the data in a binary stream.
|
||||
|
||||
@ -75,7 +75,7 @@ To access the data from an index, the following two methods are used:
|
||||
|
||||
### Related Forum Discussions
|
||||
|
||||
* [Lifecycle of stub creation](http://devnet.jetbrains.com/message/5485343)
|
||||
* [Lifecycle of stub creation](https://devnet.jetbrains.com/message/5485343)
|
||||
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ title: Persisting State of Components
|
||||
|
||||
The IntelliJ Platform provides an API that allows components or services to persist their state between restarts of the IDE.
|
||||
You can use either a simple API to persist a few values, or persist the state of more complicated components using the
|
||||
[PersistentStateComponent](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/openapi/components/PersistentStateComponent.java)
|
||||
[PersistentStateComponent](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/components/PersistentStateComponent.java)
|
||||
interface.
|
||||
|
||||
## Using PropertiesComponent for Simple non-roamable Persistence
|
||||
|
@ -4,8 +4,8 @@ title: Plugin Actions
|
||||
|
||||
*Intellij IDEA* provides the concept of _actions_.
|
||||
An action is a class, derived from the
|
||||
[AnAction](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/actionSystem/AnAction.java)
|
||||
class, whose ```actionPerformed``` method is called when the menu item or toolbar button is selected.
|
||||
[AnAction](https://github.com/JetBrains/intellij-community/blob/master/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java)
|
||||
class, whose `actionPerformed` method is called when the menu item or toolbar button is selected.
|
||||
The system of actions allows plugins to add their own items to IDEA menus and toolbars.
|
||||
Actions are organized into groups, which, in turn, can contain other groups.
|
||||
A group of actions can form a toolbar or a menu. Subgroups of the group can form submenus of the menu.
|
||||
|
@ -16,7 +16,7 @@ There are three kinds of components:
|
||||
Application-level components are created and initialized when IntelliJ IDEA starts up.
|
||||
They can be acquired from the
|
||||
[Application](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/application/Application.java)
|
||||
instance by using the ```getComponent(Class)``` method.
|
||||
instance by using the `getComponent(Class)` method.
|
||||
|
||||
Project-level components are created for each
|
||||
[Project](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/project/Project.java)
|
||||
@ -77,7 +77,7 @@ Project-level component's implementation class may implement the
|
||||
[ProjectComponent](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/components/ProjectComponent.java)
|
||||
interface.
|
||||
The constructor of a project-level component can have a parameter of the
|
||||
[Project](https://github.com/JetBrains/intellij-community/tree/master/platform/platform-api/src/com/intellij/openapi/project/Project.java)
|
||||
[Project](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/project/Project.java)
|
||||
type, if it needs the project instance.
|
||||
It can also specify other application-level or project-level components as parameters, if it depends on those components.
|
||||
|
||||
@ -132,11 +132,11 @@ interface; register the newly created component in the `plugin.xml` file; add a
|
||||
The state of every component will be automatically saved and loaded if the component's class implements the
|
||||
[JDOMExternalizable](https://github.com/JetBrains/intellij-community/blob/master/platform/util/src/com/intellij/openapi/util/JDOMExternalizable.java)
|
||||
(deprecated) or
|
||||
[PersistentStateComponent](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/components/PersistentStateComponent.java)
|
||||
[PersistentStateComponent](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/components/PersistentStateComponent.java)
|
||||
interface.
|
||||
|
||||
When the component's class implements the
|
||||
[PersistentStateComponent](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/components/PersistentStateComponent.java)
|
||||
[PersistentStateComponent](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/components/PersistentStateComponent.java)
|
||||
interface, the component state is saved in an XML file that you can specify using the
|
||||
[@State](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/components/State.java)
|
||||
and
|
||||
@ -189,7 +189,7 @@ and has non-default persisted state).
|
||||
interface is invoked to notify that a module has been added to the project.
|
||||
|
||||
* For project components, the ```projectOpened``` method of the
|
||||
[ProjectComponent](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/project/ProjectComponent.java)
|
||||
[ProjectComponent](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/components/ProjectComponent.java)
|
||||
interface is invoked to notify that a project has been loaded.
|
||||
|
||||
The components are unloaded in the following order:
|
||||
|
@ -75,4 +75,4 @@ message and closes the most recently opened project.
|
||||
|
||||
* On the main menu, choose *Run \| Run* or press *Shift + F10*.
|
||||
|
||||
* If necessary, change the [Run/Debug Configurations](http://www.jetbrains.com/idea/webhelp/run-debug-configuration-plugin.html).
|
||||
* If necessary, change the [Run/Debug Configurations](http://www.jetbrains.com/idea/help/run-debug-configuration-plugin.html).
|
||||
|
@ -11,10 +11,10 @@ The project structure and Java classes you can use to manage projects and module
|
||||
|
||||
This section briefly discusses the IDEA project structure, project components and related terms.
|
||||
For more information about projects and their components, refer to
|
||||
[Project](http://www.jetbrains.com/idea/webhelp/project.html),
|
||||
[Module](http://www.jetbrains.com/idea/webhelp/module.html),
|
||||
[Library](http://www.jetbrains.com/idea/webhelp/library.html),
|
||||
[Facet](http://www.jetbrains.com/idea/webhelp/facet.html)
|
||||
[Project](http://www.jetbrains.com/idea/help/project.html),
|
||||
[Module](http://www.jetbrains.com/idea/help/module.html),
|
||||
[Library](http://www.jetbrains.com/idea/help/library.html),
|
||||
[Facet](http://www.jetbrains.com/idea/help/facet.html)
|
||||
in **IntelliJ IDEA** Web Help.
|
||||
|
||||
#### Project
|
||||
@ -38,7 +38,7 @@ A _library_ is an archive of compiled code (such as JAR files) that your modules
|
||||
* **Global Library**: the library information is recorded in the _applicationLibraries.xml_ file into the `<User Home>/.IntelliJIdea/config/options` directory. Global libraries are similar to project libraries, but are visible for the different projects.
|
||||
|
||||
For more information about libraries, refer to
|
||||
[Library](http://www.jetbrains.com/idea/webhelp/library.html).
|
||||
[Library](http://www.jetbrains.com/idea/help/library.html).
|
||||
|
||||
#### SDK
|
||||
|
||||
@ -58,9 +58,9 @@ A _facet_ represents certain configuration, specific for a particular framework/
|
||||
A module can have multiple facets.
|
||||
E.g. Spring specific configuration is stored in a Spring facet.
|
||||
For more information about facets see
|
||||
[Facet](http://www.jetbrains.com/idea/webhelp/facet.html)
|
||||
[Facet](http://www.jetbrains.com/idea/help/facet.html)
|
||||
and
|
||||
[Facet Dependencies](http://www.jetbrains.com/idea/webhelp/available-facets-and-their-dependencies.html)
|
||||
[Facet Dependencies](http://www.jetbrains.com/idea/help/available-facets-and-their-dependencies.html)
|
||||
in **IntelliJ IDEA** Web Help.
|
||||
|
||||
## Project Structure
|
||||
@ -83,7 +83,7 @@ The Java classes and interfaces that you can use to explore and change the proje
|
||||
#### How to Work with Project Files?
|
||||
|
||||
**IntelliJ Platform** stores the project configuration data in XML files. The list of those files depends on the plugin
|
||||
[project format](http://www.jetbrains.com/idea/webhelp/project.html).
|
||||
[project format](http://www.jetbrains.com/idea/help/project.html).
|
||||
|
||||
For _file-based_ format projects, the information core to the project itself (e.g. location of the component modules, compiler settings, etc.) is stored in the _<%project name%>.IPR_ file.
|
||||
The information about modules the project includes is stored in _<%module name%>.IML_ files.
|
||||
@ -95,10 +95,10 @@ As for the file-based format projects, .IML files describe modules.
|
||||
|
||||
To work with projects and project files, you can use the following classes and interfaces:
|
||||
|
||||
* [Project](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/openapi/project/Project.java) interface.
|
||||
* [ProjectRootManager](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectRootManager.java) abstract class.
|
||||
* [ProjectManager](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/project/ProjectManager.java) abstract class.
|
||||
* [ProjectFileIndex](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java) interface.
|
||||
* [Project](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/project/Project.java) interface.
|
||||
* [ProjectRootManager](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectRootManager.java) abstract class.
|
||||
* [ProjectManager](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/project/ProjectManager.java) abstract class.
|
||||
* [ProjectFileIndex](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java) interface.
|
||||
|
||||
Note that you don't need to access project files directly to load or save settings.
|
||||
See
|
||||
@ -194,13 +194,13 @@ Note that by default, the project modules use the project SDK. Optionally, you c
|
||||
|
||||
*IntelliJ Platform* provides a number of Java classes and interfaces you can use to work with modules:
|
||||
|
||||
* [ModuleManager](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/module/ModuleManager.java) abstract class.
|
||||
* [Module](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/openapi/module/Module.java) interface.
|
||||
* [ModuleRootManager](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootManager.java) abstract class.
|
||||
* [ModuleRootModel](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootModel.java) interface.
|
||||
* [ModuleUtil](https://github.com/JetBrains/intellij-community/tree/master/platform/lang-api/src/com/intellij/openapi/module/ModuleUtil.java) class.
|
||||
* [ModifiableModuleModel](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/module/ModifiableModuleModel.java) interface.
|
||||
* [ModifiableRootModel](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/roots/ModifiableRootModel.java) interface.
|
||||
* [ModuleManager](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/module/ModuleManager.java) abstract class.
|
||||
* [Module](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/module/Module.java) interface.
|
||||
* [ModuleRootManager](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootManager.java) abstract class.
|
||||
* [ModuleRootModel](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootModel.java) interface.
|
||||
* [ModuleUtil](https://github.com/JetBrains/intellij-community/blob/master/platform/lang-api/src/com/intellij/openapi/module/ModuleUtil.java) class.
|
||||
* [ModifiableModuleModel](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/module/ModifiableModuleModel.java) interface.
|
||||
* [ModifiableRootModel](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/roots/ModifiableRootModel.java) interface.
|
||||
|
||||
This section discusses how to complete some common tasks related to management of modules.
|
||||
|
||||
@ -212,12 +212,12 @@ Use the ```ModuleManager.getModules()``` method.
|
||||
|
||||
_Order entries_ include SDK, libraries and other modules the module uses.
|
||||
With the *IntelliJ IDEA* UI, you can view order entries for a module on the
|
||||
[Dependencies](http://www.jetbrains.com/idea/webhelp/dependencies-tab.html)
|
||||
[Dependencies](http://www.jetbrains.com/idea/help/dependencies-tab.html)
|
||||
tab of the *Project Structure* dialog box.
|
||||
To explore the
|
||||
[module dependencies](http://www.jetbrains.com/idea/webhelp/dependencies-tab.html),
|
||||
[module dependencies](http://www.jetbrains.com/idea/help/dependencies-tab.html),
|
||||
use the
|
||||
[OrderEnumerator](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/roots/OrderEnumerator.java)
|
||||
[OrderEnumerator](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/roots/OrderEnumerator.java)
|
||||
class.
|
||||
|
||||
The following code snippet illustrates how you can get classpath (classes root of all dependencies) for a module:
|
||||
@ -230,7 +230,7 @@ VirtualFile[] roots = ModuleRootManager.getInstance(module).orderEntries().class
|
||||
|
||||
Use the ```ModuleRootManager.getSdk()``` method.
|
||||
This method returns a value of the
|
||||
[Sdk](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/openapi/projectRoots/Sdk.java)
|
||||
[Sdk](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/projectRoots/Sdk.java)
|
||||
type.
|
||||
The following code snippet illustrates how you can get detailed information on SDK the specified module uses:
|
||||
|
||||
|
214
faq.md
214
faq.md
@ -4,146 +4,146 @@ title: Plugin Development FAQ
|
||||
|
||||
|
||||
This FAQ is a topical index of questions that have been asked (and answered) on our
|
||||
[OpenAPI forum](http://intellij.net/forums/forum.jspa?forumID=23)
|
||||
[OpenAPI forum](https://devnet.jetbrains.com/community/idea/open_api_and_plugin_development)
|
||||
|
||||
## Open-Source Plugins
|
||||
* [How do I compile the Scala plugin?](http://intellij.net/forums/thread.jspa?threadID=266848)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=269447)
|
||||
* [How do I replace my usage of DataConstants with DataKeys in 7.0?](http://intellij.net/forums/thread.jspa?threadID=269493)
|
||||
* [How do I replace my usage of ToolWindowManager.registerToolWindow() in 7.0?](http://intellij.net/forums/thread.jspa?threadID=269001)
|
||||
* [How do I replace my usage of PsiSearchHelper.findReferences() in 7.0?](http://intellij.net/forums/thread.jspa?threadID=268094)
|
||||
* [How do I replace my usage of DelayedFileStatusProvider in 6.0?](http://www.intellij.net/forums/thread.jspa?threadID=213530)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=268927&tstart=0)
|
||||
* [How do I add a main menu item?](http://intellij.net/forums/thread.jspa?threadID=267076)
|
||||
* [How do I customize the "New..." menu?](http://www.intellij.net/forums/thread.jspa?threadID=247161)
|
||||
* [How do I customize the compiler output context menu?](http://www.intellij.net/forums/thread.jspa?threadID=257558)
|
||||
* [How do I get the context of an action (selected file, active project etc.)?](http://www.intellij.net/forums/thread.jspa?threadID=234000)
|
||||
* [How do I change the icon of an action dynamically?](http://www.intellij.net/forums/thread.jspa?threadID=233379)
|
||||
* [How do I add icons to the IDEA toolbar?](http://intellij.net/forums/thread.jspa?threadID=148491)
|
||||
* [Where do I get the list of built-in action IDs?](http://intellij.net/forums/thread.jspa?threadID=162503)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=268652)
|
||||
* [How do I find all anonymous classes created in a class?](http://intellij.net/forums/thread.jspa?threadID=267506)
|
||||
* [How do I calculate the value of a string literal token?](http://intellij.net/forums/thread.jspa?threadID=267171)
|
||||
* [How do I rename or move a Java class?](http://www.intellij.net/forums/thread.jspa?threadID=268809)
|
||||
* [How do I build the list of all classes used by a given class or package?](http://intellij.net/forums/thread.jspa?threadID=267757)
|
||||
* [How do I insert whitespace into the PSI?](http://www.intellij.net/forums/thread.jspa?threadID=216585)
|
||||
* [How do I add properties to a .properties file?](http://www.intellij.net/forums/thread.jspa?threadID=220800)
|
||||
* [How do I find specific method calls inside a PsiMethod?](http://www.intellij.net/forums/thread.jspa?threadID=222157)
|
||||
* [What is the lifecycle of a PSI element?](http://www.intellij.net/forums/thread.jspa?threadID=251579)
|
||||
* [How do I find a file given its name (but no path)?](http://www.intellij.net/forums/thread.jspa?threadID=124081)
|
||||
* [How do I create a new class in the given package?](http://www.intellij.net/forums/thread.jspa?threadID=265094)
|
||||
* [How do I make a PsiClass extend another PsiClass?](http://www.intellij.net/forums/thread.jspa?threadID=263617)
|
||||
* [How do I find references to a class from non-Java files?](http://intellij.net/forums/thread.jspa?threadID=143947)
|
||||
* [How do I find the source file given the path to a .class file?](http://intellij.net/forums/thread.jspa?threadID=148446)
|
||||
* [How do I find classes with the specified non-qualified name?](http://intellij.net/forums/thread.jspa?threadID=156040)
|
||||
* [How do I find the module in which a class is located?](http://intellij.net/forums/thread.jspa?threadID=159258)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=267398)
|
||||
* [How do I add custom references to Java elements in XML files?](http://www.intellij.net/forums/thread.jspa?threadID=196522)
|
||||
* [How do I programmatically register a DTD or schema?](http://www.intellij.net/forums/thread.jspa?threadID=256637)
|
||||
* [What is the "strict" parameter in DomElement.getParentOfType()?](http://intellij.net/forums/thread.jspa?threadID=269542)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=265400)
|
||||
* [How do I provide additional code completion in specific places of a Java file?](http://intellij.net/forums/thread.jspa?threadID=266818)
|
||||
* [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?](http://www.intellij.net/forums/thread.jspa?threadID=248923)
|
||||
* [How do I show a refactoring dialog programmatically?](http://intellij.net/forums/thread.jspa?threadID=162502)
|
||||
* [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?](http://www.intellij.net/forums/thread.jspa?threadID=251054)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=146746)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=269503)
|
||||
* [How do I update the state of VCS actions depending on file status?](http://intellij.net/forums/thread.jspa?threadID=268542)
|
||||
* [How can I find out the module of a deleted file?](http://intellij.net/forums/thread.jspa?threadID=267779)
|
||||
* [Can I provide additional decorations for changelists in the Changes view?](http://intellij.net/forums/thread.jspa?threadID=267462)
|
||||
* [How do I report out-of-date files?](http://www.intellij.net/forums/thread.jspa?threadID=269156)
|
||||
* [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?](http://www.intellij.net/forums/thread.jspa?threadID=247156)
|
||||
* [How do I create a library dependency in my test module?](http://intellij.net/forums/thread.jspa?threadID=269495)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=269517)
|
||||
* [How can I read the plugin descriptor of my plugin from code?](http://www.intellij.net/forums/thread.jspa?threadID=225115)
|
||||
* [How do I provide a custom exception reporter for my plugin?](http://www.intellij.net/forums/thread.jspa?threadID=264619)
|
||||
* [How can I add the help topics of my plugin to the IntelliJ IDEA help system?](http://www.intellij.net/forums/thread.jspa?threadID=261416)
|
||||
* [How do I get the version of IntelliJ IDEA under which my plugin is running?](http://intellij.net/forums/thread.jspa?threadID=156440)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=269379)
|
||||
* [Can I hook into the file save logic?](http://intellij.net/forums/thread.jspa?threadID=269246)
|
||||
* [Can I mark a part of a file as read-only?](http://intellij.net/forums/thread.jspa?threadID=267895)
|
||||
* [How do I control what happens when the user tries to edit such a part?](http://www.intellij.net/forums/thread.jspa?threadID=269406)
|
||||
* [How do I implement a custom editor?](http://www.intellij.net/forums/thread.jspa?threadID=214836)
|
||||
* [How can I show several editors for a single file in tabs?](http://www.intellij.net/forums/thread.jspa?threadID=256436)
|
||||
* [Can I open an editor which has no underlying file on disk?](http://intellij.net/forums/thread.jspa?threadID=267233)
|
||||
* [How do I save the content of my custom editor when the user saves all documents?](http://intellij.net/forums/thread.jspa?threadID=268178)
|
||||
* [How do I highlight elements in a source code editor?](http://www.intellij.net/forums/thread.jspa?threadID=215366)
|
||||
* [How do I allow to navigate between highlighted elements using Find Next?](http://www.intellij.net/forums/thread.jspa?threadID=215724)
|
||||
* [How do I force code to be re-analyzed?](http://www.intellij.net/forums/thread.jspa?threadID=224999)
|
||||
* [How do I get the active editor instance?](http://www.intellij.net/forums/thread.jspa?threadID=264626)
|
||||
* [How do I get the cursor position in the current editor?](http://www.intellij.net/forums/thread.jspa?threadID=263035)
|
||||
* [How do I clear the read-only status of a file?](http://www.intellij.net/forums/thread.jspa?threadID=260112)
|
||||
* [How do I show a popup hint in an editor?](http://intellij.net/forums/thread.jspa?threadID=138488)
|
||||
* [How do I create live template-like red box edit regions in an editor?](http://intellij.net/forums/thread.jspa?threadID=158355)
|
||||
* [How can I show an editor with error highlighting in a toolwindow?](http://intellij.net/forums/thread.jspa?threadID=158409)
|
||||
* [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?](http://intellij.net/forums/message.jspa?messageID=5188503#5188503)
|
||||
* [Why are the inspection results shown multiple times?](http://www.intellij.net/forums/thread.jspa?threadID=256665)
|
||||
* [How can I provide a quick fix that creates a method?](http://www.intellij.net/forums/thread.jspa?threadID=253735)
|
||||
* [Is it possible to inspect only the elements that have been modified after the last full inspection?](http://intellij.net/forums/thread.jspa?threadID=146143)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=269362&tstart=0)
|
||||
* [What is the Pair to be passed to JavaModuleBuilder.setSourcePaths()?](http://www.intellij.net/forums/thread.jspa?threadID=247157)
|
||||
* [How do I access all configured JDKs?](http://www.intellij.net/forums/thread.jspa?threadID=262185)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=264574)
|
||||
* [How do I provide auto-popup code completion in my language?](http://intellij.net/forums/thread.jspa?threadID=268106)
|
||||
* [How to make a closing brace unindent?](http://www.intellij.net/forums/thread.jspa?threadID=213765)
|
||||
* [How to automatically insert closing quotes?](http://www.intellij.net/forums/thread.jspa?threadID=212228)
|
||||
* [How do I provide Ctrl+mouse popups for my language?](http://www.intellij.net/forums/thread.jspa?threadID=215354)
|
||||
* [How do I enable debugging for my custom language which is compiled into Java?](http://www.intellij.net/forums/thread.jspa?threadID=220451)
|
||||
* [How do I generate virtual Java classes mirroring the classes of my language?](http://www.intellij.net/forums/thread.jspa?threadID=220280)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=268421)
|
||||
* [How do I enable file name completion in a combobox?](http://intellij.net/forums/thread.jspa?threadID=267558)
|
||||
* [How do I show a popup with left-aligned and right-aligned parts for each item?](http://intellij.net/forums/thread.jspa?threadID=269169)
|
||||
* [Can I use an embedded Web browser from my plugin?](http://intellij.net/forums/thread.jspa?threadID=267280)
|
||||
* [How do I provide a custom icon for files/PSI elements?](http://www.intellij.net/forums/thread.jspa?threadID=215468)
|
||||
* [Can I show a progress indicator for WriteActions?](http://www.intellij.net/forums/thread.jspa?threadID=245819)
|
||||
* [How do I make it possible to search the options of my plugin in the Settings dialog?](http://www.intellij.net/forums/thread.jspa?threadID=204909)
|
||||
* [How do I show a custom window or popup based on Structure View?](http://www.intellij.net/forums/thread.jspa?threadID=255255)
|
||||
* [Is it possible to extend the Project View tree?](http://www.intellij.net/forums/thread.jspa?threadID=263998)
|
||||
* [How do I show the "Project Structure" dialog programmatically?](http://www.intellij.net/forums/thread.jspa?threadID=264241)
|
||||
* [How do I print messages in the console view?](http://www.intellij.net/forums/thread.jspa?threadID=263776)
|
||||
* [How do I show the package selector dialog programmatically?](http://www.intellij.net/forums/thread.jspa?threadID=260537)
|
||||
* [How do I provide syntax and error highlighting in a combo box editor?](http://intellij.net/forums/thread.jspa?threadID=150616)
|
||||
* [How can I get notified when my toolwindow is activated?](http://intellij.net/forums/thread.jspa?threadID=153237)
|
||||
* [How can I provide Close and Rerun buttons in my Usage View window?](http://intellij.net/forums/thread.jspa?threadID=155452)
|
||||
* [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?](http://intellij.net/forums/thread.jspa?threadID=267876)
|
||||
* [How do I detect when a project is closing?](http://intellij.net/forums/thread.jspa?threadID=267877)
|
||||
* [How can I implement a custom stack trace analyzer?](http://www.intellij.net/forums/thread.jspa?threadID=252590)
|
||||
* [Where is the state of an ApplicationComponent stored?](http://www.intellij.net/forums/thread.jspa?threadID=264364)
|
||||
* [How do I open a project programmatically?](http://intellij.net/forums/thread.jspa?threadID=150233)
|
||||
* [How do I get the folder of the currently selected file?](http://intellij.net/forums/thread.jspa?threadID=156790)
|
||||
* [How do I encrypt some values in the configuration data of my plugin?](http://intellij.net/forums/thread.jspa?threadID=148273)
|
||||
* [How can I track exceptions from my plugin?](https://devnet.jetbrains.com/message/5527276)
|
||||
* [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)
|
||||
|
@ -36,4 +36,4 @@ Providing custom language support includes the following major steps:
|
||||
* [Additional Minor Features](/reference_guide/custom_language_support/additional_minor_features.html)
|
||||
|
||||
|
||||
Please ask questions or suggest missing topics in [plugin development forum](http://devnet.jetbrains.com/community/idea/open_api_and_plugin_development).
|
||||
Please ask questions or suggest missing topics in [plugin development forum](https://devnet.jetbrains.com/community/idea/open_api_and_plugin_development).
|
||||
|
@ -29,7 +29,7 @@ The interface can return the prefix for the line comment, and the prefix and suf
|
||||
|
||||
**Example:**
|
||||
[Commenter](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesCommenter.java)
|
||||
for [Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
for [Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
||||
|
||||
To support smart/semantic *Join Lines* see
|
||||
@ -60,9 +60,9 @@ and additionally to provide an implementation of
|
||||
for your language and to register it in the `declarationRangeHandler` extension point.
|
||||
|
||||
*Spellchecking* can be provided via EP `spellchecker.support` (
|
||||
[SpellcheckingStrategy](https://github.com/JetBrains/intellij-community/spellchecker/src/com/intellij/spellchecker/tokenizer/SpellcheckingStrategy.java)
|
||||
[SpellcheckingStrategy](https://github.com/JetBrains/intellij-community/blob/master/spellchecker/src/com/intellij/spellchecker/tokenizer/SpellcheckingStrategy.java)
|
||||
) where you can return
|
||||
[Tokenizer](https://github.com/JetBrains/intellij-community/spellchecker/src/com/intellij/spellchecker/tokenizer/Tokenizer.java)
|
||||
[Tokenizer](https://github.com/JetBrains/intellij-community/blob/master/spellchecker/src/com/intellij/spellchecker/tokenizer/Tokenizer.java)
|
||||
to use, possibly depending on the passed in
|
||||
[PsiElement](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/psi/PsiElement.java)
|
||||
(or `EMPTY_TOKENIZER` for no spellchecking).
|
||||
|
@ -21,7 +21,7 @@ provides better performance (because of its support for incremental analysis) an
|
||||
A
|
||||
[simple inspection](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/codeInspection/TrailingSpacesInPropertyInspection.java)
|
||||
for
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
||||
|
||||
The code intentions for custom languages also use the regular API for intentions.
|
||||
|
@ -11,7 +11,7 @@ A standard base class for such implementations is available in the class
|
||||
**Example**:
|
||||
[DocumentationProvider](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/src/com/intellij/lang/properties/PropertiesDocumentationProvider.java)
|
||||
for
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
||||
|
||||
The `getQuickNavigateInfo()` method returns the text to be displayed when the user holds the mouse over an element with ```Ctrl``` pressed.
|
||||
|
@ -15,7 +15,7 @@ interfaces.
|
||||
Implementation of
|
||||
[FindUsagesProvider](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/findUsages/PropertiesFindUsagesProvider.java)
|
||||
in
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
||||
|
||||
The steps of the ```Find Usages``` action are the following:
|
||||
@ -83,4 +83,4 @@ passed to the provider in this case will be an instance of
|
||||
**Example:**
|
||||
[ElementDescriptionProvider](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/src/com/intellij/lang/properties/PropertiesDescriptionProvider.java)
|
||||
for
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
@ -40,7 +40,7 @@ The lifecycle of the PSI is described in more detail in
|
||||
[Architectural Overview](/basics/architectural_overview.md).
|
||||
|
||||
The base classes for the PSI implementation, including
|
||||
[PsiFileBase](https://github.com/JetBrains/intellij-community/blob/master/core-impl/src/com/intellij/extapi/psi/PsiFileBase.java),
|
||||
[PsiFileBase](https://github.com/JetBrains/intellij-community/blob/master/platform/core-impl/src/com/intellij/extapi/psi/PsiFileBase.java),
|
||||
the base implementation of
|
||||
[PsiFile](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/psi/PsiFile.java),
|
||||
and
|
||||
|
@ -28,7 +28,7 @@ The latter method can be implemented by calling ```resolve()``` and comparing th
|
||||
**Example**:
|
||||
[Reference](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/src/com/intellij/lang/properties/ResourceBundleReference.java)
|
||||
to a ResourceBundle in the
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties)
|
||||
|
||||
|
||||
There's a set of interfaces which can be used as a base for implementing resolve support, namely the
|
||||
|
@ -18,7 +18,7 @@ Thus, surprisingly, the easiest way to get the replacement node is to create a d
|
||||
**Example:**
|
||||
[setName()](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/psi/impl/PropertyImpl.java#L58)
|
||||
implementation for a
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties)
|
||||
|
||||
|
||||
Another interface related to the Rename refactoring is
|
||||
@ -32,7 +32,7 @@ are registered in the `com.intellij.lang.namesValidator` extension point.
|
||||
**Example**:
|
||||
[NamesValidator](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/src/com/intellij/lang/properties/PropertiesNamesValidator.java)
|
||||
for
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties)
|
||||
|
||||
|
||||
Further customization of the Rename refactoring processing is possible on multiple levels.
|
||||
@ -65,4 +65,4 @@ This allows you to:
|
||||
**Example**:
|
||||
[RenamePsiElementProcessor](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/src/com/intellij/lang/properties/refactoring/rename/RenamePropertyProcessor.java)
|
||||
for renaming a property in
|
||||
[Properties plugin language](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties plugin language](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties)
|
||||
|
@ -21,7 +21,7 @@ In addition to that, in order to support ```Safe Delete```, a plugin needs to im
|
||||
**Example:**
|
||||
[delete()](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/psi/impl/PropertyImpl.java#L363)
|
||||
implementation for a
|
||||
[Property language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Property language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
||||
|
||||
If needed, it's possible to further customize how Safe Delete is performed for a particular type of element (how references are searched, etc).
|
||||
|
@ -52,4 +52,4 @@ The latter method returns an array of `PsiElement`\-derived classes which can be
|
||||
**Example:**
|
||||
[StructureViewElement](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/structureView/PropertiesStructureViewElement.java)
|
||||
for a
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
@ -40,7 +40,7 @@ can be used.
|
||||
**Example:**
|
||||
[SyntaxHighlighter](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-api/src/com/intellij/lang/properties/PropertiesHighlighter.java)
|
||||
implementation for
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
||||
|
||||
### Parser
|
||||
@ -75,7 +75,7 @@ to specify the text attributes key for the highlighting.
|
||||
**Example:**
|
||||
[Annotator](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesAnnotator.java)
|
||||
for
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
||||
|
||||
### External tool
|
||||
@ -100,6 +100,6 @@ and register it in the ```com.intellij.colorSettingsPage``` extension point.
|
||||
**Example**:
|
||||
[ColorSettingsPage](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/src/com/intellij/openapi/options/colors/pages/PropertiesColorsPage.java)
|
||||
for
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/blob/master/plugins/properties/)
|
||||
[Properties language plugin](https://github.com/JetBrains/intellij-community/tree/master/plugins/properties/)
|
||||
|
||||
The ```Export to HTML``` feature uses the same syntax highlighting mechanism as the editor, so it will work automatically for custom languages which provide a syntax highlighter.
|
||||
|
@ -526,7 +526,7 @@ All the fields here are actually bound to controls in a GUI form.
|
||||
Very often you'll have to create your own file editor. Then, to use all the binding and undo functionality, it's suggested to inherit your `FileEditorProvider` from `PerspectiveFileEditorProvider`, create an instance of `DomFileEditor` there, and pass a `BasicDomElementComponent`. To easily create an editor with a caption at the top, like in our EJB and JSF, you may use the static method `DomFileEditor.createDomFileEditor()`. `DomFileEditor` automatically listens to all changes in the document corresponding to the given DOM element, and therefore refreshes your component on undo. If you want to listen to changes in additional documents, use the methods `addWatchedDocument()`, `removeWatchedDocument()`, `addWatchedElement()`, `removeWatchedElement()` in `DomFileEditor`.
|
||||
|
||||
## Conclusion
|
||||
Thank you for your time and attention. We hope you've found this article really useful. You are welcome to post your questions and comments to our [Open API and Plugin Development Forum](http://devnet.jetbrains.net/community/idea/open_api_and_plugin_development).
|
||||
Thank you for your time and attention. We hope you've found this article really useful. You are welcome to post your questions and comments to our [Open API and Plugin Development Forum](https://devnet.jetbrains.com/community/idea/open_api_and_plugin_development).
|
||||
|
||||
### Further Material
|
||||
The following bundled open source plugins make (heavy) use of DOM:
|
||||
|
@ -10,7 +10,7 @@ The purpose of this document is to introduce messaging infrastructure available
|
||||
# Rationale
|
||||
|
||||
So, what is messaging in _IntelliJ IDEA_ and why do we need it? Basically, its implementation of
|
||||
[Observer pattern](http://en.wikipedia.org/wiki/Observer_pattern)
|
||||
[Observer pattern](https://en.wikipedia.org/wiki/Observer_pattern)
|
||||
that provides additional features like _broadcasting on hierarchy_ and special _nested events_ processing (_nested event_ here is a situation when new event is fired (directly or indirectly) from the callback of another event).
|
||||
|
||||
# Design
|
||||
@ -49,7 +49,7 @@ Connection will use that *default handler* when storing *(topic-handler)* mappin
|
||||
* it's possible to explicitly release acquired resources (*disconnect()* method).
|
||||
Also it can be plugged to standard semi-automatic disposing
|
||||
(
|
||||
[Disposable](https://github.com/JetBrains/intellij-community/tree/master/platform/util/src/com/intellij/openapi/Disposable.java)
|
||||
[Disposable](https://github.com/JetBrains/intellij-community/blob/master/platform/util/src/com/intellij/openapi/Disposable.java)
|
||||
);
|
||||
|
||||
## Putting altogether
|
||||
@ -107,12 +107,12 @@ public void doChange(Context context) {
|
||||
* *MessageBus* instances are available via
|
||||
[ComponentManager.getMessageBus()](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/components/ComponentManager.java#L85)
|
||||
(many standard interfaces implement it, e.g.
|
||||
[Application](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/openapi/application/Application.java),
|
||||
[Project](https://github.com/JetBrains/intellij-community/tree/master/platform/core-api/src/com/intellij/openapi/project/Project.java);
|
||||
[Application](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/application/Application.java),
|
||||
[Project](https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/project/Project.java);
|
||||
|
||||
* number of public topics are used by *IntelliJ IDEA*, e.g.
|
||||
[AppTopics](https://github.com/JetBrains/intellij-community/tree/master/platform/platform-api/src/com/intellij/AppTopics.java),
|
||||
[ProjectTopics](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-api/src/com/intellij/ProjectTopics.java)
|
||||
[AppTopics](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/AppTopics.java),
|
||||
[ProjectTopics](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/ProjectTopics.java)
|
||||
etc.
|
||||
So, it's possible to subscribe to them in order to receive information about the processing;
|
||||
|
||||
@ -182,7 +182,7 @@ Let's see what happens if someone sends a message to the target topic:
|
||||
## Relief listeners management
|
||||
|
||||
Messaging infrastructure is very light-weight, so, it's possible to reuse it at local sub-systems in order to relief
|
||||
[Observers](http://en.wikipedia.org/wiki/Observer_pattern) construction. Let's see what is necessary to do then:
|
||||
[Observers](https://en.wikipedia.org/wiki/Observer_pattern) construction. Let's see what is necessary to do then:
|
||||
|
||||
1. Define business interface to work with;
|
||||
|
||||
|
@ -5,11 +5,11 @@ title: Project Model. Roots and Libraries. Configuring Project from Code.
|
||||
This section considers internal architecture *IntelliJ Platform* projects
|
||||
and gives overview for classes and packages of the API used to manipulate with projects and their components, such as modules, facets, libraries, SDK.
|
||||
For general information about the concept of a projects and concepts related to it, refer to
|
||||
[Project](http://www.jetbrains.com/idea/webhelp/project.html),
|
||||
[Module](http://www.jetbrains.com/idea/webhelp/module.html),
|
||||
[Library](http://www.jetbrains.com/idea/webhelp/library.html),
|
||||
[Project](http://www.jetbrains.com/idea/help/project.html),
|
||||
[Module](http://www.jetbrains.com/idea/help/module.html),
|
||||
[Library](http://www.jetbrains.com/idea/help/library.html),
|
||||
and
|
||||
[Facet](http://www.jetbrains.com/idea/webhelp/facet.html)
|
||||
[Facet](http://www.jetbrains.com/idea/help/facet.html)
|
||||
in
|
||||
[IntelliJ IDEA Web Help](https://www.jetbrains.com/idea/help/intellij-idea.html).
|
||||
|
||||
|
@ -5,7 +5,7 @@ title: Facet
|
||||
A facet represents certain configuration, specific for a particular framework/technology, associated with a module.
|
||||
A module can have multiple facets. E.g. Spring specific configuration is stored in a Spring facet.
|
||||
For more information about facets see
|
||||
[Facet](http://www.jetbrains.com/idea/webhelp/facet.html)
|
||||
[Facet](http://www.jetbrains.com/idea/help/facet.html)
|
||||
and
|
||||
[Facet Dependencies](http://www.jetbrains.com/idea/webhelp/available-facets-and-their-dependencies.html)
|
||||
[Facet Dependencies](http://www.jetbrains.com/idea/help/available-facets-and-their-dependencies.html)
|
||||
in IntelliJ IDEA Web Help.
|
||||
|
@ -10,7 +10,7 @@ IntelliJ IDEA supports three types of libraries:
|
||||
* **Global Library**: the library information is recorded in the applicationLibraries.xml file into the `<User Home>/.IntelliJIdea/config/options` directory. Global libraries are similar to project libraries, but are visible for the different projects.
|
||||
|
||||
For more information about libraries, refer to
|
||||
[Library](http://www.jetbrains.com/idea/webhelp/library.html).
|
||||
[Library](http://www.jetbrains.com/idea/help/library.html).
|
||||
|
||||
## Accessing Libraries and Jars
|
||||
|
||||
|
@ -11,7 +11,7 @@ Depending on the logical and functional requirements to the project, you can cre
|
||||
|
||||
*IntelliJ Platform* stores the project configuration data in XML files.
|
||||
The list of those files depends on the plugin
|
||||
[project](http://www.jetbrains.com/idea/webhelp/project.html)
|
||||
[project](http://www.jetbrains.com/idea/help/project.html)
|
||||
format.
|
||||
For file-based format projects, the information core to the project itself (e.g. location of the component modules, compiler settings, etc.) is stored in the <%project name%>.IPR file.
|
||||
The information about modules the project includes is stored in <%module name%>.IML files.
|
||||
@ -70,14 +70,14 @@ VirtualFile moduleContentRoot = ProjectRootManager.getInstance(project).getFileI
|
||||
## Changing the project structure
|
||||
|
||||
Utility classes which can be used for modifying a project structure can be found in the package
|
||||
[projectModel-impl.openapi](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-impl/src/com/intellij/openapi).
|
||||
[projectModel-impl.openapi](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-impl/src/com/intellij/openapi).
|
||||
It's
|
||||
[roots](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-impl/src/com/intellij/openapi/roots/)
|
||||
[roots](https://github.com/JetBrains/intellij-community/tree/master/platform/projectModel-impl/src/com/intellij/openapi/roots/)
|
||||
subpackage contains instances and utilities meant to work with project and module source roots, including
|
||||
[ModuleRootModificationUtil.java](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-impl/src/com/intellij/openapi/roots/ModuleRootModificationUtil.java)
|
||||
[ModuleRootModificationUtil.java](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootModificationUtil.java)
|
||||
and
|
||||
[ProjectRootUtil.java](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-impl/src/com/intellij/openapi/projectRoots/impl/ProjectRootUtil.java)
|
||||
|
||||
Refer to the
|
||||
[basic example](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/project_model/src/com/intellij/plugins/project/model/ModificationAction.java)
|
||||
[basic example](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/project_model/src/com/intellij/tutorials/project/model/ModificationAction.java)
|
||||
of on-the-fly project structure modification to learn how it can be implemented.
|
||||
|
@ -48,5 +48,5 @@ String projectSdk = ProjectRootManager.getInstance(project).getProjectSdk();
|
||||
ProjectRootManager.getInstance(project).setProjectSdkName(String name);
|
||||
```
|
||||
|
||||
See the following [code sample](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/project_model/src/com/intellij/plugins/project/model/ProjectSdkAction.java)
|
||||
See the following [code sample](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/project_model/src/com/intellij/tutorials/project/model/ProjectSdkAction.java)
|
||||
to get more familiar with SDK manipulation tool set.
|
||||
|
@ -5,7 +5,7 @@ title: Project Wizard. Adding Support for Creating New Project Types.
|
||||
## Project Wizard
|
||||
|
||||
Working with the project wizard can be illustrated with the
|
||||
[RedLine SmallTalk plugin](https://github.com/bulenkov/RedlineSmalltalk.git)
|
||||
[RedLine SmallTalk plugin](https://github.com/bulenkov/RedlineSmalltalk)
|
||||
|
||||
## Implementing New Module Type
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Plugin Development
|
||||
---
|
||||
|
||||
Plugins in PHPStorm developed in Java using IntelliJ IDEA (Community Edition is OK). You will also need a copy of PhpStorm to develop against. The [PsiViewer plugin](https://plugins.jetbrains.com/plugin/?null&pluginId=227) will also be most useful.
|
||||
Plugins in PHPStorm developed in Java using IntelliJ IDEA (Community Edition is OK). You will also need a copy of PhpStorm to develop against. The [PsiViewer plugin](https://plugins.jetbrains.com/plugin/?pluginId=227) will also be most useful.
|
||||
|
||||
### PhpStorm Specifics
|
||||
* [Setting-up the environment](setting_up_environment.md)
|
||||
|
@ -13,7 +13,7 @@ These UI elements include main menu, context menus, and toolbars.
|
||||
* [Grouping Action](action_system/grouping_action.html)
|
||||
|
||||
|
||||
[Plugin source code](https://github.com/JetBrains/intellij-sdk/tree/master/code_samples/register_actions)
|
||||
[Plugin source code](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/register_actions)
|
||||
|
||||
[Home](/)
|
||||
|
||||
|
@ -8,7 +8,7 @@ In this case the group will be available as a top-level menu item, action will b
|
||||
### 2.1. Creating simple action groups
|
||||
|
||||
Grouping can be done by extending adding `<group>` attribute to `<actions>`
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
file.
|
||||
|
||||
```xml
|
||||
@ -98,7 +98,7 @@ public class CustomDefaultActionGroup extends DefaultActionGroup {
|
||||
As in case with the simple action group, the inheritor of
|
||||
[DefaultActionGroup.java](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java)
|
||||
should be declared in
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
file:
|
||||
|
||||
```xml
|
||||
@ -127,7 +127,7 @@ public class CustomGroupedAction extends AnAction {
|
||||
### 2.8. Adding actions to the group
|
||||
|
||||
Action's class should be registered in
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
:
|
||||
|
||||
```xml
|
||||
@ -182,7 +182,7 @@ public class BaseActionGroup extends ActionGroup {
|
||||
### 2.12. Registering variable action group
|
||||
|
||||
To register the group `<group>` attribute needs to be placed in the *`<actions>`* section of
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/register_actions/META-INF/plugin.xml):
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/register_actions/META-INF/plugin.xml):
|
||||
|
||||
```xml
|
||||
<actions>
|
||||
@ -193,7 +193,7 @@ To register the group `<group>` attribute needs to be placed in the *`<actions>`
|
||||
</actions>
|
||||
```
|
||||
**Note**: Since the set of actions is defined dynamically no action definitions should be placed in
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/register_actions/META-INF/plugin.xml).
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/register_actions/META-INF/plugin.xml).
|
||||
If `<group>` attribute contains any static action definition an exception will be thrown.
|
||||
For statically defined group of action use
|
||||
[DefaultActionGroup.java](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java)
|
||||
|
@ -42,7 +42,7 @@ public class SimpleAction extends AnAction {
|
||||
### 1.3. Registering actions
|
||||
|
||||
To register a newly created action, `<action>` attribute should be added to the `<actions>` section of the plugin configuration file
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/register_actions/META-INF/plugin.xml).
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/register_actions/META-INF/plugin.xml).
|
||||
IntelliJ IDEA has an embedded inspection that spots unregistered actions.
|
||||

|
||||
|
||||
@ -55,7 +55,7 @@ In our case the action will be available in the **Tools Menu**, it will be place
|
||||

|
||||
|
||||
After filling the **New Action** form and applying the changes `<actions>` section of our
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
file will look like this:
|
||||
|
||||
```xml
|
||||
@ -71,7 +71,7 @@ file will look like this:
|
||||
### 1.4. Setting attributes manually
|
||||
|
||||
Full list of action's attributes can also be set manually in
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/register_actions/META-INF/plugin.xml)
|
||||
configuration file like the following code sample shows:
|
||||
|
||||
```xml
|
||||
|
@ -22,7 +22,7 @@ public class SimpleLanguage extends Language {
|
||||
### 2.2. Define an icon
|
||||
|
||||
Copy the
|
||||
[icon](https://raw.github.com/cheptsov/SimplePlugin/master/src/com/simpleplugin/icons/jar-gray.png)
|
||||
[icon](https://raw.githubusercontent.com/cheptsov/SimplePlugin/master/src/com/simpleplugin/icons/jar-gray.png)
|
||||
to **com.simpleplugin.icons** package.
|
||||
|
||||
```java
|
||||
|
@ -19,7 +19,7 @@ Make sure that the bundled Plugin DevKit plugin is enabled.
|
||||
Install and enable
|
||||
[Grammar-Kit](http://plugins.intellij.net/plugin?pluginId=6606)
|
||||
and
|
||||
[PsiViewer](http://plugins.intellij.net/plugin/?null&pluginId=227)
|
||||
[PsiViewer](http://plugins.intellij.net/plugin/?pluginId=227)
|
||||
plugins.
|
||||
|
||||
### 1.4. Configure SDK and source files
|
||||
|
@ -3,7 +3,7 @@ title: Custom Language Support Tutorial
|
||||
---
|
||||
|
||||
In this tutorial we will add basic support for
|
||||
[.properties](http://en.wikipedia.org/wiki/.properties)
|
||||
[.properties](https://en.wikipedia.org/wiki/.properties)
|
||||
language and it's usages within Java code.
|
||||
|
||||
We will generate parser and PSI elements using
|
||||
|
@ -3,7 +3,7 @@ title: Basics of working with the Editor
|
||||
---
|
||||
|
||||
|
||||
[Source code](https://github.com/JetBrains/intellij-sdk/tree/master/code_samples/editor_basics)
|
||||
[Source code](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/editor_basics)
|
||||
|
||||
----------
|
||||
|
||||
@ -29,6 +29,6 @@ section.
|
||||
[DataContext](https://github.com/JetBrains/intellij-community/blob/master/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/DataContext.java)
|
||||
|
||||
**Related topics:**
|
||||
[Action System](https://github.com/JetBrains/intellij-sdk/blob/master/tutorials/action_system/action_system.md)
|
||||
[Action System](/tutorials/action_system/action_system.md)
|
||||
|
||||
|
||||
|
@ -125,9 +125,9 @@ public class EditorAreaIllustration extends AnAction {
|
||||
```
|
||||
|
||||
Check out, compile, and run the
|
||||
[Editor Basics Plugin](https://github.com/JetBrains/intellij-sdk/tree/master/code_samples/editor_basics),
|
||||
[Editor Basics Plugin](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/editor_basics),
|
||||
then move carets, invoke
|
||||
[EditorAreaIllustration](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/editor_basics/src/org/jetbrains/plugins/editor/basics/EditorAreaIllustration.java)
|
||||
[EditorAreaIllustration](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/editor_basics/src/org/jetbrains/tutorials/editor/basics/EditorAreaIllustration.java)
|
||||
action, and see how logical and visual positions are related dependently on folding.
|
||||
|
||||
Find the action in the context menu:
|
||||
|
@ -5,7 +5,7 @@ title: 3. Handling Editor Events
|
||||
The following set of tutorials is meant to be an introduction to actions activated by editor events
|
||||
IntelliJ IDEA SDK provides a set of embedded mechanisms for handling events related to the Editor.
|
||||
|
||||
[Source code](https://github.com/JetBrains/intellij-sdk/tree/master/code_samples/editor_basics)
|
||||
[Source code](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/editor_basics)
|
||||
|
||||
|
||||
## 3.1. Handling keystrokes in the Editor
|
||||
@ -95,7 +95,7 @@ public class EditorHandlerIllustration extends AnAction {
|
||||
```
|
||||
|
||||
Register action in
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/editor_basics/resources/META-INF/plugin.xml):
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/editor_basics/resources/META-INF/plugin.xml):
|
||||
|
||||
```xml
|
||||
<actions>
|
||||
@ -171,4 +171,4 @@ public class EditorHandlerIllustration extends AnAction {
|
||||
|
||||
After compiling and running the following code sample, one extra caret will be placed in the editor below the current active caret.
|
||||
|
||||
[Source code](https://github.com/JetBrains/intellij-sdk/tree/master/code_samples/editor_basics)
|
||||
[Source code](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/editor_basics)
|
||||
|
@ -24,7 +24,7 @@ public class EditorIllustration extends AnAction {
|
||||
### 1.1.2. Registering an action
|
||||
|
||||
To register the action we should add a corresponding attribute to the `<actions>` section of the plugin configuration file
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/editor_basics/resources/META-INF/plugin.xml)
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/editor_basics/resources/META-INF/plugin.xml)
|
||||
|
||||
|
||||
```xml
|
||||
@ -211,7 +211,7 @@ public void actionPerformed(final AnActionEvent anActionEvent) {
|
||||
-----------
|
||||
|
||||
The source code is located in
|
||||
[EditorIllustration.java](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/editor_basics/src/org/jetbrains/plugins/editor/basics/EditorIllustration.java).
|
||||
[EditorIllustration.java](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/editor_basics/src/org/jetbrains/tutorials/editor/basics/EditorIllustration.java).
|
||||
To see how text replacement works, check out
|
||||
[Editor Basics](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/editor_basics/src/org/jetbrains/plugins/editor/basics/)
|
||||
[Editor Basics](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/editor_basics/src/org/jetbrains/tutorials/editor/basics/)
|
||||
plugin, make the project, and run it, then invoke the *EditorIllustration* action which is available in the context menu of the editor.
|
||||
|
@ -19,7 +19,7 @@ public class DemoFramework extends FrameworkTypeEx {
|
||||
## 2. Registering framework
|
||||
|
||||
The newly created framework should be registered as an extension point by putting *framework.type* attribute into `<extensions>` section of
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/framework/META-INF/plugin.xml)
|
||||
[plugin.xml](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/framework/META-INF/plugin.xml)
|
||||
configuration file:
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ public class DemoFramework extends FrameworkTypeEx {
|
||||
To make framework set up available while executing project creating steps
|
||||
```public FrameworkSupportInModuleProvider createProvider();```
|
||||
of the
|
||||
[DemoFramework](https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/framework/src/com/intellij/tutorials/framework/DemoFramework.java)
|
||||
[DemoFramework](https://github.com/JetBrains/intellij-sdk-docs/blob/master/code_samples/framework/src/com/intellij/tutorials/framework/DemoFramework.java)
|
||||
must be implemented:
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ After compiling and running the code sample above an extra option for configurin
|
||||
|
||||
----------
|
||||
|
||||
[Source code](https://github.com/JetBrains/intellij-sdk/tree/master/code_samples/framework/src/com/intellij/tutorials/framework)
|
||||
[Source code](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/framework/src/com/intellij/tutorials/framework)
|
||||
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ This tutorial is meant to illustrate how the project tree structure view appeara
|
||||
If you need to know more about basic concepts of a project view in IntelliJ-based IDEs, please refer to
|
||||
[Exploring The Project Structure](https://www.jetbrains.com/idea/help/exploring-the-project-structure.html#d164891e120)
|
||||
of
|
||||
[IntelliJ IDEA Web Help](https://www.jetbrains.com/idea/help/).
|
||||
[IntelliJ IDEA Web Help](https://www.jetbrains.com/idea/help/intellij-idea.html).
|
||||
|
||||
Series of step below show how to filter out and keep visible only text files and directories in the Project View Panel.
|
||||
|
||||
|
@ -18,4 +18,4 @@ As an example we will take the plugin implemented in the [Custom Language Suppor
|
||||
* [9. Commenter Test](writing_tests_for_plugins/commenter_test.html)
|
||||
* [10. Reference Test](writing_tests_for_plugins/reference_test.html)
|
||||
|
||||
The final code can be found on [GitHub](http://github.com/cheptsov/SimplePlugin).
|
||||
The final code can be found on [GitHub](https://github.com/cheptsov/SimplePlugin).
|
||||
|
Loading…
x
Reference in New Issue
Block a user