Mercurial > hg > release > icedtea-web-1.4
changeset 767:acbada276d23
Enabled java console for plugin
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Wed, 06 Nov 2013 14:46:43 +0100 |
parents | 511a213f0206 |
children | 7d2759e4bc98 |
files | ChangeLog NEWS plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java plugin/icedteanp/java/sun/applet/PluginMain.java plugin/icedteanp/java/sun/applet/PluginStreamHandler.java |
diffstat | 5 files changed, 25 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Oct 30 10:36:43 2013 +0100 +++ b/ChangeLog Wed Nov 06 14:46:43 2013 +0100 @@ -1,3 +1,14 @@ +2013-11-06 Jiri Vanek <jvanek@redhat.com> + + Enabled java console for plugin + * NEWS: mentioned + * plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java: + (streamhandler) made private, added setter. + * plugin/icedteanp/java/sun/applet/PluginMain.java: added condition for + showing the console + * plugin/icedteanp/java/sun/applet/PluginStreamHandler.java: (showConsole) + made public + 2013-10-30 Jiri Vanek <jvanek@redhat.com> * netx/net/sourceforge/jnlp/JARDesc.java: made immutable
--- a/NEWS Wed Oct 30 10:36:43 2013 +0100 +++ b/NEWS Wed Nov 06 14:46:43 2013 +0100 @@ -12,6 +12,7 @@ * Dialogs center on screen before becoming visible * Plugin - RH976833: Multiple applets on one page cause deadlock + - Enabled javaconsole New in release 1.4.1 (2013-09-19): * Improved and cleaned Temporary internet files panel
--- a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java Wed Oct 30 10:36:43 2013 +0100 +++ b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java Wed Nov 06 14:46:43 2013 +0100 @@ -234,7 +234,7 @@ private ClassLoader liveconnectLoader = ClassLoader.getSystemClassLoader(); int identifier = 0; - public static PluginStreamHandler streamhandler; + private static PluginStreamHandler streamhandler; long startTime = 0; @@ -320,6 +320,12 @@ streamhandler = sh; } + public static PluginStreamHandler getStreamhandler() { + return streamhandler; + } + + + public static Map<String, String> getLoaderInfo() { Hashtable<String, String> map = new Hashtable<String, String>();
--- a/plugin/icedteanp/java/sun/applet/PluginMain.java Wed Oct 30 10:36:43 2013 +0100 +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java Wed Nov 06 14:46:43 2013 +0100 @@ -114,6 +114,11 @@ PluginAppletSecurityContext sc = new PluginAppletSecurityContext(0); sc.prePopulateLCClasses(); PluginAppletSecurityContext.setStreamhandler(streamHandler); + //the properties are initialised during classlaoder creation + if (DeploymentConfiguration.CONSOLE_SHOW.equals( + JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_CONSOLE_STARTUP_MODE))) { + PluginAppletSecurityContext.getStreamhandler().showConsole(); + } AppletSecurityContextManager.addContext(0, sc); PluginAppletViewer.setStreamhandler(streamHandler);
--- a/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java Wed Oct 30 10:36:43 2013 +0100 +++ b/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java Wed Nov 06 14:46:43 2013 +0100 @@ -44,7 +44,6 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; -import java.net.MalformedURLException; import java.nio.charset.Charset; import javax.swing.SwingUtilities; @@ -373,7 +372,7 @@ return; } - private void showConsole() { + public void showConsole() { SwingUtilities.invokeLater(new Runnable() { public void run() { console.showConsole();