Bug 230285 - [shells] Remote shells should be restored on quit and re-start of RSE
Summary: [shells] Remote shells should be restored on quit and re-start of RSE
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-05 15:39 EDT by Martin Oberhuber CLA
Modified: 2008-05-20 12:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-05-05 15:39:36 EDT
RSE has a Preference setting "Re-open Remote Systems view to previous state". This (mostly) works for file trees, but it does not work for remote shells.

It would be nice if remote shells were also launched the same way as in the previous session, with the same folder that was open in the previous session.

When trying this out, I found that it did not ever work since the earliest openRSE 1.x releases. I'm wondering whether it ever worked in IBM RSE? Some code seems to indicate that this feature was there once. On one occasion, with RSE 3.0M6 in an Eclipse 3.4M7 installation, with "show filter pools" switched on, I got the following NPE on quit and restart with a "Local Shell" open on Windows XP:

Unhandled Event Loop Exception

Caused by: java.lang.NullPointerException
at org.eclipse.rse.internal.ui.view.SystemViewPart.getObjectFromMemento(SystemViewPart.java:1308)
at org.eclipse.rse.internal.ui.view.SystemViewPart$RestoreStateRunnable.runInUIThread(SystemViewPart.java:1790)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)


-----------Enter bugs above this line-----------
TM 3.0M7 testing
installation : eclipse-SDK-I20080502-0100, cdt-5.0.0M6, DSF-N20071113, 
     ECF-2.0m6, emf-2.4.0M6, Findbugs-1.3.3, J9Launching-6.1.0,
     PHPEclipse-1.2.0.200804230602NGT, Releng.Tools-3.4M6, RSE-3.0M6,
     RXTX-2.1-7r3b, Subversive-0.7.0.v20080423,
     org.tigris.MemMonitor, WR-Retriever-3.0.v20070604,
     Mylyn-3.0.0.I20080327-1500, EPP-UsageData-1.0.0.N200804111155
RSE install  : RSE HEAD 3.0M6 candidate in workspace, TM-terminal, TM-discovery
java.runtime : Sun 1.6.0_05-b13 -Xmx512m -XX:MaxPermSize=128m
os.name:     : Windows XP 5.1, Service Pack 2
------------------------------------------------
systemtype   : Windows-local, Dstore-win, Dstore-linux
targetos     : Red Hat Enterprise Linux WS release 4 (Nahant Update 3)
targetuname  : Linux parser 2.6.9-34.EL #1 i686 athlon i386 GNU/Linux
targetvm     : Sun Java HotSpot(TM) Client VM (build 1.4.2_12-b03, mixed mode)
------------------------------------------------
Comment 1 David McKnight CLA 2008-05-20 12:17:17 EDT
The problem was that we weren't creating a property set for this if it didn't exist.  I've changed the code to create a property set for the shell subsystem when it doesn't exist and store it. 

Dave D, one thing I had to do is call commit() in order for the property set to persist.  This seems to slow down the shutdown slightly.  Do you think commit() is the right thing to call?