Bug 196930 - [refresh] SSH connection type is shown in SystemView although disabled
Summary: [refresh] SSH connection type is shown in SystemView although disabled
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-18 06:19 EDT by Martin Oberhuber CLA
Modified: 2007-07-19 14:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-07-18 06:19:11 EDT
Create a connection of type "SSH Only".
Window > Preferences > Remote Systems, disable "SSH Only" connection type, OK.
--> SSH connection still shown in System view; Do View-menu > Refresh all 
    and it is gone.

Quit and re-start RSE.
--> The SSH connection is shown in the System View; Verify in Preferences that
    the connection type is switched off. Do View-menu > Refresh all and it is
    gone.

Expected behavior: The SSH Only connection should not be shown in the SystemView after restart. It looks like a ViewContentProvider does not check the adapter for systemType enablement as it should:

RSESystemTypeAdapter a = systemType.getAdapter(RSESystemTypeAdapter.class);
if (a.isEnabled(systemType)) { ...

-----------Enter bugs above this line-----------
TM 2.0
installation : eclipse-SDK-3.3 (I20070625-1500), cdt-4.0.0, emf-2.3.0
RSE install  : workspace HEAD
java.runtime : Sun 1.6.0_01-b06
os.name:     : Windows XP 5.1, Service Pack 1
------------------------------------------------
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 Martin Oberhuber CLA 2007-07-18 06:29:48 EDT
Note: this happened with the old Workspace persistence provider (on an old workspace that had been created with RSE 1.x).
Comment 2 David McKnight CLA 2007-07-19 13:42:28 EDT
The initial rendering of the view is fine however the createHost() calls in the registry fire new host events, causing the tree to add the ssh connection.  I've fixed this by checking the host enablement in the event handling.
Comment 3 Martin Oberhuber CLA 2007-07-19 14:19:31 EDT
Hmm... shouldn't it also
   return Status.OK_STATUS
right away when systemTYpe==null ?

Also, you are not checking the case where adapter==null
Comment 4 David McKnight CLA 2007-07-19 14:26:55 EDT
(In reply to comment #3)
> Hmm... shouldn't it also
>    return Status.OK_STATUS
> right away when systemTYpe==null ?
> 
> Also, you are not checking the case where adapter==null
> 

I've updated it as per comments.