How funcfusion/mc-dp-icons works
Datapack Icons is a VS Code icon-theme extension. Its main workflow detects or watches a workspace, collects Java datapack and Bedrock-specific dynamic mappings, combines them with the static Minecraft icon catalog, and writes an active theme. Settings and commands configure the experience; documented features also include special function, namespace, overlay, nested-file, Christmas, and folder-arrow icons. Some subsystem links are documented rather than visible in sampled implementation, so those edges are dashed.
Main entry points: index.ts Dynamic theme update · extension.ts Extension entry · configManager.ts Configuration · utils.ts File and tag matching
Components 18
Extension activation
- Extension entry
src/extension.ts - Workspace watcher
src/watcher.ts - Commands
src/commands/index.ts
Static icon theme
- Icon definitions
src/data/icons - Base theme generation
src/generate/baseTheme.ts
Dynamic icons
- Workspace detection
src/dynamicIcons/workspace.ts - Java pack icons
src/dynamicIcons/java - Bedrock pack icons
src/dynamicIcons/bedrock - File and tag matching
src/dynamicIcons/utils.ts - Dynamic theme update
src/dynamicIcons/index.ts
Theme output
- Theme builder
src/theme/themeBuilder.ts - Active theme file
Settings and commands
- Configuration
src/configuration/configManager.ts - Custom icon assignment
src/commands/setIcon.ts - Workspace warnings
src/prompts/tooManyFilesPrompt.ts - Diagnostic logging
src/common/logger.ts
Other components
- VS Code user
- VS Code
Connections 25
- VS Code user → VS Code: uses
README.md - VS Code → Extension entry: activates
- Extension entry → Dynamic theme update: starts updates
src/extension.ts - Extension entry → Workspace watcher: creates watcher
src/extension.ts - Extension entry → Commands: registers commands
src/extension.ts - Workspace watcher → Dynamic theme update: requests refresh
- Dynamic theme update → Workspace detection: checks workspace
src/dynamicIcons/index.ts - Dynamic theme update → Java pack icons: collects mappings
src/dynamicIcons/index.ts - Dynamic theme update → Bedrock pack icons: collects mappings
src/dynamicIcons/index.ts - Java pack icons → File and tag matching: uses helpers
src/dynamicIcons/java/index.ts - Bedrock pack icons → File and tag matching: uses helpers
src/dynamicIcons/bedrock/index.ts - Java pack icons → Dynamic theme update: provides mappings
src/dynamicIcons/index.ts - Bedrock pack icons → Dynamic theme update: provides mappings
src/dynamicIcons/index.ts - Dynamic theme update → Theme builder: adds mappings
src/dynamicIcons/index.ts - Icon definitions → Base theme generation: supplies definitions
src/generate/baseTheme.ts - Base theme generation → Theme builder: provides base schema
- Theme builder → Active theme file: writes theme
src/theme/themeBuilder.ts - Configuration → Workspace detection: controls detection
src/dynamicIcons/workspace.ts - Configuration → File and tag matching: controls icon options
src/dynamicIcons/utils.ts - Configuration → Theme builder: controls theme settings
src/theme/themeBuilder.ts - VS Code user → Commands: assigns custom icons
README.md - Commands → Custom icon assignment: registers handlers
src/commands/index.ts - Custom icon assignment → Configuration: updates settings
src/commands/setIcon.ts - File and tag matching → Workspace warnings: warns on large packs
src/dynamicIcons/utils.ts - Dynamic theme update → Diagnostic logging: logs updates
src/dynamicIcons/index.ts