GithubHelp home page GithubHelp logo

dragonconsole's People

Contributors

bbuck avatar computercolin avatar helio-frota avatar marcelcamporelli avatar motoski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dragonconsole's Issues

Aesh integration

Hi,
I'm trying to understand DragonConsole to do a non-intrusive integration with aesh shell.
Aesh has a lot of built-in commands would be really awesome if DragonConsole run aesh commands. ( 100% java code )
So if do you have any tips to help this integration feel free to contribute.

So DragonConsole will be able to run POSIX based commands like: pwd, cat, ls, clear, exit, mv, rm etc..

what do you think ?

Why separate Thread in DragonConsole.setScrollBarMax()?

Thanks Brandon for this great console, I like it!
When I use it in connection with the Substance look and feel, I get an exception telling me that no components should be created outside Event Dispatching thread. Swing doesn't like your Thread it seems.
Wouldn't it be better to use SwingUtilities.invokeLater? I don't understand what you wanted to fix with your waiting some millisecs there, but I think invokeLater nicely does...: like so:

protected void setScrollBarMax() {
        final JScrollBar vBar = consoleScrollPane.getVerticalScrollBar();
        final DragonConsole console = this;
        if (isScrollBarAtMax) {
            SwingUtilities.invokeLater(
            new Runnable() {
                public void run() {
                    try {
                        if (vBar.isVisible())
                            vBar.setValue(vBar.getMaximum() - vBar.getModel().getExtent());

                        console.repaint();
                    } catch (Exception exc) {
                        JOptionPane.showMessageDialog(null,
                                "Error #0005\n"
                              + "Failed to set the JScrollBar to Max Value!\n"
                              + exc.getMessage(),
                              "Error Caught", JOptionPane.ERROR_MESSAGE);
                    }
                }
            });
        }
    }

Original code:

 /** 
     * This method creates a thread that will set the
     * <code>consoleScrollPane</code>s Vertical <code>JScrollBar</code> to
     * it's maximum value. The Thread is delayed by a tenth of a second before
     * the value is changed to give time for the computer to fully update the
     * UI and change the JScrollBars value.
     */
    protected void setScrollBarMax() {
        final JScrollBar vBar = consoleScrollPane.getVerticalScrollBar();
        final DragonConsole console = this;
        if (isScrollBarAtMax) {
            new Thread() {
                public void run() {
                    try {
                        sleep(80); // Time out for a tenth of a second
                        if (vBar.isVisible())
                            vBar.setValue(vBar.getMaximum() - vBar.getModel().getExtent());

                        console.repaint();
                    } catch (Exception exc) {
                        JOptionPane.showMessageDialog(null,
                                "Error #0005\n"
                              + "Failed to set the JScrollBar to Max Value!\n"
                              + exc.getMessage(),
                              "Error Caught", JOptionPane.ERROR_MESSAGE);
                    }
                }
            }.start();
        }
    }


Input History

Would it be possible to add history for the input, at least for the current session such that the up arrow shows past commands?

Thanks,
Trevor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.