Vulcan is an experimental tool designed to expose the Eclipse JDT (Java Development Tools) OSGi bundle in a programmatic way, accessible via REST API, without the need to run the Eclipse workbench.
Note: This is an experimental project and is not actively maintained.
- Extract Method: Extracts a block of code into a new method.
- Rename Type: Renames a class or interface.
- Rename Method: Renames a method.
- Rename Field: Renames a field.
- Rename Local Variable: Renames a local variable.
- Chained Refactorings: Allows multiple refactorings to be applied in sequence.
- Java 17 or higher
- Maven 3.6.3 or higher
Clone the repository and build the project using Maven:
git clone https://github.com/yourusername/vulcan.git
cd vulcan
./build.sh
You can run the application using the provided run.sh
script. This script allows you to specify a workspace and whether to run in debug mode.
./run.sh [-w|--workspace <workspace_path>] [-d|--debug <y/n>]
-w|--workspace
: Path to the workspace (default:../sample-workspace
)-d|--debug
: Enable debug mode (y
for yes,n
for no, default:n
)
Example:
./run.sh -w /path/to/workspace -d y
You can use the client.sh
script to send refactoring requests to the running application.
./client.sh
This script sends a POST request with a JSON payload specifying the refactorings to be applied.
Example payload:
[
{
"type": "refactorings/core/extract-method",
"methodName": "extractedPrintProduct",
"offset": 123,
"length": 61
},
{
"type": "refactorings/core/rename-type",
"newName": "ProductX"
}
]
Run the tests using the test.sh
script:
./test.sh [-w|--workspace <workspace_path>]
-w|--workspace
: Path to the workspace (default:/tmp/vulcan-test-workspace
)
Example:
./test.sh -w /path/to/test-workspace
We welcome contributions to the Vulcan project! If you have an idea for a new feature or have found a bug, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.