A Mendix Studio Pro Extension that allows you to edit Java Action source files directly within Studio Pro, without needing to switch to an external IDE.
- Edit Java Source in Studio Pro - Right-click any Java Action in the App Explorer to open its source code in a dedicated editor tab
- Monaco Editor - Full-featured code editor (the same editor that powers VS Code) with:
- Java syntax highlighting
- Code folding
- Minimap navigation
- Bracket pair colorization
- Find & Replace (Ctrl+F / Ctrl+H)
- Go to line (Ctrl+G)
- Multiple cursors (Ctrl+click)
- Auto-indentation
- Save Changes - Save your edits with the Save button or Ctrl+S / Cmd+S
- Dirty Indicator - Visual indicator shows when you have unsaved changes
- Status Bar - Shows current cursor position and line count
- Build the extension (see Building below) or download a release
- Copy the contents of the
distdirectory to your Mendix app's extensions folder:<your-app>/extensions/JavaEditor/ - Open your app in Mendix Studio Pro
- Synchronize your app directory (press F4)
Before you can edit a Java Action's source code, the Java file must exist on disk:
- Create your Java Action in Studio Pro
- Deploy to Eclipse (F6) - this generates the Java source files in the
javasourcefolder
Method 1: Context Menu (Recommended)
- In the App Explorer, find the Java Action you want to edit
- Right-click on the Java Action
- Select "Edit Java Source"
- The Java file opens in a new editor tab
Method 2: Extensions Menu
- Open a Java Action document in Studio Pro
- Go to Extensions → Java Editor → Edit Current Java Action
- Click the Save button in the editor toolbar, or
- Press Ctrl+S (Windows) / Cmd+S (Mac)
The editor shows a dot (•) next to the filename when you have unsaved changes.
- Node.js 18 or later
- npm
# Install dependencies
npm install
# Build the extension
npm run build
# Build with watch mode (for development)
npm run build:devThe built extension will be in the dist/JavaEditor directory.
JavaEditor/
├── src/
│ ├── main/
│ │ └── index.ts # Main entry point - registers menus and handles file operations
│ ├── ui/
│ │ └── index.tsx # UI entry point - Monaco Editor React component
│ └── manifest.json # Extension manifest
├── dist/ # Built extension output
├── build-extension.mjs # Build script
└── package.json
- The extension registers a context menu item on Java Action documents (
JavaActions$JavaAction) - When triggered, it determines the Java file path based on the action name and module:
javasource/<ModuleName>/actions/<ActionName>.java - Opens a new tab with the Monaco Editor
- Uses the Mendix Extensions API Files API to read and write the Java source file
MIT License - see LICENSE for details.
Contributions are welcome! Please feel free to submit issues and pull requests.