You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2007/03/08 15:26:26 UTC
[jira] Commented: (FELIX-249) Add a shutdown button to the shellGUI
[ 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.