From ec21eb4e37d764934e84fac5ee09179f3d66b12b Mon Sep 17 00:00:00 2001 From: John Ross Date: Mon, 5 Nov 2012 15:18:08 -0600 Subject: Bug 348993: Allow to stop a thread from console (e.g. main thread that is caught in an endless loop) The existing threads command was updated to support additional syntax. The full syntax is now (t | threads) [stop []] where is the thread name, and is the fully qualified class name of something extending java.lang.Throwable and visible to the console bundle's class loader. If is unspecified, the default is java.lang.IllegalStateException. The will be created with a translatable message indicating the thread was stopped by the OSGi Console, if a constructor accepting a String as the sole parameter exists. Otherwise, the default constructor is used. The is initialized with the target thread's stack trace and a cause of java.lang.RuntimeException which will also contain the translatable message. The cause will contain the stack trace of the current thread. --- .../org/eclipse/equinox/console/commands/ConsoleMessages.properties | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/ConsoleMessages.properties') diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/ConsoleMessages.properties b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/ConsoleMessages.properties index ad516ea0f..cae002d74 100755 --- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/ConsoleMessages.properties +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/ConsoleMessages.properties @@ -100,3 +100,6 @@ CONSOLE_DISABLED_BUNDLE_REASON=Reason(s):\t{0} (policy={1}) CONSOLE_STOP_MESSAGE=Really want to stop Equinox? (y/n; default=y) CONSOLE_STOP_CONFIRMATION_YES=y CONSOLE_STOP_ERROR_READ_CONFIRMATION=Error while reading confirmation +THREADS_THREAD_DOES_NOT_EXIST=Thread does not exist: {0} +THREADS_THREAD_STOPPED_BY_CONSOLE=Thread "{0}" stopped by the OSGi Console. +THREADS_UNRECOGNIZED_ACTION=Unrecognized action. Supported actions are {stop}. -- cgit v1.2.3