felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-249) Add a shutdown button to the shellGUI
Date Thu, 08 Mar 2007 14:26:26 GMT

    [ https://issues.apache.org/jira/browse/FELIX-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479315
] 

Richard S. Hall commented on FELIX-249:
---------------------------------------

If I modify your second proposal to look like this:

public class ShutdownPlugin implements Plugin
{
    private BundleContext m_context = null;
    private boolean m_shuttingdown = false;

    // Plugin interface methods.

    public String getName()
    {
        return "Shutdown";    
    }
    
    public Component getGUI()
    {
        shutdown();
        return new JPanel();
    }
    
    // Implementation.
    
    public ShutdownPlugin(BundleContext context)
    {
        m_context = context;
    }

    private void shutdown()
    {
        if (!m_shuttingdown)
        {
            Bundle systembundle = m_context.getBundle(0);
            m_shuttingdown = true;
            try
            {
                systembundle.stop();
            }
            catch (Exception ex)
            {
                System.out.println(ex.toString());
                ex.printStackTrace(System.out);
            }
        }
    }
}

Then it works fine for me. However, I am not sure this is a good approach, since it would
surely surprise people to be automatically kicked out by touching the plugin. I will look
at your other approach.

> Add a shutdown button to the shellGUI
> -------------------------------------
>
>                 Key: FELIX-249
>                 URL: https://issues.apache.org/jira/browse/FELIX-249
>             Project: Felix
>          Issue Type: Improvement
>            Reporter: Tim Moloney
>            Priority: Trivial
>         Attachments: shell.gui.plugin-shutdown-choice-1.patch, shell.gui.plugin-shutdown-choice-2.patch
>
>
> Add a shutdown button to the shellGUI to make shutting down a bit more convenient.  Presently,
you have to click on the Shell panel selector, then click on the shell command entry box,
then type shutdown.  Adding a button would reduce this to just a mouse click or two.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message