IDEA Open Protocol Handler is an IntelliJ IDEA plugin that allows you to navigate to a specific line in a file within your opened project, directly from the command line interface. This plugin enhances the developer experience by providing a quick and efficient way to navigate through your codebase.
-
Clone this repository: git clone https://github.com/devthat/ideaopenprotocolhandler.git
-
Open the project in IntelliJ IDEA
-
Configure the artifact for the project:
- Open
File -> Project Structure -> Artifacts
. - Click the
+
button, chooseJAR -> From modules with dependencies
. - Select your main class and specify the JAR file name. Click
OK
. - Expand the artifact tree and find the
META-INF
directory. - Right-click on
META-INF
, selectAdd Copy of...
, navigate to yourplugin.xml
, select it, and clickOK
. - Ensure your
plugin.xml
is now underMETA-INF
in the artifact configuration.
- Open
-
Build the project using IntelliJ IDEA's built-in build tools: File -> Build Project
-
Build the plugin .jar artifact: Build -> Build Artifacts -> Build
-
You should now have a .jar file in the out/artifacts/ideaopenprotocolhandler_jar/ directory.
- Open IntelliJ IDEA and navigate to Preferences -> Plugins.
- Click on the Install plugin from disk... button and select the built .jar file.
- Restart IntelliJ IDEA.
Once the plugin is installed, you can use the following command in your terminal to open a specific file at a specified line:
open "idea://open?file=YourFileName.java&line=10"
Replace YourFileName.java with the name of the file you want to open and 10 with the line number you want to navigate to.
We welcome contributions to the IDEA Open Protocol Handler plugin. If you want to contribute:
- Fork this repository.
- Create your feature branch: git checkout -b feature/your-feature.
- Commit your changes: git commit -am 'Add some feature'.
- Push to the branch: git push origin feature/your-feature.
- Submit a pull request.
IDEA Open Protocol Handler is open source software licensed under the MIT license.
This plugin is a community project and is not officially associated with JetBrains or IntelliJ IDEA. Use it at your own risk.