An Eclipse editor plugin for Velocity Template Language (VTL).
- VTL directives (
#if,#foreach,#set,#macro, etc.) - VTL variables (
$variable,${variable},$!variable) - VTL comments (
##single-line,#* *#multi-line) - HTML tags, attributes, and attribute values
- Show VTL directive proposals with
# - Show VTL variable templates with
$ - Show HTML tag proposals with
< - Manual trigger with
Ctrl+Space - Customize variable proposal names for
$in Preferences (one variable name per line)
- Select the entire VTL variable
- Select HTML tag names
- Select regular words
- Colors are automatically adjusted based on the Eclipse theme
.vtl- Velocity Template.vm- Velocity Macro
- Eclipse 2025-12 or later
- Java 21 or later
- Maven build must run with Java 21 or later
Install from Help > Install New Software... with this update site URL:
https://nebosuke.github.io/eclipse-velocity-editor/
JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn -DskipTests clean verifyThe generated Update Site is:
io.github.nebosuke.velocityeditor.updatesite/target/repository
You can add this directory in Help > Install New Software... > Add... > Local....
- In Eclipse, choose
File > Import > Existing Projects into Workspace - Import this project
- Right-click the project and choose
Run As > Eclipse Application
Every push to main runs .github/workflows/publish.yml, which:
- Increments the patch version across all project files (
scripts/bump_version.py) and pushes that bump back tomain. - Builds the update site with Maven/Tycho.
- Replaces the contents of the
gh-pagesbranch with the newly built repository and pushes it.
No manual steps are needed for a normal release. Use the manual steps below only if you need to publish outside of CI (e.g. to test a build locally or recover from a broken workflow run).
- Increment version numbers before publishing.
Update all of these files to the next version (example: 1.0.1 -> 1.0.2):
io.github.nebosuke.velocityeditor/META-INF/MANIFEST.MFBundle-Version: 1.0.2.qualifierio.github.nebosuke.velocityeditor.feature/feature.xmlversion="1.0.2.qualifier"io.github.nebosuke.velocityeditor.updatesite/category.xmlversion="1.0.2.qualifier"and feature URL...feature_1.0.2.qualifier.jarpom.xml<version>1.0.2-SNAPSHOT</version>io.github.nebosuke.velocityeditor/pom.xml<version>1.0.2-SNAPSHOT</version>(in<parent>)io.github.nebosuke.velocityeditor.feature/pom.xml<version>1.0.2-SNAPSHOT</version>(in<parent>)io.github.nebosuke.velocityeditor.updatesite/pom.xml<version>1.0.2-SNAPSHOT</version>(in<parent>)
- Build the update site with Java 17+:
JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn -DskipTests clean verify- Copy generated repository files to a temporary directory:
rm -rf /tmp/eclipse-velocity-editor-site
mkdir -p /tmp/eclipse-velocity-editor-site
cp -R io.github.nebosuke.velocityeditor.updatesite/target/repository/. /tmp/eclipse-velocity-editor-site/- Switch to
gh-pagesbranch and replace contents:
git checkout gh-pages
find . -mindepth 1 -maxdepth 1 ! -name ".git" -exec rm -rf {} +
cp -R /tmp/eclipse-velocity-editor-site/. .
touch .nojekyll- Commit and push:
git add -A
git commit -m "Publish update site"
git push origin gh-pages- Return to development branch:
git checkout main- Open a
.vtlor.vmfile - The file opens automatically in Velocity Editor
- Content Assist starts automatically when typing
#,$, or<, or manually withCtrl+Space
In Preferences > Velocity Editor, edit Content Assist variables for '$'
to configure the variable names suggested when typing $ (one name per line).
io.github.nebosuke.velocityeditor/
├── META-INF/
│ └── MANIFEST.MF # OSGi bundle configuration
├── plugin.xml # Eclipse extension points
├── build.properties
├── pom.xml # Maven/Tycho build configuration
└── src/io/github/nebosuke/velocityeditor/
├── Activator.java
├── editors/
│ ├── VelocityEditor.java
│ ├── VelocityConfiguration.java
│ ├── VelocityDocumentProvider.java
│ └── VelocityDoubleClickStrategy.java
├── scanners/
│ ├── VelocityPartitionScanner.java
│ ├── VelocityCodeScanner.java
│ ├── VelocityCommentScanner.java
│ ├── VelocityVariableRule.java
│ ├── HTMLTagScanner.java
│ └── HTMLTagRule.java
├── assist/
│ └── VelocityContentAssistProcessor.java
└── preferences/
├── ColorManager.java
└── VelocityPreferencePage.java
This project is licensed under the MIT License.
Yatsuke Works