Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows terminal support #3959

Open
2 tasks done
michelecos opened this issue Apr 11, 2022 · 4 comments
Open
2 tasks done

Windows terminal support #3959

michelecos opened this issue Apr 11, 2022 · 4 comments
Labels

Comments

@michelecos
Copy link

Description

NetBeans lacks proper support for launching a command line session with cmd or PowerShell and still requires installation of Cygwin.

Use case/motivation

I would like to be able a command line session in the project or current file directory. Maybe with a chance to choose the shell between the obvious choices for windows: cmd, PowerShell, maybe WSL, maybe Git bash.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@michelecos michelecos added kind:feature A feature request needs:triage Requires attention from one of the committers labels Apr 11, 2022
@mbien mbien removed the needs:triage Requires attention from one of the committers label Apr 11, 2022
@ebresie
Copy link
Contributor

ebresie commented Aug 14, 2022

So would this involve

  1. Implementing new "Terminal Implementations" (see org.netbeans.modules.terminal.ioprovider/Terminal for each applicable shell (i.e. Powershell, WSL, etc).
  2. Update the "Tools...Options...Miscellaneous...Terminals" for any applicable attributes for given shell
  3. Maybe allow to add each shell separately, similar to how a new Platform of Java is added?

@ebresie
Copy link
Contributor

ebresie commented Aug 14, 2022

For reference "Terminal.java" has the following comments within:

* A {@link org.netbeans.lib.terminalemulator.Term}-based terminal component for
* inside NetBeans.
* <p>
* The most straightforward way of using it is as follows:
* <pre>
   import org.netbeans.lib.richexecution.Command;
   import org.netbeans.lib.richexecution.Program;
*
   public void actionPerformed(ActionEvent evt) {
       // Ask user what command they want to run
       String cmd = JOptionPane.showInputDialog("Command");
       if (cmd == null || cmd.trim().equals(""))
           return;

       TerminalProvider terminalProvider = TerminalProvider.getDefault();
       Terminal terminal = terminalProvider.createTerminal("command: " + cmd);
       Program program = new Command(cmd);
       terminal.startProgram(program, true);
   }
* </pre>
* @author ivan

So, is this as simple of having the "cmd" to start a given shell defined and executed in some way? Or is there more to it (i.e., IOProvided, etc.)?

@Chris2011
Copy link
Contributor

Months probably years ago I also had a look into this, there are some checks for pty stuff and unfortunately I failed get this working without checks for windows. Atm I wanted to update this plugin: https://github.com/fungl164/JConsole it has, unfortunately a couple of bugs with the cursor, but maybe this could be somehow a good start?

@Chris2011
Copy link
Contributor

We also talked about it here: #6210 maybe implementing one of these solutions could help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants