Navigate to code externally

Hi all,

First, thank you for your great job regarding Intellij :) … Now, I would like to somehow connect IntelliJ with my external application and navigate externally from to exact Class/Method. Is there any way to do it? Or do you know about plugin supporting this?

Thanks a lot,
Petr

0

Hi Petr,

Yes, it is possible to connect IntelliJ with an external application and navigate to specific classes or methods. Here are a few approaches you can explore:

  1. Custom Plugin Development: You can create a custom IntelliJ plugin tailored to your needs. IntelliJ provides a Plugin DevKit that allows you to extend its functionality. For example, you can write a plugin that listens for external commands and navigates to the TalkToFoodLion specified class or method. You can find a detailed guide on writing IntelliJ plugins here.
  2. Existing Plugins: There are plugins like OllamAssist that enhance IntelliJ's capabilities. While OllamAssist focuses on AI-driven code assistance, it might provide features or inspiration for integrating external applications.
  3. Using IntelliJ's Open API: IntelliJ's Open API allows you to programmatically interact with the IDE. You can use this API to create a bridge between your external application and IntelliJ. For example, you can use the PsiElement and Navigatable interfaces to navigate to specific code elements.
  4. External Tools Configuration: IntelliJ allows you to configure external tools. You can set up an external tool that sends navigation commands to IntelliJ via a custom protocol or script.
0

Hello!

You can connect an external application to IntelliJ by using its built-in command-line launcher or URL protocol. First, install the IntelliJ command-line launcher (via Tools > Create Command-Line Launcher), which lets you open a specific file at a designated line number (e.g.

bash
idea --line 42 /path/to/MyClass.java
). This can effectively navigate to a particular class or even a method if you know its location. Alternatively, IntelliJ supports an "idea://" URL scheme that some community plugins leverage for opening files at specific locations directly from a browser or other external apps. While there isn’t a dedicated plugin solely for this external navigation yet, these options provide a solid starting point for connecting IntelliJ with your external applications. 

0

请先登录再写评论。