A lightweight multi-tab code editor built with Java Swing.
The application provides code-editing tools, language templates, syntax highlighting, a project explorer, themes, file management, and Windows packaging through jpackage and Inno Setup.
This is an independent educational project and is not affiliated with the official Notepad++ project.
- Multi-tab text and code editing
- Create, open, save, and save-as operations
- Unsaved-change indicator in tabs and the window title
- Confirmation before closing modified files
- Middle-click tab closing
- Drag-and-drop file opening
- Duplicate-file tab prevention from the project explorer
- UTF-8 file support
- Automatic indentation
- Current-line highlighting
- Line numbers
- Horizontal and vertical scrolling
- Configurable editor font and font size
- Zoom in, zoom out, and reset zoom
- Cut, copy, paste, select all, undo, and redo
- Comment or uncomment selected lines
- Context menu for common editing actions
- Reveal active file in explorer from editor context menu
- Find next
- Replace selected match
- Replace all occurrences
- Keyboard shortcut support
Built-in templates are available for:
- Java
- HTML
- C
- C++
- Python
- JavaScript
Template files are stored in the res directory.
When a language template is selected, the correct extension is added automatically during save:
| Language | Default extension |
|---|---|
| Java | .java |
| HTML | .html |
| C | .c |
| C++ | .cpp |
| Python | .py |
| JavaScript | .js |
Examples:
Java template + Main -> Main.java
Python template + script -> script.py
JavaScript template + app -> app.js
When the user enters an extension explicitly, the editor preserves it:
Main.java -> Main.java
Main.txt -> Main.txt
app.js -> app.js
Java-oriented syntax highlighting includes:
- Reserved and contextual keywords
- Primitive types
- Literals
- Common Java classes
- Strings
- Character literals
- Numbers
- Comments
- Annotations
Highlighting is debounced to reduce typing lag and is limited for very large documents.
- Left-side file and project explorer with advanced features
- Open a project folder
- Refresh the folder tree
- Search / filter bar with debounced filtering to quickly find files
- Collapse All / Expand All header buttons for quick tree navigation
- File type icons for 65+ extensions (java, python, html, json, zip, images, etc.)
- Rich tooltips showing file size and last modified date on hover
- Right-click context menu with file operations:
- New File and New Folder (inside directories)
- Rename (F2)
- Delete (Del) with confirmation
- Copy Full Path / Copy Relative Path to clipboard
- Open in Windows Explorer
- Open in Terminal (for directories)
- Show Properties dialog
- Refresh
- Keyboard shortcuts — F2 to rename, Delete to delete selected nodes
- Single-click toggle — single click expands/collapses directories; double click opens files
- Multi-selection support — Ctrl+Click and Shift+Click for selecting multiple files
- Auto-reveal active file — the currently open file is highlighted in the tree when switching tabs
- Smart ignore list — 25+ build/dependency directories excluded (.git, node_modules, target, build, bin, obj, .idea, .vscode, pycache, etc.)
- Directories displayed before files
- Prevent duplicate tabs for the same file
- Toolbar button to hide or show the explorer
- Remember the explorer width when toggled
- Toggle Project Explorer in the View menu
- Clone-based filtering that preserves original tree data
- "(No matches)" placeholder when filter yields no results
Available themes:
- Dracula
- One Dark
- Nord
- Light
- High Contrast
Theme colors are applied to:
- Editor
- Tabs
- Toolbar
- Menus
- Status bar
- Console area
- Project explorer (including filter bar, context menus, and icons)
- Line numbers
- Current-line highlight
The status bar displays:
- Current filename
- Unsaved-change state
- Line number
- Column number
- File encoding
- Active theme
- Auto-save notifications
- Maintains a recent-files list
- Reopens recent files from the File menu
- Removes missing files from the list
- Provides a Clear Recent Files action
- Saves the list in
recent_files.dat
- Runs every 30 seconds
- Saves modified files that already have a valid path
- Displays an auto-save confirmation in the status bar
- Compile Java code with error output
- Run Java, Python, and JavaScript files
- Interactive console with input support
- Stop running processes
- Open CMD in the current file's directory
| Action | Shortcut |
|---|---|
| New file | Ctrl + N |
| New window | Ctrl + Shift + N |
| Open file | Ctrl + O |
| Open folder | Ctrl + Shift + O |
| Save | Ctrl + S |
| Save as | Ctrl + Shift + S |
| Find / Replace | Ctrl + F |
| Undo | Ctrl + Z |
| Redo | Ctrl + Y |
| Cut | Ctrl + X |
| Copy | Ctrl + C |
| Paste | Ctrl + V |
| Select all | Ctrl + A |
| Comment / Uncomment | Ctrl + / |
| Zoom in | Ctrl + + |
| Zoom out | Ctrl + - |
| Reset zoom | Ctrl + 0 |
| Compile | Ctrl + Shift + B |
| Run | F5 |
| Stop | Shift + F5 |
| Rename (Explorer) | F2 |
| Delete (Explorer) | Delete |
| Reveal in Explorer | Ctrl + Shift + R |
| Toggle Explorer | Toolbar button or View menu |
The distributed Windows application is intended to operate as a self-contained editor.
The installed user does not need to install Java separately. The application image generated by jpackage includes a private Java runtime used internally by the editor launcher.
The final installer contains:
Pavans-NotepadPlus.exe- Application JAR and configuration
- Private Java runtime
- Language templates
- Editor resources
- Application icon
- Uninstaller
- Start Menu shortcut
- Optional desktop shortcut
The packaged editor does not bundle or depend on:
javac- System
java - Python
py- Node.js
node
Therefore, the distributed editor focuses on editing files rather than executing source code.
Compile and Run controls should be removed or disabled in the editor-only release.
The project can remain in the current directory layout:
Notepad/
├── icons/
│ └── pavans-notepadplus.ico
├── src/
│ └── nn/
│ ├── Notepad.java
│ ├── build.bat
│ ├── installer.iss
│ └── res/
│ ├── JavaFormat.txt
│ ├── HTMLFormat.txt
│ ├── CFormat.txt
│ ├── CPPFormat.txt
│ ├── PythonFormat.txt
│ └── JavaScriptFormat.txt
└── bin/
└── nn/
└── Notepad.class
Generated files:
src/
└── nn/
└── build/
├── classes/
├── input/
└── package/
└── Pavans-NotepadPlus/
├── Pavans-NotepadPlus.exe
├── app/
├── runtime/
└── res/
These tools are required only on the developer computer:
- Windows 10 or later
- JDK containing:
javacjarjpackage
- Inno Setup
- A valid Windows
.icofile
The end user does not need the JDK or Java installed.
Open Command Prompt in the directory containing build.bat:
cd /d "D:\programining\coding with pavan\Qspiders\java\Notpad\src\nn"Run:
build.batExpected application output:
build\package\Pavans-NotepadPlus\Pavans-NotepadPlus.exe
Test the generated EXE before creating the installer.
Open installer.iss with Inno Setup.
Select:
Build -> Compile
Expected installer output:
installer-output\Pavans-NotepadPlus-Setup-1.0.0.exe
Only the generated setup EXE needs to be distributed.
During installation, Inno Setup extracts the application launcher, private runtime, resources, and other required files into the installation directory.
The editor uses relative resource paths, including:
./res/
./recent_files.dat
./icons/pavans-notepadplus.ico
Windows shortcuts must use the application installation directory as their working directory:
WorkingDir={app}This allows templates and recent-file data to be found correctly after installation.
The current implementation may create:
recent_files.dat
inside the application working directory.
For a future improvement, user-generated settings and recent-file data can be moved to:
%APPDATA%\Pavans-NotepadPlus
or:
%LOCALAPPDATA%\Pavans-NotepadPlus
This avoids writing user data into the installation directory.
- Word wrap is not supported by the current
JTextPaneimplementation. - Syntax highlighting is primarily designed for Java.
- Very large files may skip syntax highlighting for performance.
- The editor-only Windows release does not compile or execute source files.
- Fonts such as JetBrains Mono or Fira Code fall back to an available system font when not installed.
- The project explorer should avoid following symbolic links recursively.
- The application name
Notepad++may be confused with the existing Notepad++ product; usingPavans-NotepadPlusas the package name helps distinguish this project.
- Language-specific syntax highlighting for HTML, C, C++, Python, JavaScript
- Configurable keyboard shortcuts
- Search across files
- Session restoration
- Settings persistence
- File encoding selection
- Word-wrap support
- Minimap
- Split editor views
- Markdown preview
- HTML preview
- Plugin system
- Update checker
- Store user data under
%APPDATA% - Code signing for the Windows installer and executable
- File watcher for auto-refresh on external changes
- Git integration (status indicators in explorer)
Pavan Wakade
For an open-source educational project, the MIT License is a common option.