World of Refactoring transforms your IntelliJ IDEA refactoring workflow into an engaging experience! Earn XP, level up, and complete quests as you improve your codebase.
- Gain XP for every refactoring action you perform
- Level up through 6 distinct tiers with unique titles and icons:
- 🌱 Apprentice (Levels 1-4)
- ⚔️ Refactorer (Levels 5-9)
- 🛡️ Expert (Levels 10-19)
- 🎖️ Master (Levels 20-29)
- 👑 Grand Master (Levels 30-50)
- 🧙 Legend (Level 51+)
Track your refactoring actions across 4 categories:
- Code Structure - Extract Method, Inline, Move, etc.
- Logic & Complexity - Simplify logic, reduce complexity
- Data & State - Encapsulation, data management
- Coupling - Dependency management
Supports 20+ refactoring types including:
- Extract Method/Variable/Constant/Interface
- Rename, Move, Copy
- Inline Method/Variable
- Change Signature
- Pull Up/Push Down
- And many more!
Complete quests to earn bonus XP:
- First Steps - Perform your first 5 refactoring actions
- Extract Expert - Master the Extract Method refactoring
- Rename Champion - Become proficient at renaming
- Spring Cleaning - Clean up your codebase
View detailed statistics in the dedicated tool window:
- Current level, title, and progression bar
- Total XP and actions performed
- Breakdown by action category
- Complete refactoring history
Get instant feedback when you:
- Gain XP from refactoring actions
- Level up and unlock new titles
- Complete quests
Export your statistics in Markdown: formatted reports with level icons.
- Open IntelliJ IDEA
- Go to
Settings→Plugins→Marketplace - Search for
World of Refactoring - Click
Installand restart your IDE
Once installed, the plugin automatically tracks your refactoring actions:
- Open the Tool Window: Find "World Of Refactoring" in the right sidebar
- Start Refactoring: Perform any refactoring action (Extract Method, Rename, etc.)
- Watch Your Progress: See notifications for XP gains and level ups
- Check Your Stats: View detailed statistics in the Stats tab
- Complete Quests: Track your progress in the Quests tab
- Export Your Data: Use the export button to save your achievements
The plugin automatically detects and rewards refactoring actions through an event-driven architecture:
sequenceDiagram
participant IDE as IntelliJ IDEA
participant Listener as RefactoringEventListenerImpl
participant Detection as RefactoringDetectionService
participant Player as PlayerStateService
participant Quest as QuestService
participant Notif as WorNotifications
participant UI as Tool Window
IDE->>Listener: refactoringDone(event)
activate Listener
Listener->>Detection: Identify refactoring type
activate Detection
Detection->>Detection: Map IDE action to RefactoringActionType
Detection->>Detection: Calculate XP reward
Detection->>Player: Publish RefactoringAction event
deactivate Detection
deactivate Listener
activate Player
Player->>Player: Add XP
Player->>Player: Update action history
Player->>Player: Update category stats
alt Level Up
Player->>Player: Calculate new level
Player->>Notif: Show level up notification
activate Notif
Notif->>IDE: Display balloon notification
deactivate Notif
else XP Gain
Player->>Notif: Show XP gain notification
activate Notif
Notif->>IDE: Display balloon notification
deactivate Notif
end
Player->>Quest: Update quest progress
deactivate Player
activate Quest
Quest->>Quest: Check quest objectives
alt Quest Completed
Quest->>Player: Award bonus XP
Quest->>Notif: Show quest completion
activate Notif
Notif->>IDE: Display balloon notification
deactivate Notif
end
deactivate Quest
Player->>UI: State changed
activate UI
UI->>UI: Refresh statistics display
deactivate UI
- RefactoringEventListenerImpl: Listens to IntelliJ's refactoring events
- RefactoringDetectionService: Maps IDE events to game actions and calculates rewards
- PlayerStateService: Manages player progression, XP, and statistics (persisted)
- QuestService: Tracks and validates quest completion (persisted)
- WorNotifications: Displays balloon notifications for XP gains and achievements
- Tool Window: Real-time UI displaying stats, quests, and player progression
Different refactoring actions provide different XP amounts based on their complexity:
- Extract Method/Interface: 10 XP
- Rename: 5 XP
- Inline Method: 8 XP
- Move/Copy: 7 XP
- Change Signature: 12 XP
- And more!
The plugin uses exact IDE action IDs (priority 1) and keyword fallback for other IDEs (priority 2).
| Refactoring | WebStorm ID | IntelliJ IDEA ID | Keyword fallback |
|---|---|---|---|
| Extract Method | refactoring.javascript.extractMethod |
refactoring.extract.method |
extract + method/function, ExtractFunction, IntroduceFunction |
| Inline Method | refactoring.javascript.inline.method |
refactoring.inline.method |
inline + method/function, InlineFunction |
| Inline Variable | refactoring.javascript.inline |
refactoring.inline.local.variable |
inline + variable, InlineVariable |
| Move Method | refactoring.javascript.es6.moveModule† |
refactoring.move.members |
move + method/function, Move |
| Move Class | refactoring.javascript.es6.moveModule† |
refactoring.move |
move + class |
| Rename | refactoring.inplace.rename, refactoring.rename |
same | rename, RenameElement |
| Change Signature | refactoring.javascript.change.signature |
refactoring.changeSignature |
ChangeSignature, change + signature |
| Remove Parameter | refactoring.safeDelete‡ |
refactoring.safeDelete‡ |
remove + param |
| Extract Variable | refactoring.javascript.introduceVariable |
refactoring.extractVariable |
extract/introduce + variable, IntroduceVariable |
| Extract Constant | refactoring.javascript.introduceConstant |
refactoring.extractConstant |
extract/introduce + constant, IntroduceConstant |
| Remove Dead Code | refactoring.safeDelete‡ |
refactoring.safeDelete‡ |
remove + dead |
| Encapsulate Field | (not available) | refactoring.encapsulateFields |
encapsulate + field/property |
| Safe Delete | refactoring.safeDelete |
refactoring.safeDelete |
SafeDelete, safe_delete |
Built with:
- Kotlin
- IntelliJ Platform SDK 2025.2.5
- Kotest for testing
- Gradle for build automation
This project uses an automated release workflow through GitHub Actions. Follow these steps to create a new release:
Push to main → Build Workflow → Draft Release Created → Manual Publish → Release Workflow → JetBrains Marketplace
Update CHANGELOG.md with your changes under the [Unreleased] section:
## [Unreleased]
### Added
- New features you've added
### Changed
- Changes to existing functionality
### Fixed
- Bug fixesImportant: Always maintain an [Unreleased] section at the top of your changelog.
Edit gradle.properties and increment the version number:
pluginVersion=0.0.2 # Update this (following SemVer)Version Format (SemVer):
0.0.x- Patch: Bug fixes and minor changes0.x.0- Minor: New features, backwards compatiblex.0.0- Major: Breaking changes
git add CHANGELOG.md gradle.properties
git commit -m "chore: prepare release 0.0.2"
git push origin mainThe Build workflow will automatically:
- ✅ Build the plugin
- ✅ Run tests
- ✅ Inspect code with Qodana
- ✅ Verify plugin compatibility
- ✅ Create a Draft Release on GitHub with changelog content
- Go to your GitHub Releases page
- You'll see a Draft Release with version
0.0.2 - Review the release notes (automatically extracted from
[Unreleased]) - Click "Publish release"
Once published, the Release workflow automatically:
- ✅ Updates the CHANGELOG (moves
[Unreleased]to versioned section) - ✅ Publishes the plugin to JetBrains Marketplace
- ✅ Uploads the plugin ZIP as a release asset
- ✅ Creates a Pull Request with the updated CHANGELOG
After the release, a PR will be created to update the CHANGELOG. Review and merge it.
Your CHANGELOG should follow this format:
# WoR - World Of Refactoring
## [Unreleased]
### Added
- Features for the next release
## [0.0.2] - 2026-02-11
### Added
- Global state persistence across projects
- Quest progress saving
### Changed
- Services now run at Application level
## [0.0.1] - 2026-02-09
### Added
- Initial release
[Unreleased]: https://github.com/ythirion/wor/compare/0.0.2...HEAD
[0.0.2]: https://github.com/ythirion/wor/compare/0.0.1...0.0.2
[0.0.1]: https://github.com/ythirion/wor/commits/0.0.1If you encounter the error: GitHub Actions is not permitted to create or approve pull requests
Solution: Enable the setting in your repository:
- Go to
Settings→Actions→General - Scroll to "Workflow permissions"
- Check ✅ "Allow GitHub Actions to create and approve pull requests"
- Save changes
Before releasing, ensure you've completed:
- Updated
CHANGELOG.mdwith all changes under[Unreleased] - Updated
pluginVersioningradle.properties - Committed and pushed changes to
main - Build workflow completed successfully
- Reviewed the draft release notes
- Published the release on GitHub
- Verified plugin appears on JetBrains Marketplace
- Merged the automated changelog PR
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
