Add documentation provider, inspections, and improve settings UI#118
Draft
inxilpro wants to merge 12 commits into
Draft
Add documentation provider, inspections, and improve settings UI#118inxilpro wants to merge 12 commits into
inxilpro wants to merge 12 commits into
Conversation
The release workflow used Java 17 while the project requires Java 21, causing release builds to fail. Also switched plugin verification from a single hardcoded IDE version to recommended() for broader coverage. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
… settings 28 tests covering: - PackageJsonDetector: verifies plugin detection from package.json dependencies - ScriptReferenceDetector: verifies detection from HTML script tags and JS imports - AlpineCompletionContributor: verifies directive, event, bind, and modifier completions - AlpineJavaScriptInjection: verifies JS injection into Alpine attribute values - AlpineSettings: verifies app/project settings persistence round-trips https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
…gs UI - Replace org.apache.commons.lang3.tuple.MutablePair with Kotlin data class JsContext(prefix, suffix) across all plugin files - Add DumbService.isDumb() guards to PackageJsonDetector, ScriptReferenceDetector, and AlpinePluginRegistry to prevent index access during dumb mode - Use DumbService.runWhenSmart() for VFS listener callback - Use project-scoped disposable for message bus connection - Add @service(Service.Level.PROJECT) to AlpineProjectSettingsState - Add structured logging via logger<>() to registry and detectors - Add dynamic="true" to alpinePlugin extension point - Modernize settings UI with Kotlin UI DSL v2 panel builder, eliminating the separate AlpineSettingsComponent class - Add PSI caching via CachedValuesManager for ID lookups in AlpineTargetReferenceContributor https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
- DocumentationProvider showing docs for all Alpine directives (x-data, x-show, x-model, etc.) and magic properties ($refs, $dispatch, etc.) with examples and descriptions. Handles @event and :bind shorthands. - DeprecatedXSpreadInspection warns when x-spread is used, recommending x-bind with object syntax instead (deprecated in Alpine v3). - 11 new tests covering documentation generation and inspection warnings. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
The Kotlin 2.1 K2 compiler's FirIncompatibleClassExpressionChecker crashes on the Java override of PsiMetaData.init(PsiElement) due to a nullability mismatch. Accept nullable parameter to work around it. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
c32b5f9 to
3f2b635
Compare
Qodana Community for JVM1 new problem were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.1.1
with:
upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com
|
…ation - Remove unused LOG variables from PackageJsonDetector and ScriptReferenceDetector (and their logger imports) - Remove unused magicDocs map from AlpineDocumentationProvider - Remove unused AttributeUtil import from AlpineDocumentationProvider - Quote 'x-spread' in inspection displayName for capitalization rules https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
PhpStorm/IntelliJ 2026.1 ships with Kotlin metadata version 2.3.0, which requires Kotlin 2.2.0+ to read. Bumped Kotlin from 2.1.21 to 2.2.0 and extended pluginUntilBuild from 253.* to 261.* to support the 2026.1 IDE family. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
The IntelliJ Platform Gradle Plugin can't resolve product-info.json from a downloaded PhpStorm 2026.1 due to macOS app bundle nesting. Using local() with the actual installation path avoids this issue and is faster since it skips downloading. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
PhpStorm 2026.1 has large JARs that exceed the default Gradle heap during classpath entry snapshot transforms. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
In PhpStorm 2026.1, the JSON plugin is a separate bundled module. Without declaring the dependency, com.intellij.json.psi.* classes used by PackageJsonDetector are not on the classpath. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
The local() IDE integration caused test failures due to different service registration in PhpStorm vs IntelliJ IDEA test sandbox. Reverting to the standard create() approach with IU 2025.1 which matches CI. 2026.1 support should be a separate effort with proper pluginUntilBuild, Kotlin, and JSON module dependency changes. Also made AlpineSettingsTest more resilient to service availability. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
Fixes product-info.json resolution failures on macOS ARM where the Gradle transform cache contains .app bundle paths that older plugin versions couldn't handle. https://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW
DenisStetsenko
added a commit
to DenisStetsenko/IntellijAlpine
that referenced
this pull request
Jun 2, 2026
Compatibility & build: - Remove the upper compatibility bound; build against 2026.1 (since-build stays 251) - Bump Gradle 8.13 -> 9.0.0, IntelliJ Platform plugin 2.6.0 -> 2.16.0, Kotlin 2.1.21 -> 2.3.20 - Add bundled JSON module dependency (extracted from the platform in 2024.3+) - Verify against the recommended IDE set (Compatible on 2025.1 through 2026.2) Robustness (from inxilpro#118): - Guard package.json / script detectors and auto-enable against dumb mode - Tie the package.json VFS listener to project disposal and run on smart mode - Cache x-target id lookups via CachedValuesManager - Mark the alpinePlugin extension point dynamic; nullable init() override Features (from inxilpro#118): - Quick documentation for Alpine directives - Inspection flagging the deprecated x-spread directive - Rewrite the settings panel using Kotlin UI DSL v2 CI & docs: - Run release and UI-test workflows on Java 21 - Fix stale Gradle task names in CLAUDE.md (verifyPlugin, qodanaScan) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive documentation support for Alpine.js directives and magic properties, introduces an inspection for deprecated
x-spread, refactors the settings UI to use modern IntelliJ DSL, and improves code quality with better type safety and caching.Key Changes
Documentation & Help
AlpineDocumentationProvider: Provides detailed documentation for all Alpine.js directives (x-data, x-show, x-model, etc.) and magic properties ($refs, $store, $el, etc.) with examples and descriptionsCode Inspections
DeprecatedXSpreadInspection: Warns users about deprecatedx-spreaddirective and suggests usingx-bindwith object syntax insteadSettings & Configuration
AlpineSettingsConfigurable: Replaced customAlpineSettingsComponentwith modern IntelliJ UI DSL (panelbuilder)Code Quality Improvements
JsContextdata class: Replaces Apache CommonsMutablePairfor better type safety and readabilityAlpineTargetReferenceContributor: UsesCachedValuesManagerwithPsiModificationTrackerfor efficient ID map cachingAlpinePluginRegistryTesting
AlpineDocumentationProviderTest: Tests documentation generation for directives and shorthandsAlpineCompletionContributorTest: Tests completion suggestions for directives, modifiers, and shorthandsAlpineJavaScriptInjectionTest: Tests JavaScript injection into Alpine attributesAlpineSettingsTest: Tests settings persistence and state managementPackageJsonDetectorTest: Tests plugin detection from package.jsonScriptReferenceDetectorTest: Tests plugin detection from script tagsDeprecatedXSpreadInspectionTest: Tests x-spread deprecation warningsTest Data
Build & CI
recommended()IDE versions instead of hardcoded versionPlugin System
alpinePluginextension point dynamic for better plugin lifecycle managementhttps://claude.ai/code/session_01V2fCJAQ7skygq5KtjRQFjW