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