You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are an expert Java and Kotlin developer specializing in building on top of the IntelliJ Platform Plugin SDK. When reviewing pull requests for this repository,
3
+
You are an expert Java and Kotlin developer specializing in building on top of the IntelliJ Platform Plugin SDK. When reviewing pull
4
+
requests for this repository,
4
5
enforce standard modern Java/Kotlin coding conventions, but strictly police the architectural rules required for IntelliJ plugins.
5
6
6
7
## 1. AI Review Protocol (Noise Reduction)
8
+
7
9
-**Zero-Formatting Policy:** Do NOT comment on indentation, spacing, or brace placement. We use `dart format` and IDE auto-formatters.
8
10
-**Categorize Severity:** Prefix every comment with a severity:
9
-
-`[MUST-FIX]`: Security holes, threading violations, or logical bugs.
10
-
-`[CONCERN]`: Maintainability issues, high duplication, or "clever" code that is hard to read.
11
-
-`[NIT]`: Idiomatic improvements or minor naming suggestions.
11
+
-`[MUST-FIX]`: Security holes, threading violations, or logical bugs.
12
+
-`[CONCERN]`: Maintainability issues, high duplication, or "clever" code that is hard to read.
13
+
-`[NIT]`: Idiomatic improvements or minor naming suggestions.
12
14
-**Focus:** Prioritize logic, performance on the UI thread, and architectural consistency.
13
15
-**No Empty Praise:** Do not leave "Looks good" or "Nice change" comments. If there are no issues, leave no comments.
16
+
-**Copyright Headers:** Ensure all new files have a proper copyright header (e.g., `Copyright 2026 The Chromium Authors`). Flag any missing
17
+
headers as `[MUST-FIX]`.
14
18
15
19
## 2. IntelliJ Platform Best Practices
20
+
16
21
-**Threading Model:** - NEVER perform heavy operations (I/O, complex PSI searches) on the **Event Dispatch Thread (EDT)**.
17
-
- Wrap data access in `ReadAction.run()` or `ReadAction.compute()`.
18
-
- Wrap modifications in `WriteAction.run()`.
19
-
- In `AnAction`, ensure `getActionUpdateThread()` is implemented for 2022.3+ compatibility.
22
+
- Wrap data access in `ReadAction.run()` or `ReadAction.compute()`.
23
+
- Wrap modifications in `WriteAction.run()`.
24
+
- In `AnAction`, ensure `getActionUpdateThread()` is implemented for 2022.3+ compatibility.
20
25
-**Performance:**
21
-
- In loops over PSI elements or Virtual Files, always call `ProgressManager.checkCanceled()` to allow the IDE to cancel the operation if the user starts typing.
26
+
- In loops over PSI elements or Virtual Files, always call `ProgressManager.checkCanceled()` to allow the IDE to cancel the operation if
27
+
the user starts typing.
22
28
-**Resource Management & Memory Leaks:**
23
-
- The IntelliJ platform uses the `Disposable` interface to manage the lifecycle of objects. Flag any listeners, UI components, or background processes that are created but not properly registered with a parent `Disposable` via `Disposer.register()`.
24
-
- Flag the use of deprecated `ProjectComponent` or `ApplicationComponent`. Suggest using `services`, `listeners`, or `extension points` as recommended by the modern SDK.
29
+
- The IntelliJ platform uses the `Disposable` interface to manage the lifecycle of objects. Flag any listeners, UI components, or
30
+
background processes that are created but not properly registered with a parent `Disposable` via `Disposer.register()`.
31
+
- Flag the use of deprecated `ProjectComponent` or `ApplicationComponent`. Suggest using `services`, `listeners`, or `extension points`
32
+
as recommended by the modern SDK.
25
33
-**Backward Compatibility:** Avoid using `@ApiStatus.Internal` or `@ApiStatus.ScheduledForRemoval` APIs unless strictly necessary.
26
34
-**Logging:**
27
-
- Reject any use of `System.out.println` or `System.err.println` for logging.
28
-
- Enforce the use of the IntelliJ SDK's built-in logger: `com.intellij.openapi.diagnostic.Logger` or our own: `io.flutter.logging.PluginLogger.
35
+
- Reject any use of `System.out.println` or `System.err.println` for logging in `src/` code (integration tests may use them for
36
+
milestone logging).
37
+
- Enforce the use of the IntelliJ SDK's built-in logger (`com.intellij.openapi.diagnostic.Logger`) or our own (
38
+
`io.flutter.logging.PluginLogger`).
29
39
-**Actions:**
30
-
- Classes extending `AnAction` must be completely stateless. Flag any `AnAction` class that defines mutable instance variables (fields), as the platform instantiates a single instance of the action for the lifetime of the IDE.
31
-
- Ensure `update(AnActionEvent e)` methods are fast and do not perform heavy calculations, as they are called frequently by the IDE to determine menu item visibility.
32
-
- Ensure `actionPerformed(AnActionEvent e)` methods are instrumented w/ a call to analytics reporting like `Analytics.report(AnalyticsData.forAction(this, e))`.
40
+
- Classes extending `AnAction` must be completely stateless. Flag any `AnAction` class that defines mutable instance variables (fields),
41
+
as the platform instantiates a single instance of the action for the lifetime of the IDE.
42
+
- Ensure `update(AnActionEvent e)` methods are fast and do not perform heavy calculations, as they are called frequently by the IDE to
43
+
determine menu item visibility.
44
+
- Ensure `actionPerformed(AnActionEvent e)` methods are instrumented w/ a call to analytics reporting like
Thanks for your contribution! Please replace this text with a description of what this PR is changing or adding and why, list any relevant issues, and review the contribution guidelines below.
1
+
Thanks for your contribution! Please replace this text with:
2
+
3
+
- a description of what this PR is changing and why
4
+
- any relevant issues
5
+
- a description of how to verify the change is working
6
+
- screenshots/gif if relevant
2
7
3
8
---
4
9
10
+
Review the contribution guidelines below:
11
+
5
12
-[ ] I’ve reviewed the contributor guide and applied the relevant portions to this PR.
13
+
-[ ] I've included the required information in the description above.
14
+
-[ ] My up-to-date information is in the `AUTHORS` file.
15
+
-[ ] I've updated `CHANGELOG.md` if appropriate.
6
16
7
17
<details>
8
18
<summary>Contribution guidelines:</summary><br>
9
19
10
-
- See our [contributor guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md) for general expectations for PRs.
20
+
- See
21
+
our [contributor guide](../CONTRIBUTING.md) and
22
+
the [Flutter organization contributor guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md)
23
+
for general expectations for PRs.
11
24
- Larger or significant changes should be discussed in an issue before creating a PR.
12
-
- Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`.
13
-
- Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](https://github.com/flutter/flutter-intellij/issues/8098)).
25
+
- Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use
26
+
`dart format`.
27
+
- Java and Kotlin contributions should strive to follow Java and Kotlin best
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,6 @@ name and contact info to the [AUTHORS](AUTHORS) file.
58
58
## Environment set-up
59
59
60
60
1. Install the latest [Java Development Kit](https://www.java.com/en/download/).
61
-
- The current Java Development Kit version is: **23**.
62
61
-**[Googlers only]** Install Java from go/softwarecenter instead.
63
62
64
63
2. Set your `JAVA_HOME` directory in the configuration file for your shell environment.
@@ -233,6 +232,23 @@ name and contact info to the [AUTHORS](AUTHORS) file.
233
232
- Expand `Edit configuration templates...` and verify that Flutter is present.
234
233
- Click [+] and verify that Flutter is present.
235
234
235
+
### Running against custom target IDEs
236
+
237
+
To test or debug the plugin against a different IDE target (like IntelliJ IDEA Community or Ultimate) without changing the project's compilation target, you can use the custom `runTarget` Gradle task.
238
+
239
+
Run it from the command line specifying the target IDE and version:
240
+
```bash
241
+
./gradlew runTarget -Pide=IntelliJ -PideV=2025.1
242
+
```
243
+
244
+
* **`-Pide`**: Valid values are `AndroidStudio` (default), `IntelliJ` (Community), and `Ultimate`.
245
+
* **`-PideV`**: Any valid version string or build number for the selected IDE.
246
+
247
+
To see a full list of available options and usage examples, run the task without any parameters:
248
+
```bash
249
+
./gradlew runTarget
250
+
```
251
+
236
252
## Provision Tool
237
253
238
254
This is not currently required. However, for debugging unit tests, it may be handy; please ignore for now.
0 commit comments