mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
[cleanup] Avoid using SystemStartHere in production code
This commit is contained in:
parent
ee4235691c
commit
95c9997567
5 changed files with 40 additions and 41 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 PalmSource, Inc. and others.
|
||||
* Copyright (c) 2006, 2008 PalmSource, Inc. and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -10,6 +10,7 @@
|
|||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||
* Martin Oberhuber (Wind River) - [196934] hide disabled system types in remotecdt combo
|
||||
* Yu-Fen Kuo (MontaVista) - [190613] Fix NPE in Remotecdt when RSEUIPlugin has not been loaded
|
||||
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.remotecdt;
|
||||
|
@ -31,8 +32,6 @@ import org.eclipse.rse.core.RSECorePlugin;
|
|||
import org.eclipse.rse.core.model.IHost;
|
||||
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||
import org.eclipse.rse.ui.RSESystemTypeAdapter;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.ModifyEvent;
|
||||
|
@ -372,7 +371,7 @@ public class RemoteCMainTab extends CMainTab {
|
|||
protected void updateConnectionPulldown() {
|
||||
if (initializedRSE==0) {
|
||||
// start RSEUIPlugin to make sure the SystemRegistry is initialized.
|
||||
boolean isRegistryActive = RSEUIPlugin.isTheSystemRegistryActive();
|
||||
boolean isRegistryActive = RSECorePlugin.isTheSystemRegistryActive();
|
||||
if (isRegistryActive) {
|
||||
initializedRSE = 1;
|
||||
waitForRSEInit(new Runnable() {
|
||||
|
@ -390,8 +389,7 @@ public class RemoteCMainTab extends CMainTab {
|
|||
IHost[] connections = RSECorePlugin.getTheSystemRegistry().getHostsBySubSystemConfigurationCategory("shells"); //$NON-NLS-1$
|
||||
for(int i = 0; i < connections.length; i++) {
|
||||
IRSESystemType sysType = connections[i].getSystemType();
|
||||
RSESystemTypeAdapter a = (RSESystemTypeAdapter)sysType.getAdapter(RSESystemTypeAdapter.class);
|
||||
if (a!=null && a.isEnabled(sysType)) {
|
||||
if (sysType!=null && sysType.isEnabled()) {
|
||||
connectionCombo.add(connections[i].getAliasName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2008 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -10,6 +10,7 @@
|
|||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||
* David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
|
||||
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.useractions.ui.compile;
|
||||
|
@ -21,7 +22,6 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
|||
import org.eclipse.rse.core.RSECorePlugin;
|
||||
import org.eclipse.rse.core.model.IHost;
|
||||
import org.eclipse.rse.core.model.ISystemProfile;
|
||||
import org.eclipse.rse.core.model.SystemStartHere;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||
import org.eclipse.rse.internal.useractions.UserActionsPersistenceUtil;
|
||||
import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
|
||||
|
@ -176,7 +176,7 @@ public abstract class SystemCompileManager {
|
|||
* this must be overridden.
|
||||
*/
|
||||
public SystemCompileProfile[] getAllCompileProfiles() {
|
||||
ISystemProfile[] systemProfiles = SystemStartHere.getSystemProfileManager().getActiveSystemProfiles();
|
||||
ISystemProfile[] systemProfiles = RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfiles();
|
||||
SystemCompileProfile[] compProfiles = null;
|
||||
if ((systemProfiles != null) && (systemProfiles.length > 0)) {
|
||||
compProfiles = new SystemCompileProfile[systemProfiles.length];
|
||||
|
@ -250,8 +250,8 @@ public abstract class SystemCompileManager {
|
|||
*/
|
||||
private ISystemProfile getSystemProfile(SystemCompileProfile compProfile) {
|
||||
//return currentProfile;
|
||||
//SystemProfile[] systemProfiles = SystemStartHere.getSystemProfileManager().getActiveSystemProfiles(); THIS WAS THE BUG!!
|
||||
ISystemProfile[] systemProfiles = SystemStartHere.getSystemProfileManager().getSystemProfiles();
|
||||
//SystemProfile[] systemProfiles = RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfiles(); THIS WAS THE BUG!!
|
||||
ISystemProfile[] systemProfiles = RSECorePlugin.getTheSystemProfileManager().getSystemProfiles();
|
||||
String profileName = compProfile.getProfileName();
|
||||
ISystemProfile currentProfile = null;
|
||||
for (int idx = 0; (currentProfile == null) && (idx < systemProfiles.length); idx++) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2008 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -8,11 +8,12 @@
|
|||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.useractions.ui.uda;
|
||||
|
||||
import org.eclipse.rse.core.RSECorePlugin;
|
||||
import org.eclipse.rse.core.model.ISystemProfile;
|
||||
import org.eclipse.rse.core.model.SystemStartHere;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||
import org.eclipse.rse.internal.ui.SystemResources;
|
||||
|
@ -74,7 +75,7 @@ public class SystemWorkWithUDAsDialog extends SystemPromptDialog implements ISys
|
|||
this.shell = shell;
|
||||
this.subsystem = ss;
|
||||
this.subsystemFactory = ss.getSubSystemConfiguration();
|
||||
setProfiles(SystemStartHere.getSystemProfileManager().getActiveSystemProfiles(), subsystem.getSystemProfile());
|
||||
setProfiles(RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfiles(), subsystem.getSystemProfile());
|
||||
//setMinimumSize(600, 520); // x, y
|
||||
//pack();
|
||||
setHelp();
|
||||
|
@ -89,7 +90,7 @@ public class SystemWorkWithUDAsDialog extends SystemPromptDialog implements ISys
|
|||
setShowOkButton(false);
|
||||
this.shell = shell;
|
||||
this.subsystemFactory = ssFactory;
|
||||
setProfiles(SystemStartHere.getSystemProfileManager().getActiveSystemProfiles(), profile);
|
||||
setProfiles(RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfiles(), profile);
|
||||
//setMinimumSize(600, 520); // x, y
|
||||
//pack();
|
||||
setHelp();
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2007 IBM Corporation. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: Kevin Doyle.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
********************************************************************************/
|
||||
* Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: Kevin Doyle.
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.tests.subsystems.files;
|
||||
|
||||
|
@ -21,6 +21,7 @@ import org.eclipse.rse.core.model.IHost;
|
|||
import org.eclipse.rse.core.model.ISystemRegistry;
|
||||
import org.eclipse.rse.core.model.SystemStartHere;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.rse.internal.core.model.SystemRegistry;
|
||||
import org.eclipse.rse.services.files.IFileService;
|
||||
import org.eclipse.rse.services.files.IHostFile;
|
||||
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
|
||||
|
@ -28,7 +29,6 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
|||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||
import org.eclipse.rse.ui.ISystemPreferencesConstants;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.internal.model.SystemRegistry;
|
||||
|
||||
public class CreateFileTestCase extends FileServiceBaseTest {
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2007 IBM Corporation. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: Kevin Doyle
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
********************************************************************************/
|
||||
* Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: Kevin Doyle
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.tests.subsystems.files;
|
||||
|
||||
|
@ -27,6 +27,7 @@ import org.eclipse.rse.core.model.IHost;
|
|||
import org.eclipse.rse.core.model.ISystemRegistry;
|
||||
import org.eclipse.rse.core.model.SystemStartHere;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.rse.internal.core.model.SystemRegistry;
|
||||
import org.eclipse.rse.internal.efs.RSEFileStore;
|
||||
import org.eclipse.rse.services.clientserver.PathUtility;
|
||||
import org.eclipse.rse.services.files.IFileService;
|
||||
|
@ -35,7 +36,6 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
|||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||
import org.eclipse.rse.ui.ISystemPreferencesConstants;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.internal.model.SystemRegistry;
|
||||
|
||||
public class FileOutputStreamTestCase extends FileServiceBaseTest {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue