Skip to content

[process] Establish Java/Kotlin coding standards #8098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pq opened this issue Apr 23, 2025 · 0 comments
Open

[process] Establish Java/Kotlin coding standards #8098

pq opened this issue Apr 23, 2025 · 0 comments
Assignees
Milestone

Comments

@pq
Copy link
Contributor

pq commented Apr 23, 2025

For Dart contributions, we can point folks to the Dart style guide as a North star. We should establish what we want to do for Java/Kotlin and communicate that in the PR template and Contributing guides as well. (See: #8062).

@pq pq added this to the On Deck milestone Apr 23, 2025
@pq pq self-assigned this Apr 23, 2025
pq added a commit that referenced this issue Apr 23, 2025
Java 16 introduces [pattern
matching](https://dev.java/learn/pattern-matching/) which allows us to
cleanup some unnecessary casts.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue Apr 23, 2025
Fixes up stale TOC and a step mis-numbering.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue Apr 23, 2025
`java.awt` colors are not dark-theme friendly but `JBColor`s are. As a
bonus we can use the `Gray` constant.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
jwren pushed a commit that referenced this issue Apr 24, 2025
Fixes: #8110

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue Apr 24, 2025
![image](https://github.com/user-attachments/assets/bffce434-6527-4501-95d7-129541d8b4b7)

From the inspection description:

> Static initialization is performed once the class is loaded, which may
cause excessive classloading or early initialization of heavy resources.
Since extension point implementations are supposed to be cheap to
create, they must not have static initializers.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue Apr 24, 2025
Single-quotes have a special meaning in properties bundles and so we
need to use `"`.


![image](https://github.com/user-attachments/assets/40df2c5a-9675-46c7-a15d-cc7a061344af)

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue Apr 24, 2025
Inspection description:

> Reports calls to Throwable.printStackTrace() without arguments.
Such statements are often used for temporary debugging and should be
either removed from the production code or replaced with a more robust
logging facility.

Note that this PR disables the inspection in TEST scopes since
`printStackTrace()` is handy there and "robust" logging in a test
context is often more of a hinderance than help.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue Apr 24, 2025
`ProcessCanceledException`s need to be rethrown so that the IDEA
infrastructure can handle them properly.


![image](https://github.com/user-attachments/assets/722f1b68-e540-48e1-886f-c12e5406c7a7)




---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue Apr 24, 2025
More opportunistic tidying.

🧹 Remove unused empty method bodies. (Also a rogue `;`.) 
🧹 Simplify a boolean expression.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue Apr 24, 2025
A bit pedantic but generally good practice and easy to fix. (There's
also no real reason to store the instance.)


![image](https://github.com/user-attachments/assets/529be20b-134e-4c41-8093-7928c676bab7)

Inspection motivation:

> Such services' assignments contribute to global state and make it
impossible to tear down an application and set up another one in tests,
therefore, repeated tests in the same process may fail. The only
exception is an explicit constructor call to store dummy/default
instances.
> The recommended way to avoid storing services is to retrieve a service
locally. Alternatively, one can wrap it in java.util.function.Supplier
(Java, Kotlin) or convert the property to a function (Kotlin).

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
@pq pq mentioned this issue Apr 28, 2025
1 task
pq added a commit that referenced this issue Apr 28, 2025
The link didn't seem to make the wiki migration:


![image](https://github.com/user-attachments/assets/24306222-276d-4903-aba4-5638aea0023c)


---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 20, 2025
Migrate from deprecated `LayeredIcon(...)` to the `layeredIcon` object
companion function (now preferred).

See: 


https://github.com/JetBrains/intellij-community/blob/1d1263727bd49f317fdf385e50dded26e98cc76f/platform/core-ui/src/ui/LayeredIcon.kt#L101

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 20, 2025
`StartupActivity` is marked as obsolete with `ProjectActivity`
identified as the path forward.

This introduces a `FlutterProjectActivity` that does some rudimentary
error handling as well.

See #7718 and
#8100

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 20, 2025
Fixes broken `com.google.tools.ij.aiplugin` and
`org.jetbrains.plugins.yaml` plugin references by adding missing gradle
dependencies.

See inspection details here:


https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html?from=DevkitPluginXmlInspection

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 20, 2025
Following up on a TODO from Steve to remove an unused method and
callers.

Interestingly, `FlutterModuleGroup` seems entirely unused. It's meant
to:

```
// Define a group of Flutter project types for use in Android Studio 4.2 and later.
```

Steve warns:

```
// TODO (messick) DO NOT delete this during post-4.2 clean-up.
```

but maybe we can? Especially if noone has plans to re-integrate.

@jwren : do you have any context on this?


---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 21, 2025
The inspection suppression wasn't enough and the unsafe cast was
spamming our logs (besides just being unsafe).


![image](https://github.com/user-attachments/assets/1b66b5b2-9f0f-48ce-a485-9f178dcb67e4)

This fixes the cast properly.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 21, 2025
)

The model for this change was set with
#8200 and ties up our
migration off of the deprecated `StartupActivity` in favor of project
activities, leveraging IntelliJ's embrace of Kotlin coroutines for
improved startup performance.

Fixes: #8100



---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 21, 2025
Speeds up `SdkRunConfig.getState` which necessarily runs on the Event
Dispatch Thread.

The fix has two parts:

1. Move the expensive call to `ModuleUtilCore.findModuleForFile(..)`
into an async read action (because we can) and
2. Speed up `inProject` because we can't background it and there's a
speedy alternative to the old more expensive approach

Addresses stack traces like this:

```
java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.intellij.util.SlowOperations.assertSlowOperationsAreAllowed(SlowOperations.java:114)
	at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.ensureIsUpToDate(WorkspaceFileIndexDataImpl.kt:153)
	at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.getFileInfo(WorkspaceFileIndexDataImpl.kt:98)
	at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:267)
	at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSetWithCustomData(WorkspaceFileIndexImpl.kt:250)
	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:102)
	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:95)
	at com.intellij.openapi.module.ModuleUtilCore.lambda$findModuleForFile$0(ModuleUtilCore.java:84)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:272)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:262)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:863)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
	at com.intellij.openapi.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:84)
	at io.flutter.run.SdkRunConfig.getState(SdkRunConfig.java:139)
	at io.flutter.run.SdkRunConfig.getState(SdkRunConfig.java:59)
```

See: #8089

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 22, 2025
`FlutterStudioInitializer` exists to perform a check at startup to
ensure AS is current enough for... something...
I can't recall the motivation for this extra check (despite having
reviewed it in #1346 😬)
but it was **8 years ago**!

Needless to say, removing it is surely safe:

1. the `com.intellij.androidStudioInitializer` extension point seems to
have gone away, and even if it hadn't,
2. we're surely past the window where there are any version out there
that are too early for the version check




---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 22, 2025
Another deadcode round-up cleaning up unused bits:

* orphaned by removed preview support
* unused (and stale) observatory integration
* inspector cruft
* commented out code (dating back 7 years 😬
6350cf8)

In the best case we got a little perf boost by not calculating flutter
imports that were being unused 🎉

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 22, 2025
The move to project activities has some nuance. In the long run we'll be
able to do some real performance tuning but in the short-run some of our
assumptions about being in a read context need to be rethunk. Here's
one.

The rub is `autoCreateRunConfig` needs to be in a read context but the
remaining initialization needs to be on the EDT.

Fixes #8215 

See also: #8100 


---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 23, 2025
These classes are exposed but not available outside their visibility
scopes. The APIs exposing them seem reasonable but if we revisit them we
can always make these classes (more) private again.


![image](https://github.com/user-attachments/assets/8dcd2cdb-47cb-4d48-96fb-4d12b8800d04)


---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 23, 2025
Back In 2019, we added some logic to reflectively access a not-yet
public `"GRADLE_SYNC_TOPIC"` on `GradleSyncState` subscribing a listener
that called `GradleUtils.checkDartSupport()` on all sync events.

Sometime since then, the field has gone away entirely and we are not
getting these notifications. What makes this interesting is how our use
of reflection masked the failure.

Luckily, an inspection flagged the unsafe check, spamming our logs at
runtime:


![image](https://github.com/user-attachments/assets/0b42c065-0abc-4c43-8b5f-de3663096877)

My first attempt was to fix the cast but I'm glad I embraced the yak
shave. "Safe" reflective access in this case would still have obscured
the unnecessariness of this code.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
@JAPNITSINGH JAPNITSINGH mentioned this issue May 24, 2025
1 task
jwren pushed a commit that referenced this issue May 27, 2025
- Added live indicator when run or debug flutter app in the tool window
tab.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 28, 2025
🧹 ✨ Some more dead code cleanup, removing:

* Inspector-orphaned icons, bounding box and custom icon support
* now dead fake active editor outline service and opportunistically a
handful of
* unused fields and methods

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
jwren pushed a commit that referenced this issue May 28, 2025
#8228)

The (neat) `DataContext` functional interface is slated to be removed.


![image](https://github.com/user-attachments/assets/dceb05c7-aa6a-4b20-bbd6-def43062e66e)

This migrates us to a `SimpleDataContext` builder which is the [new path
forward](https://github.com/JetBrains/intellij-community/blob/7b62c265ab76de3c80882525fdc4047895f3f4b1/platform/core-ui/src/openapi/actionSystem/DataContext.java#L18).

See: #7718


---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
pq added a commit that referenced this issue May 28, 2025
This reverts commit a82aa73.

This previous commit may have borked devtools toolwindows; reverting for
now to investigate...

Sorry for the noise!


---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant