migrate-intellij-util

द्वारा flutter

Optimize memory usage, consistency, and performance by migrating standard Java/Kotlin classes to IntelliJ's specialized com.intellij.util implementations.

npx skills add https://github.com/flutter/flutter-intellij --skill migrate-intellij-util

Skill: API Migration to use com.intellij.util.* classes and methods

You are tasked with optimizing memory usage, consistency, and performance by migrating standard Java/Kotlin classes to IntelliJ's specialized com.intellij.util implementations.

Objective

Go read https://javadoc.jetbrains.net/teamcity/openapi/current/com/intellij/util/package-summary.html, and then optimize memory usage, consistency, and performance by migrating standard Java/Kotlin classes to IntelliJ's specialized com.intellij.util implementations.

Candidates for Migration

  • ArrayList -> SmartList (for potentially empty/small lists)
  • HashMap / ConcurrentHashMap -> ContainerUtil maps
  • String manipulation -> StringUtil (e.g., isEmpty, join, notNullize)
  • Path / File string manipulation -> PathUtil
  • javax.swing.Timer -> Alarm (for UI-related callbacks/debouncing)
  • Null checks -> ObjectUtils (e.g., doIfNotNull, coalesce)
  • Array resizing/merging -> ArrayUtil

Workflow Instructions

1. Baseline

  • Run ./gradlew testClasses, ./gradlew test, and ./gradlew verifyPlugin to ensure project is in a good state.

2. Select Target

  • Identify a single migration opportunity within a single package.

3. Constraint

  • Keep the change extremely small (max 50 lines of code change).

4. Migrate

  • Replace standard API with the com.intellij.util equivalent.

5. Verify

  • Run ./gradlew testClasses to ensure migration didn't break test compilation.
  • Run ./gradlew test and ./gradlew verifyPlugin to ensure no regressions.
  • Suggest manual test steps: Check code changes made and write test steps for a user to execute that will trigger changed code paths. If needed, add logging statements to verify code paths have successfully run.

6. Report & Review

  • Summarize the migration.
  • Test Location: Explicitly state where in the IDE user should go to test changed functionality (e.g., "Go to Preferences > Languages & Frameworks > Flutter").
  • Action: Ask user to review changes closely.
  • Do not commit or push.
  • Provide a suggested Git commit message (e.g., "Migrate code to use StringUtil in [Class Name]").

flutter की और Skills

adding-release-notes
flutter
उपयोगकर्ता-सामना करने वाले परिवर्तन विवरणों को DevTools रिलीज़ नोट्स में जोड़ता है। NEXT_RELEASE_NOTES.md फ़ाइल में सुधार, सुधार या नई सुविधाओं का दस्तावेज़ीकरण करते समय उपयोग करें।
official
dart-modern-features
flutter
आधुनिकीकरण के लिए उम्मीदवार खोजने हेतु:
official
api-review
flutter
निर्दिष्ट कोड की विहित API डिज़ाइन दिशानिर्देशों के अनुसार समीक्षा करता है। इस कौशल का उपयोग तब करें जब उपयोगकर्ता API समीक्षा के लिए पूछे या API डिज़ाइन के अनुसार कोड की जाँच करने के लिए…
official
code-documentation
flutter
प्रभावी कोड दस्तावेज़ीकरण लिखने के लिए मार्गदर्शिका, जिसमें docstrings, JSDoc, dartdoc, और implementation comments शामिल हैं। नया कोड लिखते समय, जोड़ते समय इस skill का उपयोग करें…
official
dart-add-unit-test
flutter
Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains…
official
dart-build-cli-app
flutter
प्रवेश बिंदु संरचना, निकास कोड, क्रॉस-प्लेटफ़ॉर्म स्क्रिप्ट। कमांड लाइन उपयोगिताओं, स्क्रिप्ट्स, या अनुप्रयोगों के निर्माण के समय उपयोग करें।
official
dart-collect-coverage
flutter
कवरेज पैकेज का उपयोग करके कवरेज एकत्र करें और एक LCOV रिपोर्ट बनाएं
official
dart-fix-runtime-errors
flutter
get_runtime_errors और lsp का उपयोग करके सक्रिय स्टैक ट्रेस प्राप्त करता है, विफल पंक्ति का पता लगाता है, सुधार लागू करता है, और hot_reload के माध्यम से समाधान सत्यापित करता है।
official