ZK IntelliJ IDEA Plugin plugin page on Jetbrains marketplace
See patchPluginXml
in build.gradle for detail.
- Code Completion: Provides context-aware suggestions for ZK components, attributes, and events as you type in ZUL files, speeding up development.
- Go to Declaration: Quickly navigate from a component tag in a ZUL file to its corresponding Java class (e.g., Composer or ViewModel).
- Open in Browser: For Maven projects, this feature intelligently constructs the correct URL to view your ZUL file in a browser, automatically detecting the server port and context path from your
pom.xml
.
zk.xml
Code Completion: Offers code completion for elements and attributes inzk.xml
, helping you configure your ZK application correctly.lang-addon.xml
Completion and Validation: Provides code completion and validates the file to ensure all required elements are present, preventing common configuration errors.
Note: To enable code completion, either use the default filenames (
zk.xml
,lang-addon.xml
) or add the correct namespace to your custom-named XML file.
- For
zk.xml
:xmlns="http://www.zkoss.org/2005/zk/config"
- For
lang-addon.xml
:xmlns="http://www.zkoss.org/2005/zk/lang-addon"
- Annotation Completion: Triggers an auto-popup with a list of ZK MVVM annotations (e.g.,
@init
,@load
,@bind
) whenever you type the@
symbol, making it easier to write databinding expressions.
- Maven Archetypes: Integrates with IntelliJ's project wizard to let you create new ZK projects from official Maven archetypes, providing a standardized project structure.
- Startup Notification: Displays a popup with the latest news from the official ZK framework website when you start IntelliJ IDEA, keeping you informed of updates and announcements.
- Easy Access to Support: Adds a "ZK Feedback" menu under the "Help" menu with quick links to report bugs, request features, or get help from the community.
cd zkidea
./gradlew runIde
This will compile the plugin and launch a new IntelliJ IDEA instance with your plugin pre-installed.
-
Import Project:
- Open IntelliJ IDEA
- File → Open → Select the
zkidea
folder - Import as Gradle project
-
Configure Run Configuration:
- Go to Run → Edit Configurations
- Click "+" and add new "Gradle" configuration
- Name: "Run Plugin"
- Tasks:
runIde
- Arguments: (leave empty)
- Gradle project: select your zkidea project
- Working directory: should point to your zkidea folder
-
Run/Debug:
- Select your "Run Plugin" configuration from the run dropdown
- Click Run (▶) or Debug (🐛) button
- IntelliJ will launch a new instance with the plugin loaded
- Hot Reloading: Make changes and restart the test IDE to see updates
- Debugging: Set breakpoints in your plugin code for debugging
- Live Testing: Test plugin features immediately without building JARs
- Rapid Iteration: Quick development cycle for faster development
- You can install and update ZK IntelliJ Plugin at IntelliJ Setting > Plugins Marketplace.
- IntelliJ plugins home
TBD
Update version numbers in two locations:
build.gradle
- Update theversion
propertysrc/main/resources/META-INF/plugin.xml
- Add new version entry to<change-notes>
# Build the plugin
./gradlew build
# Run tests
./gradlew test
# Verify plugin structure and compatibility
./gradlew verifyPlugin
# Test locally in IDE
./gradlew runIde
# Create plugin distribution ZIP
./gradlew buildPlugin
-
Create Git Tag
git tag v0.1.X git push origin v0.1.X
-
Update Development Version
-
Verify Publication
- Check plugin appears on JetBrains Marketplace
- Test installation from marketplace
-
syntax highlighting in zul doesn't work after restarting IntelliJ IDEA If you ever uninstalled the plugin before, you might encounter this issue. This is caused by an IntelliJ bug. The current workaround is to manually add zul file type in IntelliJ IDEA settings:
- Go to
Settings
>Editor
>File Types
- Under
Recognized File Types
>XML
- Add
*.zul
to the list ofFile name patterns
- Go to
-
For Mac user, if you run this plugin with IntelliJ 14 that crashes on startup, you may refer to this solution