From 6a92276db8b2590b7f507dd615e4c32720802584 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Tue, 12 Feb 2008 19:15:42 +0000 Subject: [PATCH] [cleanup] Avoid using SystemStartHere in production code --- .../UI/org/eclipse/rse/ui/RSEUIPlugin.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java index e126f0d3183..e5f3058f0f7 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java @@ -102,18 +102,15 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi if (!markFile.exists() && SystemPreferencesManager.getShowLocalConnection()) { // create the connection only if the local system type is enabled IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID); - if (systemType != null) { - RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class)); - if (adapter != null && adapter.isEnabled(systemType)) { - ISystemProfileManager profileManager = RSECorePlugin.getTheSystemProfileManager(); - ISystemProfile profile = profileManager.getDefaultPrivateSystemProfile(); - String userName = System.getProperty("user.name"); //$NON-NLS-1$ - registry.createLocalHost(profile, SystemResources.TERM_LOCAL, userName); - try { - markFile.createNewFile(); - } - catch(Exception e){} - } + if (systemType != null && systemType.isEnabled()) { + ISystemProfileManager profileManager = RSECorePlugin.getTheSystemProfileManager(); + ISystemProfile profile = profileManager.getDefaultPrivateSystemProfile(); + String userName = System.getProperty("user.name"); //$NON-NLS-1$ + registry.createLocalHost(profile, SystemResources.TERM_LOCAL, userName); + try { + markFile.createNewFile(); + } + catch(Exception e){} } } //System.err.println("InitRSEJob done"); //$NON-NLS-1$