RimWorld XML Toolkit

IntelliJ plugin that reconstructs a semantic model from distributed XML configuration and enables navigation across implicit dependencies.


Overview

RimWorld XML Toolkit is a developer tool designed to solve a common but underestimated problem: working with large, distributed XML configuration systems.

In many systems — including game engines, enterprise platforms, and legacy integrations — XML is not just data. It encodes:

  • dependencies
  • inheritance
  • runtime behavior

This plugin transforms XML from static text into a navigable, structured model inside the IDE.


Context

Industry: Game Modding / XML-based systems
Type: Developer Tooling (IntelliJ Plugin)
Architecture: Semantic indexing + IDE integration

The project was built to address real complexity in RimWorld mod development, where:

  • configuration is spread across dozens or hundreds of files
  • relationships are expressed as string references
  • debugging requires manual navigation

Architecture

The system is built as a layered semantic pipeline:

XML → Parsed Defs → Indexed Model → Reference Resolution → Navigation

Core Components

Parsing Layer

  • Extracts domain entities (Defs) from XML
  • Handles multiple definition formats

Model Layer

  • Represents Def as structured object
  • Includes type, identity, inheritance metadata

Index Layer

  • In-memory lookup (DefType::defName)
  • Optimized for fast resolution

Reference Resolution

  • Detects implicit references via XML paths
  • Maps values to actual entities

IDE Integration

  • PSI-based navigation
  • incremental indexing
  • validation

Functional Scope

XML Indexing

  • Parses all XML files in the project
  • Extracts domain entities
  • Builds semantic index

Navigation

  • Resolves references across files
  • Enables “Go to Definition”
  • Supports implicit dependencies

Validation

  • Detects missing identifiers
  • Highlights structural issues

My Role

  • Designed overall plugin architecture
  • Implemented semantic indexing model
  • Built reference resolution system
  • Integrated plugin with IntelliJ PSI
  • Implemented incremental update pipeline
  • Designed extensible configuration model

Engineering Challenges

1. Implicit Dependencies

XML does not explicitly define relationships — they are encoded as strings.

Solution:
Introduce config-driven mapping between XML paths and target entity types.


2. Performance & Scalability

Large projects may contain hundreds of XML files.

Solution:

  • in-memory index (ConcurrentHashMap)
  • incremental updates via PSI events

3. IDE Runtime Constraints

Plugin must not block UI or degrade performance.

Solution:

  • background indexing
  • proper threading (ReadAction / SmartMode)
  • minimal PSI traversal

4. Domain Modeling

XML is a tree, but the system behaves as a graph.

Solution:
Reconstruct semantic relationships and build navigation on top of them.


Technologies

Java, IntelliJ Platform SDK, PSI, XML, JSON


Roadmap

The system evolves from a simple index into a full semantic model:

  • Phase 1 — indexing and navigation
  • Phase 2 — inheritance (ParentName, abstract defs)
  • Phase 3 — configurable mapping (IDE settings)
  • Phase 4 — version-aware behavior
  • Phase 5 — cross-mod + vanilla data
  • Phase 6 — patch system
  • Phase 7 — effective definitions
  • Phase 8 — semantic enrichment
  • Phase 9 — graph visualization

Why This Case Matters

This project demonstrates:

  • system-level thinking beyond CRUD/backend
  • ability to model implicit domain relationships
  • deep integration with developer tooling
  • building extensible platforms, not just features

Positioning

This is not just an XML viewer.

It is a domain-aware semantic indexing engine inside IntelliJ.

The same approach can be applied to:

  • enterprise configuration systems
  • security policies (XML/JSON-based)
  • integration schemas
  • legacy platforms

Possible Extensions

  • dependency graph visualization
  • AI-based config analysis
  • impact analysis (change propagation)
  • integration with external systems

Status

Active development (Phase 1 complete)