Skip to content

NetBeans terminal provides "ideopen" command to open a local path this fails on windows#8996

Merged
matthiasblaesing merged 1 commit intoapache:masterfrom
matthiasblaesing:ideopen_windows
Nov 23, 2025
Merged

NetBeans terminal provides "ideopen" command to open a local path this fails on windows#8996
matthiasblaesing merged 1 commit intoapache:masterfrom
matthiasblaesing:ideopen_windows

Conversation

@matthiasblaesing
Copy link
Contributor

The NetBeans terminal on Windows runs in cygwin or msys. When passing CWD/target path to the ideopen implementation they are linux-style paths and need to be converted to windows format first before they are handled by the IDE.

…s fails on windows

The NetBeans terminal on Windows runs in cygwin or msys. When passing
CWD/target path to the ideopen implementation they are linux-style
paths and need to be converted to windows format first before they are
handled by the IDE.
@matthiasblaesing matthiasblaesing added the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Nov 9, 2025
@matthiasblaesing matthiasblaesing added this to the NB29 milestone Nov 9, 2025
@matthiasblaesing
Copy link
Contributor Author

The PR failure is invalid, as the IDE module tests run always. I'll give this a week for anybody to comment.

@mbien
Copy link
Member

mbien commented Nov 11, 2025

is this different to netbeans --open <file>?

@matthiasblaesing
Copy link
Contributor Author

ideopen is provided by the NetBeans terminal.

It is a function installed into the running shell, which in turn yields an escape sequence, which is caught by the NetBeans Infrastructure. From my understanding the magic starts in org.netbeans.lib.terminalemulator.InterpProtoANSIX. The dispatch happens in org.netbeans.lib.terminalemulator.InterpProtoANSIX.InterpTypeProtoANSIX.ACT_DONE_COLLECT_BEL. From my understanding this is a statemachine, that reacts to the characters pushed from the application to the terminal and that state machine has a special case for "external commands".

Modules can register external commands and will then be called. The only implementation of this, I'm aware of is ideopen.

I learned this recently, but the idea is nice as there is no need to mess with path or JAVA_HOME and there is even a code path to support remote files, if the rfs modules from CND is present.

@mbien
Copy link
Member

mbien commented Nov 16, 2025

might be my local configuration but the keyword isn't interpreted as command in my case (NB 28):

$ ideopen README.md 
bash: ideopen: command not found
$ bash --version
GNU bash, version 5.3.3(1)-release (x86_64-pc-linux-gnu)

but the changes in this PR look good to me

@matthiasblaesing matthiasblaesing merged commit 5c0d05e into apache:master Nov 23, 2025
30 of 57 checks passed
@matthiasblaesing matthiasblaesing deleted the ideopen_windows branch November 27, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants