1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-19 14:15:50 +02:00

[cleanup] Avoid using SystemStartHere in production code

This commit is contained in:
Martin Oberhuber 2008-02-12 19:15:42 +00:00
parent 95c9997567
commit 6a92276db8

View file

@ -102,18 +102,15 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi
if (!markFile.exists() && SystemPreferencesManager.getShowLocalConnection()) { if (!markFile.exists() && SystemPreferencesManager.getShowLocalConnection()) {
// create the connection only if the local system type is enabled // create the connection only if the local system type is enabled
IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID); IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
if (systemType != null) { if (systemType != null && systemType.isEnabled()) {
RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class)); ISystemProfileManager profileManager = RSECorePlugin.getTheSystemProfileManager();
if (adapter != null && adapter.isEnabled(systemType)) { ISystemProfile profile = profileManager.getDefaultPrivateSystemProfile();
ISystemProfileManager profileManager = RSECorePlugin.getTheSystemProfileManager(); String userName = System.getProperty("user.name"); //$NON-NLS-1$
ISystemProfile profile = profileManager.getDefaultPrivateSystemProfile(); registry.createLocalHost(profile, SystemResources.TERM_LOCAL, userName);
String userName = System.getProperty("user.name"); //$NON-NLS-1$ try {
registry.createLocalHost(profile, SystemResources.TERM_LOCAL, userName); markFile.createNewFile();
try {
markFile.createNewFile();
}
catch(Exception e){}
} }
catch(Exception e){}
} }
} }
//System.err.println("InitRSEJob done"); //$NON-NLS-1$ //System.err.println("InitRSEJob done"); //$NON-NLS-1$