Open file from console #8983
-
|
Hello! I have urls in web project like: I want this link to open Netbeans IDE with the specified file on the desired line when clicking on it. I found a solution, make script: This works, but only when the editor is closed. If it's open, nothing happens. Perhaps I need to specify some option to open in an existing editor window? Or is there something else going on? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Interesting and I only tested on shell and it works nicely. Did you try to pinpoint the problem? From shell invoked with an url constructed as shown the target file is correctly opened. If it is not yet open, it is loaded, if file is opened in a background tab, it is brought to front. Even jumping to the right line (based on the Maybe the browser modifies the URL when invoking the script? |
Beta Was this translation helpful? Give feedback.

Interesting. The state sequence matches a startup with an existing lock (another NetBeans process running). That lock file encodes the TCP port that instance listens on. That matches the last line:
This is the corresponding code following that:
netbeans/platform/o.n.bootstrap/src/org/netbeans/CLIHandler.java
Lines 734 to 745 in 9950295