apply-eclipse-prefs.py
apply-eclipse-prefs.py applies Eclipse IDE preference files to all Juneau project modules, ensuring consistent code formatting and IDE configuration across all developers.
What It Does
The script copies Eclipse JDT (Java Development Tools) preferences from the eclipse-preferences directory to each module's .settings folder. There are two sets of preferences:
-
source-prefs - Applied to main source modules (28 modules)
- Code formatting rules
- Code cleanup rules
- Compiler settings
- Save actions
-
test-prefs - Applied to test modules (2 modules)
- Same as source-prefs but optimized for test code
- Applied to:
juneau-utestand*-ftestmodules
Usage
Apply preferences to all modules
cd /Users/james.bognar/git/juneau
python3 scripts/apply-eclipse-prefs.py
Apply preferences from a different directory
python3 scripts/apply-eclipse-prefs.py --prefs-dir /path/to/preferences
Command-Line Options
--prefs-dir DIR- Use a different preferences directory (default:scripts/eclipse-preferences)
When to Use
Use this script when:
- Setting up a new development environment
- Preferences have been updated and need to be reapplied
- Ensuring all modules have consistent formatting rules
Requirements
- Python 3.6 or higher
- No external Python dependencies (uses only standard library)
Notes
- The script automatically detects which modules are source modules vs test modules
- Preferences are copied to each module's
.settingsdirectory - This ensures consistent code formatting across the entire project
Share feedback or follow-up questions for this page directly through GitHub.