Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312499

Summary: Host OSGi console does not work after disconnect
Product: [Eclipse Project] PDE Reporter: Darin Wright <darin.eclipse>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, tjwatson
Version: 3.6Flags: darin.eclipse: review+
Target Milestone: 3.6 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch to not reuse a closed ConsoleSession none

Description Darin Wright CLA 2010-05-11 16:01:42 EDT
Follow up to bug 311307.

Similar to the Java Stack Trace console, I think the Host OSGi console should have a close button/action. It would be nice to be able to open/close the console.

I noticed that typing "disconnect" into the console closes it, but this is not very intuitive. As well, once disconnected, it does not seem possible to re-connect. Is this an OSGi limitation? If so, is ther someway we can tell the user that the connection is closed and is not useable?
Comment 1 Thomas Watson CLA 2010-05-11 17:50:21 EDT
Created attachment 168052 [details]
patch to not reuse a closed ConsoleSession

With the changes in bug 311307 PDE is now reusing the same ConsoleSession instance when it attempts to reopen the OSGi Console.  After the method org.eclipse.osgi.framework.console.ConsoleSession.doClose() is called the ConsoleSession should not be used again.  Instead a new ConsoleSession should be created by the factory.

Here is a patch that attempts to fix this.
Comment 2 Darin Wright CLA 2010-05-12 13:58:51 EDT
Thanks, Tom. This makes the console work for the "disconnect"/re-open scenario. +1. I'll open a new bug to add a close action/toolbar buttun (again :-)