mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 11:55:40 +02:00
[177523][api] Unify singleton getter methods to use getInstance()
This commit is contained in:
parent
56c2add9e5
commit
7af0ea93c0
77 changed files with 278 additions and 220 deletions
|
@ -8,6 +8,7 @@
|
|||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.discovery;
|
||||
|
@ -104,7 +105,7 @@ public class ServiceDiscoveryWizard extends Wizard {
|
|||
|
||||
IHost conn = null;
|
||||
try {
|
||||
IRSESystemType discoveryType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById("org.eclipse.rse.systemtype.discovery"); //$NON-NLS-1$
|
||||
IRSESystemType discoveryType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById("org.eclipse.rse.systemtype.discovery"); //$NON-NLS-1$
|
||||
conn = registry.createHost(discoveryType, "Discovery@" + hostName, hostName, "Discovered services in "+hostName);//$NON-NLS-1$ //$NON-NLS-2$
|
||||
} catch (Exception e) {
|
||||
RSEUIPlugin.getTheSystemRegistry().deleteHost(conn);
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2007 Symbian Software Ltd. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 Symbian Software Ltd. 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
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.internal.discovery.engine;
|
||||
|
@ -41,7 +42,7 @@ public class ServiceDiscoveryEngine {
|
|||
/**
|
||||
* Gets an instance of the service discovery engine
|
||||
*/
|
||||
public static ServiceDiscoveryEngine getServiceDiscoveryEngine() {
|
||||
public static ServiceDiscoveryEngine getInstance() {
|
||||
if (SERVICE_DISCOVERY_ENGINE == null)
|
||||
SERVICE_DISCOVERY_ENGINE = new ServiceDiscoveryEngine();
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2007 Symbian Software Ltd. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 Symbian Software Ltd. 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
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.internal.discovery.view;
|
||||
|
@ -91,7 +92,7 @@ public class ServiceDiscoveryView extends ViewPart {
|
|||
private ServiceDiscoveryWizardMainPage serviceDiscoveryWizardMainPage;
|
||||
private Resource resource;
|
||||
|
||||
private ServiceDiscoveryEngine serviceDiscoveryEngine = ServiceDiscoveryEngine.getServiceDiscoveryEngine();
|
||||
private ServiceDiscoveryEngine serviceDiscoveryEngine = ServiceDiscoveryEngine.getInstance();
|
||||
|
||||
public void createPartControl(Composite parent) {
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2007 Symbian Software Ltd. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 Symbian Software Ltd. 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
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
|
||||
* Javier Montalvo Orus (Symbian) - initial API and implementation
|
||||
* Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.internal.discovery.wizard;
|
||||
|
@ -103,7 +104,7 @@ public class ServiceDiscoveryWizardDisplayPage extends WizardPage {
|
|||
private Button showAllButton;
|
||||
|
||||
//static service discovery engine
|
||||
private final ServiceDiscoveryEngine serviceDiscoveryEngine = ServiceDiscoveryEngine.getServiceDiscoveryEngine();
|
||||
private final ServiceDiscoveryEngine serviceDiscoveryEngine = ServiceDiscoveryEngine.getInstance();
|
||||
|
||||
//service discovery settings
|
||||
private String query = null;
|
||||
|
|
|
@ -56,7 +56,7 @@ public class DeveloperConnectorServiceManager extends
|
|||
<strong>/**
|
||||
* Return singleton instance
|
||||
*/
|
||||
public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
|
||||
public static DeveloperConnectorServiceManager getInstance()
|
||||
{
|
||||
if (inst == null)
|
||||
inst = new DeveloperConnectorServiceManager();
|
||||
|
|
|
@ -50,7 +50,7 @@ public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
|||
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
|
||||
*/
|
||||
public IConnectorService getConnectorService(IHost host) {
|
||||
<strong>return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
|
||||
<strong>return DeveloperConnectorServiceManager.getInstance()
|
||||
.getConnectorService(host, IDeveloperSubSystem.class);</strong>
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
|||
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
|
||||
*/
|
||||
public IConnectorService getConnectorService(IHost host) {
|
||||
return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
|
||||
return DeveloperConnectorServiceManager.getInstance()
|
||||
.getConnectorService(host, IDeveloperSubSystem.class);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class DaytimeConnectorServiceManager extends AbstractConnectorServiceMana
|
|||
* Return singleton instance
|
||||
* @return the singleton instance
|
||||
*/
|
||||
public static DaytimeConnectorServiceManager getTheDaytimeConnectorServiceManager() {
|
||||
public static DaytimeConnectorServiceManager getInstance() {
|
||||
if (fInstance == null) {
|
||||
fInstance = new DaytimeConnectorServiceManager();
|
||||
}
|
||||
|
|
|
@ -70,11 +70,11 @@ public class DaytimeSubSystemConfiguration extends ServiceSubSystemConfiguration
|
|||
}
|
||||
|
||||
public IConnectorService getConnectorService(IHost host) {
|
||||
return DaytimeConnectorServiceManager.getTheDaytimeConnectorServiceManager()
|
||||
return DaytimeConnectorServiceManager.getInstance()
|
||||
.getConnectorService(host, IDaytimeService.class);
|
||||
}
|
||||
public void setConnectorService(IHost host, IConnectorService connectorService) {
|
||||
DaytimeConnectorServiceManager.getTheDaytimeConnectorServiceManager()
|
||||
DaytimeConnectorServiceManager.getInstance()
|
||||
.setConnectorService(host, IDaytimeService.class, connectorService);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public class DeveloperConnectorServiceManager extends
|
|||
* Return singleton instance
|
||||
* @return the singleton instance
|
||||
*/
|
||||
public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
|
||||
public static DeveloperConnectorServiceManager getInstance()
|
||||
{
|
||||
if (inst == null)
|
||||
inst = new DeveloperConnectorServiceManager();
|
||||
|
|
|
@ -54,7 +54,7 @@ public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
|||
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
|
||||
*/
|
||||
public IConnectorService getConnectorService(IHost host) {
|
||||
return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
|
||||
return DeveloperConnectorServiceManager.getInstance()
|
||||
.getConnectorService(host, IDeveloperSubSystem.class);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 2007 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.connectorservice.dstore;
|
||||
|
@ -26,11 +26,11 @@ import org.eclipse.rse.internal.connectorservice.dstore.ConnectorServiceResource
|
|||
/**
|
||||
* IConnectorService manager class.
|
||||
* There should be only one of these instantiated.
|
||||
* Use getTheUniversalSystemManager to get that singleton.
|
||||
* Use {@link #getInstance()} to get that singleton.
|
||||
* <p>
|
||||
* The job of this manager is to manage and return IConnectorService objects.
|
||||
* It ensures there is only ever one per unique SystemConnection,
|
||||
* so that both the file and cmd subsystems can share the same system object.
|
||||
* so that both the file and command subsystems can share the same system object.
|
||||
*/
|
||||
public class DStoreConnectorServiceManager extends AbstractConnectorServiceManager
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ public class DStoreConnectorServiceManager extends AbstractConnectorServiceManag
|
|||
|
||||
/**
|
||||
* Private constructor to ensure not instantiated this way.
|
||||
* Use getTheUniversalSystemManager instead.
|
||||
* Use {@link #getInstance()} instead.
|
||||
*/
|
||||
private DStoreConnectorServiceManager()
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ public class DStoreConnectorServiceManager extends AbstractConnectorServiceManag
|
|||
/**
|
||||
* Return singleton instance of this class
|
||||
*/
|
||||
public static DStoreConnectorServiceManager getTheUniversalSystemManager()
|
||||
public static DStoreConnectorServiceManager getInstance()
|
||||
{
|
||||
if (inst == null)
|
||||
inst = new DStoreConnectorServiceManager();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.connectorservice.local;
|
||||
|
@ -25,11 +25,11 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
|
|||
/**
|
||||
* IConnectorService manager class.
|
||||
* There should be only one of these instantiated.
|
||||
* Use getTheLocalSystemManager to get that singleton.
|
||||
* Use {@link #getInstance()} to get that singleton.
|
||||
* <p>
|
||||
* The job of this manager is to manage and return IConnectorService objects.
|
||||
* It ensures there is only ever one per unique SystemConnection,
|
||||
* so that both the file and cmd subsystems can share the same system object.
|
||||
* so that both the file and command subsystems can share the same system object.
|
||||
*/
|
||||
public class LocalConnectorServiceManager extends AbstractConnectorServiceManager
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ public class LocalConnectorServiceManager extends AbstractConnectorServiceManage
|
|||
|
||||
/**
|
||||
* Private constructor to ensure not instantiated this way.
|
||||
* Use getTheLocalSystemManager instead.
|
||||
* Use {@link #getInstance()} instead.
|
||||
*/
|
||||
private LocalConnectorServiceManager()
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ public class LocalConnectorServiceManager extends AbstractConnectorServiceManage
|
|||
/**
|
||||
* Return singleton instance of this class
|
||||
*/
|
||||
public static LocalConnectorServiceManager getTheLocalSystemManager()
|
||||
public static LocalConnectorServiceManager getInstance()
|
||||
{
|
||||
if (inst == null)
|
||||
inst = new LocalConnectorServiceManager();
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* David Dykstal (IBM) - moved from core package in the UI plugin
|
||||
* - updated to use new RSEPreferencesManager
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core;
|
||||
|
@ -172,7 +173,7 @@ public class PasswordPersistenceManager {
|
|||
*/
|
||||
private void initExtensions()
|
||||
{
|
||||
IRSESystemType[] sysTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] sysTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
systemTypes = new RegisteredSystemType[sysTypes.length];
|
||||
|
||||
for (int i = 0; i < sysTypes.length; i++) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 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
|
||||
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* David Dykstal (IBM) - added utility method for finding qualifiedHostNames
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
package org.eclipse.rse.core;
|
||||
|
||||
|
@ -63,7 +64,25 @@ public class RSECorePlugin extends Plugin {
|
|||
* @return the persistence manager currently in use for RSE
|
||||
*/
|
||||
public static IRSEPersistenceManager getThePersistenceManager() {
|
||||
return getDefault() != null ? getDefault().getPersistenceManager() : null;
|
||||
return getDefault().getPersistenceManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* A static convenience method - fully equivalent to
|
||||
* <code>RSECorePlugin.getDefault().getRegistry()</code>.
|
||||
* @return the RSE Core Registry.
|
||||
*/
|
||||
public static IRSECoreRegistry getTheCoreRegistry() {
|
||||
return getDefault().getCoreRegistry();
|
||||
}
|
||||
|
||||
/**
|
||||
* A static convenience method - fully equivalent to
|
||||
* <code>RSECorePlugin.getDefault().getSystemRegistry()</code>.
|
||||
* @return the RSE System Registry.
|
||||
*/
|
||||
public static ISystemRegistry getTheSystemRegistry() {
|
||||
return getDefault().getSystemRegistry();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -170,7 +189,7 @@ public class RSECorePlugin extends Plugin {
|
|||
* This may return null if the registry has not yet been set.
|
||||
* @return the RSE core registry.
|
||||
*/
|
||||
public IRSECoreRegistry getRegistry() {
|
||||
public IRSECoreRegistry getCoreRegistry() {
|
||||
return RSECoreRegistry.getInstance();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
package org.eclipse.rse.core;
|
||||
|
||||
|
@ -154,7 +155,7 @@ public class RSEPreferencesManager {
|
|||
* @return the table of system types formatted as a single string
|
||||
*/
|
||||
public static String getSystemTypeValues() {
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
StringBuffer buffer = new StringBuffer(100);
|
||||
for (int i = 0; i < systemTypes.length; i++) {
|
||||
IRSESystemType systemType = systemTypes[i];
|
||||
|
@ -176,7 +177,7 @@ public class RSEPreferencesManager {
|
|||
* table format.
|
||||
*/
|
||||
public static void setSystemTypeValues(String systemTypeValues) {
|
||||
IRSECoreRegistry registry = RSECorePlugin.getDefault().getRegistry();
|
||||
IRSECoreRegistry registry = RSECorePlugin.getTheCoreRegistry();
|
||||
Hashtable table = parseString(systemTypeValues);
|
||||
Enumeration e = table.keys();
|
||||
while (e.hasMoreElements()) {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* David Dykstal (IBM) - 142806: refactoring persistence framework
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.model;
|
||||
|
@ -117,7 +118,7 @@ public class Host extends RSEModelObject implements IHost {
|
|||
* @see org.eclipse.rse.core.model.IHost#getConnectorServices()
|
||||
*/
|
||||
public IConnectorService[] getConnectorServices() {
|
||||
return RSECorePlugin.getDefault().getSystemRegistry().getConnectorServices(this);
|
||||
return RSECorePlugin.getTheSystemRegistry().getConnectorServices(this);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -125,7 +126,7 @@ public class Host extends RSEModelObject implements IHost {
|
|||
* @see org.eclipse.rse.core.model.IHost#getSubSystems()
|
||||
*/
|
||||
public ISubSystem[] getSubSystems() {
|
||||
return RSECorePlugin.getDefault().getSystemRegistry().getSubSystems(this);
|
||||
return RSECorePlugin.getTheSystemRegistry().getSubSystems(this);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.model;
|
||||
|
@ -41,7 +42,7 @@ import org.eclipse.rse.internal.core.RSECoreRegistry;
|
|||
/**
|
||||
* Registry or front door for all remote system connections.
|
||||
* There is a singleton of the class implementation of this interface.
|
||||
* To get it, call the {@link org.eclipse.rse.core.RSECorePlugin#getSystemRegistry()}.
|
||||
* To get it, call the {@link org.eclipse.rse.core.RSECorePlugin#getTheSystemRegistry()}.
|
||||
* <p>
|
||||
* The idea here is that connections are grouped by system profile. At any
|
||||
* time, there is a user-specified number of profiles "active" and connections
|
||||
|
@ -400,7 +401,7 @@ public interface ISystemRegistry extends ISchedulingRule {
|
|||
* Returns all connections for all active profiles, for the given system type.
|
||||
* If the specified system type is null, an empty array is returned.
|
||||
* In order to get an IRSESystemType, use
|
||||
* <code>RSECorePlugin.getDefault().getRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}</code>
|
||||
* <code>RSECorePlugin.getTheCoreRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}</code>
|
||||
*
|
||||
* @param systemType The system type instance.
|
||||
* @return The list of connections or an empty array.
|
||||
|
@ -411,7 +412,7 @@ public interface ISystemRegistry extends ISchedulingRule {
|
|||
* Return all connections for all active profiles, for the given system types.
|
||||
*
|
||||
* In order to get an IRSESystemType, use
|
||||
* <code>RSECorePlugin.getDefault().getRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}</code>
|
||||
* <code>RSECorePlugin.getTheCoreRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}</code>
|
||||
*/
|
||||
public IHost[] getHostsBySystemTypes(IRSESystemType[] systemTypes);
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 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:
|
||||
* David Dykstal (IBM) - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.model;
|
||||
|
@ -74,7 +75,7 @@ public abstract class RSEModelOperation {
|
|||
* Ends a transaction. Schedules all changed profiles for save.
|
||||
*/
|
||||
private static void endTransaction() {
|
||||
IRSEPersistenceManager persistenceManager = RSECorePlugin.getDefault().getPersistenceManager();
|
||||
IRSEPersistenceManager persistenceManager = RSECorePlugin.getThePersistenceManager();
|
||||
persistenceManager.commitProfiles();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.model;
|
||||
|
@ -35,7 +36,7 @@ public class SystemStartHere
|
|||
*/
|
||||
public static ISystemRegistry getSystemRegistry()
|
||||
{
|
||||
return RSECorePlugin.getDefault().getSystemRegistry();
|
||||
return RSECorePlugin.getTheSystemRegistry();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,7 +69,7 @@ public class SystemStartHere
|
|||
*/
|
||||
public static IHost[] getConnectionsBySystemType(String systemTypeId)
|
||||
{
|
||||
IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(systemTypeId);
|
||||
IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(systemTypeId);
|
||||
return getSystemRegistry().getHostsBySystemType(systemType);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2003, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2003, 2007 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.subsystems;
|
||||
|
@ -44,9 +44,9 @@ import org.eclipse.rse.core.model.IHost;
|
|||
* <p>
|
||||
* Because you only need a singleton of these class, the constructor is protected.
|
||||
* <p>
|
||||
* Your subclass <b>must supply</b> a method like the following:</p>
|
||||
* Your subclass <b>must supply</b> a singleton factory method like the following:</p>
|
||||
* <pre><code>
|
||||
* public static MyConnectorServiceManager <b>getTheMyConnectorServiceManager</b>()
|
||||
* public static MyConnectorServiceManager <b>getInstance</b>()
|
||||
* {
|
||||
* if (inst == null)
|
||||
* inst = new MyConnectorServiceManager();
|
||||
|
@ -65,7 +65,7 @@ public abstract class AbstractConnectorServiceManager implements IConnectorServi
|
|||
|
||||
/**
|
||||
* Protected constructor to ensure not instantiated this way.
|
||||
* Use subclass-supplied static method getTheSystemConfiguration() instead.
|
||||
* Use subclass-supplied static singleton factory method getInstance() instead.
|
||||
*/
|
||||
protected AbstractConnectorServiceManager()
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
* David Dykstal (IBM) - initial API and implementation from AbstractConnectorService.
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
package org.eclipse.rse.core.subsystems;
|
||||
|
||||
|
@ -198,7 +199,7 @@ public abstract class AuthenticatingConnectorService extends AbstractConnectorSe
|
|||
|
||||
private void updatePasswordForOtherSystemsInConnection(String uid, String password, boolean persist) {
|
||||
IHost connection = getPrimarySubSystem().getHost();
|
||||
ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
|
||||
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
|
||||
ISubSystem[] subsystems = registry.getSubSystems(connection);
|
||||
List uniqueSystems = new ArrayList();
|
||||
for (int i = 0; i < subsystems.length; i++) {
|
||||
|
@ -224,7 +225,7 @@ public abstract class AuthenticatingConnectorService extends AbstractConnectorSe
|
|||
private void clearPasswordForOtherSystemsInConnection(String uid, boolean persist) {
|
||||
if (uid != null) {
|
||||
IHost connection = getHost();
|
||||
ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
|
||||
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
|
||||
ISubSystem[] subsystems = registry.getSubSystems(connection);
|
||||
List uniqueSystems = new ArrayList();
|
||||
for (int i = 0; i < subsystems.length; i++) {
|
||||
|
@ -256,7 +257,7 @@ public abstract class AuthenticatingConnectorService extends AbstractConnectorSe
|
|||
} else {
|
||||
int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST;
|
||||
IHost host = subsystem.getHost();
|
||||
ISystemRegistry sr = RSECorePlugin.getDefault().getSystemRegistry();
|
||||
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
||||
sr.updateHost(host, host.getSystemType(), host.getAliasName(), host.getHostName(), host.getDescription(), userId, whereToUpdate);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 2007 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
|
||||
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* David Dykstal (IBM) - 142806: refactoring persistence framework
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.core.filters;
|
||||
|
@ -166,7 +167,7 @@ public class SystemFilterPoolReference extends SystemPersistableReferencingObjec
|
|||
if (filterPool == null) {
|
||||
String filterPoolName = getReferencedFilterPoolName();
|
||||
String profileName = getReferencedFilterPoolManagerName();
|
||||
ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
|
||||
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
|
||||
ISystemProfile profile = registry.getSystemProfile(profileName);
|
||||
ISubSystem subsystem = (ISubSystem) getProvider();
|
||||
ISubSystemConfiguration config = subsystem.getSubSystemConfiguration();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 2007 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
|
||||
|
@ -12,9 +12,11 @@
|
|||
*
|
||||
* Contributors:
|
||||
* David Dykstal (IBM) - removing implementation of ISystemFilterConstants
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.core.filters;
|
||||
|
||||
import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy;
|
||||
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
|
||||
import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
|
||||
|
@ -26,8 +28,6 @@ import org.eclipse.rse.core.filters.SystemFilterNamingPolicy;
|
|||
import org.eclipse.rse.core.model.ISystemProfile;
|
||||
import org.eclipse.rse.logging.Logger;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Static methods for creating and restoring the "front doors" to the filter framework
|
||||
* <ul>
|
||||
|
@ -54,7 +54,7 @@ public class SystemFilterStartHere
|
|||
{
|
||||
}
|
||||
|
||||
public static SystemFilterStartHere getDefault()
|
||||
public static SystemFilterStartHere getInstance()
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - 142806: refactoring persistence framework
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.core.model;
|
||||
|
@ -85,7 +86,7 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd
|
|||
*/
|
||||
public IHost createHost(IRSESystemType systemType, String connectionName, String hostName, String description) throws Exception
|
||||
{
|
||||
return RSECorePlugin.getDefault().getSystemRegistry().createHost(getName(), systemType, connectionName, hostName, description);
|
||||
return RSECorePlugin.getTheSystemRegistry().createHost(getName(), systemType, connectionName, hostName, description);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,7 +94,7 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd
|
|||
*/
|
||||
public IHost[] getHosts()
|
||||
{
|
||||
return RSECorePlugin.getDefault().getSystemRegistry().getHostsByProfile(this);
|
||||
return RSECorePlugin.getTheSystemRegistry().getHostsByProfile(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -101,7 +102,7 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd
|
|||
*/
|
||||
public ISystemFilterPool[] getFilterPools()
|
||||
{
|
||||
ISubSystemConfiguration[] ssFactories = RSECorePlugin.getDefault().getSystemRegistry().getSubSystemConfigurations();
|
||||
ISubSystemConfiguration[] ssFactories = RSECorePlugin.getTheSystemRegistry().getSubSystemConfigurations();
|
||||
Vector poolsVector = new Vector();
|
||||
for (int idx = 0; idx < ssFactories.length; idx++)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* of system types.
|
||||
* David Dykstal (IBM) - 168870: move core function from UI to core
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.core.subsystems;
|
||||
|
@ -148,7 +149,7 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
|
|||
*/
|
||||
public IRSESystemType[] getSystemTypes() {
|
||||
if (resolvedSystemTypes == null) {
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
|
||||
// If the subsystem configuration supports all system types, just add all
|
||||
// currently registered system types to the resolved list
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - 142806: refactoring persistence framework
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.persistence;
|
||||
|
@ -110,7 +111,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
|
|||
|
||||
public boolean commitProfiles() {
|
||||
boolean ok = true;
|
||||
ISystemProfile[] profiles = RSECorePlugin.getDefault().getSystemRegistry().getAllSystemProfiles();
|
||||
ISystemProfile[] profiles = RSECorePlugin.getTheSystemRegistry().getAllSystemProfiles();
|
||||
for (int idx = 0; idx < profiles.length && ok; idx++) {
|
||||
try {
|
||||
ok = commitProfile(profiles[idx]);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.persistence.dom;
|
||||
|
@ -113,7 +114,7 @@ public class RSEDOMImporter {
|
|||
try {
|
||||
// NOTE create host effectively recreates the subsystems
|
||||
// so instead of creating subsystems on restore, we should be updating their properties
|
||||
IRSECoreRegistry registry = RSECorePlugin.getDefault().getRegistry();
|
||||
IRSECoreRegistry registry = RSECorePlugin.getTheCoreRegistry();
|
||||
IRSESystemType systemType = null;
|
||||
if (systemTypeId != null) {
|
||||
systemType = registry.getSystemTypeById(systemTypeId);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.files.ui.resources;
|
||||
|
@ -194,7 +195,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
this.remoteFile = remoteFile;
|
||||
this.remotePath = remoteFile.getAbsolutePath();
|
||||
this.subsystem = remoteFile.getParentRemoteFileSubSystem();
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getInstance();
|
||||
|
||||
// if remote edit project doesn't exist, create it
|
||||
if (!mgr.doesRemoteEditProjectExist())
|
||||
|
@ -222,7 +223,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
this.remoteFile = remoteFile;
|
||||
this.remotePath = remoteFile.getAbsolutePath();
|
||||
this.subsystem = remoteFile.getParentRemoteFileSubSystem();
|
||||
this.root = SystemRemoteEditManager.getDefault().getRemoteEditProjectLocation().makeAbsolute().toOSString();
|
||||
this.root = SystemRemoteEditManager.getInstance().getRemoteEditProjectLocation().makeAbsolute().toOSString();
|
||||
this.localPath = getDownloadPath();
|
||||
|
||||
// dkm - use registered
|
||||
|
@ -901,7 +902,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
if (subsystem != null && subsystem.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$
|
||||
{
|
||||
return SystemRemoteEditManager.getDefault().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath);
|
||||
return SystemRemoteEditManager.getInstance().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath);
|
||||
}
|
||||
return remotePath;
|
||||
}
|
||||
|
@ -911,7 +912,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
String hostname = subsystem.getHost().getHostName();
|
||||
if (subsystem != null && subsystem.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$
|
||||
{
|
||||
String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
|
||||
String result = SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath);
|
||||
if (!result.equals(hostname))
|
||||
{
|
||||
_isRemoteFileMounted = true;
|
||||
|
@ -1586,7 +1587,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
private void refresh()
|
||||
{
|
||||
|
||||
SystemRemoteEditManager.getDefault().refreshRemoteEditContainer(localFile.getParent());
|
||||
SystemRemoteEditManager.getInstance().refreshRemoteEditContainer(localFile.getParent());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.files.ui.resources;
|
||||
|
@ -32,6 +33,7 @@ import org.eclipse.core.runtime.Status;
|
|||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
||||
import org.eclipse.jface.operation.IRunnableContext;
|
||||
import org.eclipse.rse.core.RSECorePlugin;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
||||
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
|
||||
|
@ -135,7 +137,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!RSEUIPlugin.getThePersistenceManager().isExporting())
|
||||
if (!RSECorePlugin.getThePersistenceManager().isExporting())
|
||||
{
|
||||
List changes = new ArrayList();
|
||||
checkLocalChanges(delta, changes);
|
||||
|
@ -648,7 +650,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener
|
|||
}
|
||||
|
||||
// does temp files exist
|
||||
if (!SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
|
||||
if (!SystemRemoteEditManager.getInstance().doesRemoteEditProjectExist())
|
||||
return false;
|
||||
|
||||
IResourceDelta[] subdeltas = delta.getAffectedChildren();
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.files.ui.resources;
|
||||
|
@ -139,7 +140,7 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener
|
|||
{
|
||||
String mappedHostPath = properties.getResolvedMountedRemoteFilePath();
|
||||
String mappedHostName = properties.getResolvedMountedRemoteFileHost();
|
||||
String systemRemotePath = SystemRemoteEditManager.getDefault().getMountPathFor(mappedHostName, mappedHostPath);
|
||||
String systemRemotePath = SystemRemoteEditManager.getInstance().getMountPathFor(mappedHostName, mappedHostPath);
|
||||
|
||||
if (systemRemotePath == null)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* Michael Scharf (Wind River) - Fix 163844: InvalidThreadAccess in checkForCollision
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.files.ui.resources;
|
||||
|
@ -86,7 +87,7 @@ public class UniversalFileTransferUtility
|
|||
{
|
||||
static final boolean doCompressedTransfer = true;//false;
|
||||
|
||||
static final String _rootPath = SystemRemoteEditManager.getDefault().getRemoteEditProjectLocation().makeAbsolute().toOSString();
|
||||
static final String _rootPath = SystemRemoteEditManager.getInstance().getRemoteEditProjectLocation().makeAbsolute().toOSString();
|
||||
|
||||
public static class RenameStatus extends Status {
|
||||
|
||||
|
@ -564,7 +565,7 @@ public class UniversalFileTransferUtility
|
|||
long remoteModifiedStamp = srcFileOrFolder.lastModified();
|
||||
|
||||
boolean usedBin = properties.getUsedBinaryTransfer();
|
||||
boolean shouldUseBin = SystemFileTransferModeRegistry.getDefault().isBinary(srcFileOrFolder);
|
||||
boolean shouldUseBin = SystemFileTransferModeRegistry.getInstance().isBinary(srcFileOrFolder);
|
||||
if (storedModifiedStamp == remoteModifiedStamp && (usedBin == shouldUseBin))
|
||||
{
|
||||
return tempFile;
|
||||
|
@ -594,7 +595,7 @@ public class UniversalFileTransferUtility
|
|||
}
|
||||
if (tempFile.exists())
|
||||
{
|
||||
if (SystemFileTransferModeRegistry.getDefault().isText(srcFileOrFolder))
|
||||
if (SystemFileTransferModeRegistry.getInstance().isText(srcFileOrFolder))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -642,7 +643,7 @@ public class UniversalFileTransferUtility
|
|||
}
|
||||
|
||||
// encoding conversion required if it a text file but not an xml file
|
||||
boolean isBinary = SystemFileTransferModeRegistry.getDefault().isBinary(file) || SystemEncodingUtil.getInstance().isXML(file.getAbsolutePath());
|
||||
boolean isBinary = SystemFileTransferModeRegistry.getInstance().isBinary(file) || SystemEncodingUtil.getInstance().isXML(file.getAbsolutePath());
|
||||
boolean isEncodingConversionRequired = !isBinary;
|
||||
|
||||
inputStream = new FileInputStream(file);
|
||||
|
@ -1260,7 +1261,7 @@ public class UniversalFileTransferUtility
|
|||
|
||||
String srcCharSet = null;
|
||||
|
||||
boolean isText = SystemFileTransferModeRegistry.getDefault().isText(newPath);
|
||||
boolean isText = SystemFileTransferModeRegistry.getInstance().isText(newPath);
|
||||
if (isText)
|
||||
{
|
||||
try
|
||||
|
@ -1739,7 +1740,7 @@ public class UniversalFileTransferUtility
|
|||
*/
|
||||
public static IResource getTempFileFor(IRemoteFile srcFileOrFolder)
|
||||
{
|
||||
SystemRemoteEditManager editMgr = SystemRemoteEditManager.getDefault();
|
||||
SystemRemoteEditManager editMgr = SystemRemoteEditManager.getInstance();
|
||||
if (!editMgr.doesRemoteEditProjectExist())
|
||||
{
|
||||
editMgr.getRemoteEditProject();
|
||||
|
@ -1811,7 +1812,7 @@ public class UniversalFileTransferUtility
|
|||
*/
|
||||
public static IResource getTempFileFor(File srcFileOrFolder)
|
||||
{
|
||||
SystemRemoteEditManager editMgr = SystemRemoteEditManager.getDefault();
|
||||
SystemRemoteEditManager editMgr = SystemRemoteEditManager.getInstance();
|
||||
if (!editMgr.doesRemoteEditProjectExist())
|
||||
{
|
||||
editMgr.getRemoteEditProject();
|
||||
|
@ -1935,7 +1936,7 @@ public class UniversalFileTransferUtility
|
|||
String hostname = subsystem.getHost().getHostName();
|
||||
if (subsystem.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$
|
||||
{
|
||||
String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
|
||||
String result = SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath);
|
||||
return result;
|
||||
}
|
||||
return hostname;
|
||||
|
@ -1943,7 +1944,7 @@ public class UniversalFileTransferUtility
|
|||
|
||||
public static String getActualHostFor(String hostname, String remotePath)
|
||||
{
|
||||
return SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
|
||||
return SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath);
|
||||
}
|
||||
|
||||
private static void refreshResourceInWorkspace(IResource parent)
|
||||
|
@ -1969,7 +1970,7 @@ public class UniversalFileTransferUtility
|
|||
String hostname = subsystem.getHost().getHostName();
|
||||
if (subsystem.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$
|
||||
{
|
||||
String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
|
||||
String result = SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath);
|
||||
if (!result.equals(hostname))
|
||||
{
|
||||
return true;
|
||||
|
@ -1980,7 +1981,7 @@ public class UniversalFileTransferUtility
|
|||
|
||||
protected static boolean isRemoteFileMounted(String hostname, String remotePath)
|
||||
{
|
||||
String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath);
|
||||
String result = SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath);
|
||||
|
||||
if (!result.equals(hostname)) {
|
||||
return true;
|
||||
|
@ -1992,14 +1993,14 @@ public class UniversalFileTransferUtility
|
|||
protected static String getWorkspaceRemotePath(ISubSystem subsystem, String remotePath) {
|
||||
|
||||
if (subsystem != null && subsystem.getHost().getSystemType().getName().equals("Local")) { //$NON-NLS-1$
|
||||
return SystemRemoteEditManager.getDefault().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath);
|
||||
return SystemRemoteEditManager.getInstance().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath);
|
||||
}
|
||||
|
||||
return remotePath;
|
||||
}
|
||||
|
||||
protected static String getWorkspaceRemotePath(String hostname, String remotePath) {
|
||||
return SystemRemoteEditManager.getDefault().getWorkspacePathFor(hostname, remotePath);
|
||||
return SystemRemoteEditManager.getInstance().getWorkspacePathFor(hostname, remotePath);
|
||||
}
|
||||
|
||||
protected static RenameStatus checkForCollision(SystemRemoteResourceSet existingFiles, IRemoteFile targetFolder, String oldName, String oldPath)
|
||||
|
|
|
@ -52,7 +52,7 @@ public class Activator extends AbstractUIPlugin
|
|||
|
||||
// refresh the remote edit project at plugin startup, to ensure
|
||||
// it's never closed
|
||||
SystemRemoteEditManager.getDefault().refreshRemoteEditProject();
|
||||
SystemRemoteEditManager.getInstance().refreshRemoteEditProject();
|
||||
|
||||
// universal temp file listener
|
||||
_tempFileListener = SystemUniversalTempFileListener.getListener();
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.actions;
|
||||
|
@ -221,7 +222,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
|
|||
String newPath = targetFolder.getAbsolutePath() + "/" + newName; //$NON-NLS-1$
|
||||
if (srcFileOrFolder.isFile())
|
||||
{
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getInstance();
|
||||
// if remote edit project doesn't exist, create it
|
||||
if (!mgr.doesRemoteEditProjectExist())
|
||||
mgr.getRemoteEditProject();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 2007 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
|
||||
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* David Dykstal (IBM) - 176488: adding some text for the cache limit checkbox
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.propertypages;
|
||||
|
@ -75,7 +76,6 @@ import org.eclipse.ui.dialogs.ListSelectionDialog;
|
|||
import org.eclipse.ui.model.AdaptableList;
|
||||
import org.eclipse.ui.model.WorkbenchContentProvider;
|
||||
|
||||
|
||||
/**
|
||||
* Preference page for generic Remote System cache preferences
|
||||
*/
|
||||
|
@ -266,7 +266,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe
|
|||
{
|
||||
public void run(IProgressMonitor monitor)
|
||||
{
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getInstance();
|
||||
// if no temp file project, nothing to do
|
||||
if (!mgr.doesRemoteEditProjectExist())
|
||||
{
|
||||
|
@ -476,7 +476,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe
|
|||
|
||||
protected boolean getDirtyReplicas(List results)
|
||||
{
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getInstance();
|
||||
IProject tempFilesProject = mgr.getRemoteEditProject();
|
||||
if (!getDirtyReplicas(tempFilesProject, results))
|
||||
{
|
||||
|
@ -491,7 +491,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe
|
|||
|
||||
protected boolean getDirtyEditors(List results)
|
||||
{
|
||||
SystemRemoteEditManager editMgr = SystemRemoteEditManager.getDefault();
|
||||
SystemRemoteEditManager editMgr = SystemRemoteEditManager.getInstance();
|
||||
|
||||
// if there's no temp file project, there's no dirty editors
|
||||
if (!editMgr.doesRemoteEditProjectExist())
|
||||
|
@ -595,7 +595,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe
|
|||
|
||||
protected boolean checkDirtyEditors()
|
||||
{
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getDefault();
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getInstance();
|
||||
if (!mgr.doesRemoteEditProjectExist())
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 2007 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.propertypages;
|
||||
|
@ -71,8 +71,6 @@ import org.eclipse.ui.internal.dialogs.FileExtensionDialog;
|
|||
import org.eclipse.ui.internal.registry.EditorRegistry;
|
||||
import org.eclipse.ui.internal.registry.FileEditorMapping;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* "Files" Preference page within the Remote Systems preference node.
|
||||
* This allows users to specify, per file extension, whether files are
|
||||
|
@ -129,7 +127,7 @@ public class UniversalPreferencePage
|
|||
|
||||
protected void createFieldEditors() {
|
||||
|
||||
modeRegistry = SystemFileTransferModeRegistry.getDefault();
|
||||
modeRegistry = SystemFileTransferModeRegistry.getInstance();
|
||||
editorRegistry = PlatformUI.getWorkbench().getEditorRegistry();
|
||||
|
||||
modeMappings = new ArrayList();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 2007 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.resources;
|
||||
|
@ -78,12 +78,10 @@ public class SystemRemoteEditManager
|
|||
/**
|
||||
* Get the singleton instance
|
||||
*/
|
||||
public static SystemRemoteEditManager getDefault()
|
||||
public static SystemRemoteEditManager getInstance()
|
||||
{
|
||||
|
||||
if (inst == null)
|
||||
inst = new SystemRemoteEditManager();
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.view;
|
||||
|
@ -2521,7 +2522,7 @@ public class SystemViewRemoteFileAdapter
|
|||
|
||||
String newRemotePath = file.getParentPath() + "/" + newName; //$NON-NLS-1$
|
||||
IResource localResource = null;
|
||||
if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
|
||||
if (SystemRemoteEditManager.getInstance().doesRemoteEditProjectExist())
|
||||
{
|
||||
localResource = UniversalFileTransferUtility.getTempFileFor(file);
|
||||
}
|
||||
|
@ -2966,7 +2967,7 @@ public class SystemViewRemoteFileAdapter
|
|||
|
||||
public IFile getCachedCopy(IRemoteFile remoteFile) throws SystemMessageException
|
||||
{
|
||||
if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist())
|
||||
if (SystemRemoteEditManager.getInstance().doesRemoteEditProjectExist())
|
||||
{
|
||||
IResource replica = UniversalFileTransferUtility.getTempFileFor(remoteFile);
|
||||
if (replica != null && replica.exists())
|
||||
|
@ -3206,7 +3207,7 @@ public class SystemViewRemoteFileAdapter
|
|||
|
||||
if (subsystem != null) {
|
||||
IHost host = subsystem.getHost();
|
||||
ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
|
||||
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
|
||||
|
||||
ISubSystem[] subsystems = registry.getSubSystems(host);
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ public class SystemFileTransferModeRegistry implements ISystemFileTransferModeRe
|
|||
/**
|
||||
* Get the singleton instance
|
||||
*/
|
||||
public static SystemFileTransferModeRegistry getDefault() {
|
||||
public static SystemFileTransferModeRegistry getInstance() {
|
||||
|
||||
if (instance == null) {
|
||||
instance = new SystemFileTransferModeRegistry();
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
* Martin Oberhuber (Wind River) - Fix 158534 - NPE in upload/download after conflict
|
||||
* Martin Oberhuber (Wind River) - Fix 162962 - recursive removeCachedRemoteFile()
|
||||
* Martin Oberhuber (Wind River) - [168596] FileServiceSubSystem.isCaseSensitive()
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
@ -56,9 +56,6 @@ import org.eclipse.rse.ui.RSEUIPlugin;
|
|||
import org.eclipse.rse.ui.messages.SystemMessageDialog;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
|
||||
|
||||
|
||||
public final class FileServiceSubSystem extends RemoteFileSubSystem implements IFileServiceSubSystem
|
||||
{
|
||||
protected ILanguageUtilityFactory _languageUtilityFactory;
|
||||
|
@ -471,7 +468,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
protected boolean isBinary(String localEncoding, String hostEncoding, String remotePath)
|
||||
{
|
||||
boolean isText = !hostEncoding.equals(localEncoding) &&
|
||||
SystemFileTransferModeRegistry.getDefault().isText(remotePath) &&
|
||||
SystemFileTransferModeRegistry.getInstance().isText(remotePath) &&
|
||||
!SystemEncodingUtil.getInstance().isXML(remotePath) ;
|
||||
return !isText;
|
||||
}
|
||||
|
|
|
@ -12,10 +12,11 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.core.subsystems;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
@ -43,7 +44,6 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
|||
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
|
||||
import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* A remote file represents a named file on a remote file system. This class
|
||||
* works with remote file names that do not include the preceding "<connectionName/subsystemName>"
|
||||
|
@ -371,7 +371,7 @@ public abstract class RemoteFile implements IRemoteFile, IAdaptable, Comparable
|
|||
if (isDirectory())
|
||||
return false;
|
||||
else
|
||||
return SystemFileTransferModeRegistry.getDefault().isBinary(this);
|
||||
return SystemFileTransferModeRegistry.getInstance().isBinary(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -382,7 +382,7 @@ public abstract class RemoteFile implements IRemoteFile, IAdaptable, Comparable
|
|||
if (isDirectory())
|
||||
return false;
|
||||
else
|
||||
return SystemFileTransferModeRegistry.getDefault().isText(this);
|
||||
return SystemFileTransferModeRegistry.getInstance().isText(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.dstore;
|
||||
|
@ -120,18 +120,18 @@ public class DStoreFileSubSystemConfiguration extends FileServiceSubSystemConfig
|
|||
|
||||
public void setConnectorService(IHost host, IConnectorService connectorService)
|
||||
{
|
||||
DStoreConnectorServiceManager.getTheUniversalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
DStoreConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
}
|
||||
|
||||
public IConnectorService getConnectorService(IHost host)
|
||||
{
|
||||
return DStoreConnectorServiceManager.getTheUniversalSystemManager().getConnectorService(host, getServiceImplType());
|
||||
return DStoreConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
|
||||
}
|
||||
|
||||
public IFileService createFileService(IHost host)
|
||||
{
|
||||
DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
|
||||
return new DStoreFileService(connectorService, SystemFileTransferModeRegistry.getDefault(), RSEUIPlugin.getDefault());
|
||||
return new DStoreFileService(connectorService, SystemFileTransferModeRegistry.getInstance(), RSEUIPlugin.getDefault());
|
||||
}
|
||||
|
||||
public ISearchService createSearchService(IHost host)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2007 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.subsystems.files.ftp.connectorservice;
|
||||
|
@ -29,7 +29,7 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
|
|||
* There should be only one of these instantiated.
|
||||
* The job of this manager is to manage and return IConnectorService objects.
|
||||
* It ensures there is only ever one per unique SystemConnection,
|
||||
* so that both the file and cmd subsystems can share the same system object.
|
||||
* so that both the file and command subsystems can share the same system object.
|
||||
*/
|
||||
public class FTPConnectorServiceManager extends AbstractConnectorServiceManager
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ public class FTPConnectorServiceManager extends AbstractConnectorServiceManager
|
|||
/**
|
||||
* Return singleton instance of this class
|
||||
*/
|
||||
public static FTPConnectorServiceManager getDefault()
|
||||
public static FTPConnectorServiceManager getInstance()
|
||||
{
|
||||
if (inst == null)
|
||||
inst = new FTPConnectorServiceManager();
|
||||
|
|
|
@ -107,11 +107,11 @@ public class FTPFileSubSystemConfiguration extends FileServiceSubSystemConfigura
|
|||
|
||||
public IConnectorService getConnectorService(IHost host)
|
||||
{
|
||||
return FTPConnectorServiceManager.getDefault().getConnectorService(host, getServiceImplType());
|
||||
return FTPConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
|
||||
}
|
||||
public void setConnectorService(IHost host, IConnectorService connectorService)
|
||||
{
|
||||
FTPConnectorServiceManager.getDefault().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
FTPConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2006, 2007 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.local;
|
||||
|
@ -206,17 +206,17 @@ public class LocalFileSubSystemConfiguration extends FileServiceSubSystemConfigu
|
|||
|
||||
public IConnectorService getConnectorService(IHost host)
|
||||
{
|
||||
return LocalConnectorServiceManager.getTheLocalSystemManager().getConnectorService(host, getServiceImplType());
|
||||
return LocalConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
|
||||
}
|
||||
|
||||
public void setConnectorService(IHost host, IConnectorService connectorService)
|
||||
{
|
||||
LocalConnectorServiceManager.getTheLocalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
LocalConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
}
|
||||
|
||||
public IFileService createFileService(IHost host)
|
||||
{
|
||||
return new LocalFileService(SystemFileTransferModeRegistry.getDefault());
|
||||
return new LocalFileService(SystemFileTransferModeRegistry.getInstance());
|
||||
}
|
||||
|
||||
public ISearchService createSearchService(IHost host)
|
||||
|
|
|
@ -111,12 +111,12 @@ public class DStoreProcessSubSystemConfiguration extends ProcessServiceSubSystem
|
|||
*/
|
||||
public IConnectorService getConnectorService(IHost host)
|
||||
{
|
||||
return DStoreConnectorServiceManager.getTheUniversalSystemManager().getConnectorService(host, getServiceImplType());
|
||||
return DStoreConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
|
||||
}
|
||||
|
||||
public void setConnectorService(IHost host, IConnectorService connectorService)
|
||||
{
|
||||
DStoreConnectorServiceManager.getTheUniversalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
DStoreConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
}
|
||||
|
||||
public Class getServiceImplType()
|
||||
|
|
|
@ -99,7 +99,7 @@ public class LocalProcessSubSystemConfiguration extends ProcessServiceSubSystemC
|
|||
*/
|
||||
public IConnectorService getConnectorService(IHost host)
|
||||
{
|
||||
return LocalConnectorServiceManager.getTheLocalSystemManager().getConnectorService(host, getServiceImplType());
|
||||
return LocalConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -125,7 +125,7 @@ public class LocalProcessSubSystemConfiguration extends ProcessServiceSubSystemC
|
|||
|
||||
public void setConnectorService(IHost host, IConnectorService connectorService)
|
||||
{
|
||||
LocalConnectorServiceManager.getTheLocalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
LocalConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
}
|
||||
|
||||
public Class getServiceImplType()
|
||||
|
|
|
@ -77,12 +77,12 @@ public class DStoreShellSubSystemConfiguration extends ShellServiceSubSystemConf
|
|||
|
||||
public IConnectorService getConnectorService(IHost host)
|
||||
{
|
||||
return DStoreConnectorServiceManager.getTheUniversalSystemManager().getConnectorService(host, getServiceImplType());
|
||||
return DStoreConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
|
||||
}
|
||||
|
||||
public void setConnectorService(IHost host, IConnectorService connectorService)
|
||||
{
|
||||
DStoreConnectorServiceManager.getTheUniversalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
DStoreConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
}
|
||||
|
||||
public IShellService createShellService(IHost host)
|
||||
|
|
|
@ -98,7 +98,7 @@ public class LocalShellSubSystemConfiguration extends ShellServiceSubSystemConfi
|
|||
|
||||
public IConnectorService getConnectorService(IHost host)
|
||||
{
|
||||
return LocalConnectorServiceManager.getTheLocalSystemManager().getConnectorService(host, getServiceImplType());
|
||||
return LocalConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
|
||||
}
|
||||
|
||||
public IShellService createShellService(IHost host)
|
||||
|
@ -117,7 +117,7 @@ public class LocalShellSubSystemConfiguration extends ShellServiceSubSystemConfi
|
|||
|
||||
public void setConnectorService(IHost host, IConnectorService connectorService)
|
||||
{
|
||||
LocalConnectorServiceManager.getTheLocalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
LocalConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
|
||||
}
|
||||
|
||||
public Class getServiceImplType()
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
* David Dykstal (IBM) - moved SystemPreferencesManager to a new package
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
@ -1005,7 +1006,7 @@ public class SystemView extends SafeTreeViewer
|
|||
menu.add(new Separator(ISystemContextMenuConstants.GROUP_PROPERTIES)); // Properties
|
||||
|
||||
// [177537] [api] Dynamic system type provider need a hook to add dynamic system type specific menu groups.
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
for (int i = 0; i < systemTypes.length; i++) {
|
||||
IRSESystemType systemType = systemTypes[i];
|
||||
Object adapter = systemType.getAdapter(IRSESystemType.class);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
@ -719,7 +720,7 @@ public class SystemViewConnectionAdapter
|
|||
|
||||
protected boolean existsMoreThanOneLocalConnection()
|
||||
{
|
||||
IRSESystemType localType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
IRSESystemType localType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
IHost[] localCons = RSEUIPlugin.getTheSystemRegistry().getHostsBySystemType(localType);
|
||||
return localCons.length > 1;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2003, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2003, 2007 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
@ -22,9 +22,7 @@ package org.eclipse.rse.internal.ui.view;
|
|||
*/
|
||||
public class SystemViewDummyObject
|
||||
{
|
||||
|
||||
|
||||
private static SystemViewDummyObject singleton;
|
||||
private static SystemViewDummyObject _instance;
|
||||
|
||||
/**
|
||||
* Constructor for SystemViewDummyObject.
|
||||
|
@ -37,11 +35,11 @@ public class SystemViewDummyObject
|
|||
/**
|
||||
* Return the singleton of this
|
||||
*/
|
||||
public static SystemViewDummyObject getSingleton()
|
||||
public static SystemViewDummyObject getInstance()
|
||||
{
|
||||
if (singleton == null)
|
||||
singleton = new SystemViewDummyObject();
|
||||
return singleton;
|
||||
if (_instance == null)
|
||||
_instance = new SystemViewDummyObject();
|
||||
return _instance;
|
||||
}
|
||||
|
||||
}
|
|
@ -15,6 +15,7 @@
|
|||
* David Dykstal (IBM) - moved SystemPreferencesManager to a new package
|
||||
* Martin Oberhuber (Wind River) - Replace SystemRegistry by ISystemRegistry
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
@ -48,7 +49,6 @@ import org.eclipse.jface.viewers.ISelectionProvider;
|
|||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||
import org.eclipse.jface.viewers.StructuredSelection;
|
||||
import org.eclipse.jface.viewers.TreeExpansionEvent;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.jface.window.IShellProvider;
|
||||
import org.eclipse.rse.core.IRSESystemType;
|
||||
|
@ -673,7 +673,7 @@ public class SystemViewPart
|
|||
populateSystemViewPulldownMenu(menuMgr, getShell(), showConnectionActions, this, systemView);
|
||||
|
||||
// [179181] [api] Dynamic system type provider need a hook to add dynamic system type specific toolbar groups.
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
for (int i = 0; i < systemTypes.length; i++) {
|
||||
IRSESystemType systemType = systemTypes[i];
|
||||
Object adapter = systemType.getAdapter(IRSESystemType.class);
|
||||
|
@ -1187,9 +1187,9 @@ public class SystemViewPart
|
|||
{
|
||||
RemoteObject ro = (RemoteObject)remoteElements.elementAt(idx);
|
||||
//event = new SystemResourceChangeEvent(ro.name,ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE,
|
||||
// SystemViewDummyObject.getSingleton()); // This tells SystemView to expand this remote object, but don't select a child
|
||||
// SystemViewDummyObject.getInstance()); // This tells SystemView to expand this remote object, but don't select a child
|
||||
//systemView.systemResourceChanged(event);
|
||||
systemView.refreshRemoteObject(ro.name, SystemViewDummyObject.getSingleton(), true);
|
||||
systemView.refreshRemoteObject(ro.name, SystemViewDummyObject.getInstance(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1668,7 +1668,7 @@ public class SystemViewPart
|
|||
{
|
||||
RemoteObject ro = (RemoteObject) remoteElements.elementAt(idx);
|
||||
//event = new SystemResourceChangeEvent(ro.name,ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE,
|
||||
// SystemViewDummyObject.getSingleton()); // This tells SystemView to expand this remote object, but don't select a child
|
||||
// SystemViewDummyObject.getInstance()); // This tells SystemView to expand this remote object, but don't select a child
|
||||
//systemView.systemResourceChanged(event);
|
||||
|
||||
// yantzi: artemis 6.0: notify subsystems that this is a restore from memento so they
|
||||
|
@ -1678,7 +1678,7 @@ public class SystemViewPart
|
|||
ro.subsystem.getCacheManager().setRestoreFromMemento(true);
|
||||
}
|
||||
|
||||
systemView.refreshRemoteObject(ro.name, SystemViewDummyObject.getSingleton(), true);
|
||||
systemView.refreshRemoteObject(ro.name, SystemViewDummyObject.getInstance(), true);
|
||||
|
||||
// yantzi: artemis 6.0: reset restore from memento flag
|
||||
if (ro.subsystem != null && ro.subsystem.supportsCaching())
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view.team;
|
||||
|
@ -376,7 +377,7 @@ public class SystemTeamViewProfileAdapter
|
|||
*/
|
||||
public ISystemValidator getNameValidator(Object element)
|
||||
{
|
||||
Vector names = RSECorePlugin.getDefault().getSystemRegistry().getSystemProfileManager().getSystemProfileNamesVector();
|
||||
Vector names = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNamesVector();
|
||||
ISystemValidator validator = new ValidatorProfileName(names);
|
||||
return validator;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* Uwe Stieber (Wind River) - bugfixing.
|
||||
* David Dykstal (IBM) - 168870: move core function from UI to core
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui;
|
||||
|
@ -112,7 +113,7 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi
|
|||
// new support to allow products to not pre-create a local connection
|
||||
if (SystemResourceManager.isFirstTime() && SystemPreferencesManager.getShowLocalConnection()) {
|
||||
// create the connection only if the local system type is enabled!
|
||||
IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
if (systemType != null) {
|
||||
RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(IRSESystemType.class));
|
||||
if (adapter != null && adapter.isEnabled(systemType)) {
|
||||
|
@ -751,13 +752,6 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi
|
|||
return getDefault().getSystemRegistryInternal();
|
||||
}
|
||||
|
||||
public static IRSEPersistenceManager getThePersistenceManager()
|
||||
{
|
||||
return RSECorePlugin.getThePersistenceManager();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A static version for convenience
|
||||
* Returns the master profile manager singleton.
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - Bug 149151: New Connection first page should use a Listbox for systemtype
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui;
|
||||
|
@ -1112,9 +1113,9 @@ public class SystemWidgetHelpers {
|
|||
*/
|
||||
public static IRSESystemType[] getValidSystemTypes(String[] restrictIds) {
|
||||
if (validSystemTypes==null) {
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
ArrayList list = new ArrayList(systemTypes.length);
|
||||
ISystemRegistry sr = RSECorePlugin.getDefault().getSystemRegistry();
|
||||
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
||||
for (int i=0; i<systemTypes.length; i++) {
|
||||
ISubSystemConfiguration[] configurations = sr.getSubSystemConfigurationsBySystemType(systemTypes[i], false);
|
||||
if (configurations != null && configurations.length > 0) {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* David Dykstal (IBM) - moved SystemPreferencesManager to a new package
|
||||
* - created and used RSEPreferencesManager
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
@ -316,7 +317,7 @@ public class SystemTypeFieldEditor extends FieldEditor
|
|||
* @return The list of system types known to be in existence
|
||||
*/
|
||||
private IRSESystemType[] getSystemTypes(boolean restoreDefaults) {
|
||||
IRSESystemType[] types = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] types = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
ArrayList list = new ArrayList();
|
||||
if (systemTypes == null || restoreDefaults) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
|
@ -527,7 +528,7 @@ public class SystemTypeFieldEditor extends FieldEditor
|
|||
// }
|
||||
// }
|
||||
// // find this system type in the array...
|
||||
// IRSESystemType matchingType = RSECorePlugin.getDefault().getRegistry().getSystemType(key);
|
||||
// IRSESystemType matchingType = RSECorePlugin.getTheCoreRegistry().getSystemType(key);
|
||||
// RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(matchingType.getAdapter(IRSESystemType.class));
|
||||
//
|
||||
// // update this system type's attributes as per preferences...
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2007 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
|
||||
*
|
||||
* Contributors:
|
||||
* David Dykstal (IBM) - Initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.validators;
|
||||
|
||||
import java.util.Vector;
|
||||
|
@ -17,7 +28,7 @@ public class ValidatorFactory {
|
|||
* @return the validator
|
||||
*/
|
||||
public static ISystemValidator getProfileNameValidator(String profileName) {
|
||||
ISystemProfileManager manager = RSECorePlugin.getDefault().getSystemRegistry().getSystemProfileManager();
|
||||
ISystemProfileManager manager = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager();
|
||||
Vector profileNames = manager.getSystemProfileNamesVector();
|
||||
if (profileName != null) profileNames.remove(profileName);
|
||||
ISystemValidator nameValidator = new ValidatorProfileName(profileNames);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.wizards;
|
||||
|
@ -133,7 +134,7 @@ public abstract class AbstractSystemNewConnectionWizardPage extends AbstractSyst
|
|||
RSEAbstractNewConnectionWizard ourWizard = getNewConnectionWizard();
|
||||
if (ourWizard != null) {
|
||||
//String[] systemTypes = parentFactory.getSystemTypes();
|
||||
//IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypes[0]);
|
||||
//IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemType(systemTypes[0]);
|
||||
IWizardPage wizardPage = ourWizard.getStartingPage();
|
||||
|
||||
if (wizardPage instanceof RSEDefaultNewConnectionWizardMainPage) {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* Javier Montalvo Orús (Symbian) - Bug 158555 - newConnectionWizardDelegates can only be used once
|
||||
* Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.wizards.newconnection;
|
||||
|
@ -404,7 +405,7 @@ public class RSEMainNewConnectionWizard extends Wizard implements INewWizard, IS
|
|||
if (dialogSettings != null) {
|
||||
String systemTypeId = dialogSettings.get(LAST_SELECTED_SYSTEM_TYPE_ID);
|
||||
if (systemTypeId != null) {
|
||||
IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(systemTypeId);
|
||||
IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(systemTypeId);
|
||||
if (systemType != null) {
|
||||
setSelection(new StructuredSelection(systemType));
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Uwe Stieber (Wind River) - initial API and implementation.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.ui.wizards.newconnection;
|
||||
|
||||
|
@ -59,14 +60,14 @@ public class RSENewConnectionWizardDescriptor extends RSEWizardDescriptor implem
|
|||
// If the subsystem configuration supports all system types, just add all
|
||||
// currently registered system types to th resolved list
|
||||
if (systemTypeMatcher.supportsAllSystemTypes()) {
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
for (int i = 0; i < systemTypes.length; i++) resolvedSystemTypeIds.add(systemTypes[i].getId());
|
||||
} else {
|
||||
// We have to match the given lists of system type ids against
|
||||
// the list of available system types. As the list of system types cannot
|
||||
// change ones it has been initialized, we filter out the not matching ones
|
||||
// here directly.
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
for (int i = 0; i < systemTypes.length; i++) {
|
||||
IRSESystemType systemType = systemTypes[i];
|
||||
RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(IRSESystemType.class));
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Uwe Stieber (Wind River) - initial API and implementation.
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.ui.wizards.newconnection;
|
||||
|
||||
|
@ -79,7 +80,7 @@ public class RSENewConnectionWizardSelectionTreeDataManager extends RSEAbstractW
|
|||
|
||||
// The new connection wizard selection is combining system types
|
||||
// with registered new connection wizard.
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
for (int i = 0; i < systemTypes.length; i++) {
|
||||
IRSESystemType systemType = systemTypes[i];
|
||||
// for the system type, lookup the corresponding wizard descriptor
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.internal.model;
|
||||
|
@ -60,7 +61,7 @@ public class SystemNewConnectionPromptObject implements ISystemPromptableObject,
|
|||
* Constructor
|
||||
*/
|
||||
public SystemNewConnectionPromptObject() {
|
||||
setSystemTypes(RSECorePlugin.getDefault().getRegistry().getSystemTypes());
|
||||
setSystemTypes(RSECorePlugin.getTheCoreRegistry().getSystemTypes());
|
||||
isRootPrompt = true;
|
||||
}
|
||||
|
||||
|
@ -125,7 +126,7 @@ public class SystemNewConnectionPromptObject implements ISystemPromptableObject,
|
|||
// Basically, once initialized, the list of system types cannot change, but
|
||||
// it doesn't hurt to check this in case it changes because of future extensions.
|
||||
if (isRootPrompt) {
|
||||
systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
}
|
||||
|
||||
// Note: Do not filter out the disabled system types here. The system
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* Tobias Schwarz (Wind River) - [183134] getLocalHost() does not return Local
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.internal.model;
|
||||
|
@ -1648,7 +1649,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
|||
public IHost getLocalHost()
|
||||
{
|
||||
IHost localConn = null;
|
||||
IRSESystemType localType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
IRSESystemType localType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
IHost[] conns = getHostsBySystemType(localType);
|
||||
if (conns != null && conns.length > 0) return conns[0];
|
||||
else return localConn;
|
||||
|
@ -2128,7 +2129,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
|||
|
||||
try
|
||||
{
|
||||
IRSESystemType localType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
IRSESystemType localType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
localConn = createHost(
|
||||
profile.getName(), localType,
|
||||
name, // connection name
|
||||
|
@ -3280,7 +3281,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
|||
*/
|
||||
public boolean save()
|
||||
{
|
||||
return RSEUIPlugin.getThePersistenceManager().commitProfiles();
|
||||
return RSECorePlugin.getThePersistenceManager().commitProfiles();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3344,7 +3345,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemViewInputProvid
|
|||
return rule == this;
|
||||
}
|
||||
public ISystemFilterStartHere getSystemFilterStartHere() {
|
||||
return SystemFilterStartHere.getDefault();
|
||||
return SystemFilterStartHere.getInstance();
|
||||
}
|
||||
|
||||
}//SystemRegistryImpl
|
|
@ -1208,7 +1208,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
|
|||
// that are stored with a subsystem.
|
||||
//SystemFilterPoolManager[] relatedFilterPoolManagers =
|
||||
// getReferencableFilterPoolManagers(conn.getSystemProfile());
|
||||
ISystemFilterPoolReferenceManager fprMgr = SystemFilterStartHere.getDefault().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
|
||||
ISystemFilterPoolReferenceManager fprMgr = SystemFilterStartHere.getInstance().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
|
||||
subsys.setFilterPoolReferenceManager(fprMgr);
|
||||
ISystemFilterPoolManager defaultFilterPoolManager = getFilterPoolManager(conn.getSystemProfile());
|
||||
fprMgr.setDefaultSystemFilterPoolManager(defaultFilterPoolManager);
|
||||
|
@ -1301,7 +1301,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
|
|||
// that are stored with a subsystem.
|
||||
//SystemFilterPoolManager[] relatedFilterPoolManagers =
|
||||
// getReferencableFilterPoolManagers(newConnection.getSystemProfile());
|
||||
ISystemFilterPoolReferenceManager newRefMgr = SystemFilterStartHere.getDefault().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
|
||||
ISystemFilterPoolReferenceManager newRefMgr = SystemFilterStartHere.getInstance().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
|
||||
ISystemFilterPoolManager defaultFilterPoolManager = null;
|
||||
if (copyProfileOperation)
|
||||
defaultFilterPoolManager = getFilterPoolManager(newConnection.getSystemProfile());
|
||||
|
@ -2868,7 +2868,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
|
|||
// that are stored with a subsystem.
|
||||
//SystemFilterPoolManager[] relatedFilterPoolManagers =
|
||||
// getReferencableFilterPoolManagers(conn.getSystemProfile());
|
||||
ISystemFilterPoolReferenceManager fprMgr = SystemFilterStartHere.getDefault().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
|
||||
ISystemFilterPoolReferenceManager fprMgr = SystemFilterStartHere.getInstance().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName(), filterNamingPolicy);
|
||||
subsys.setFilterPoolReferenceManager(fprMgr);
|
||||
ISystemFilterPoolManager defaultFilterPoolManager = getFilterPoolManager(conn.getSystemProfile());
|
||||
fprMgr.setDefaultSystemFilterPoolManager(defaultFilterPoolManager);
|
||||
|
|
|
@ -41,6 +41,6 @@ public class LocalCompileManager extends UniversalCompileManager {
|
|||
* Return the substitution variables supported by compile commands managed by this manager.
|
||||
*/
|
||||
public SystemCmdSubstVarList getSubstitutionVariableList() {
|
||||
return UniversalCompileSubstList.getSingleton();
|
||||
return UniversalCompileSubstList.getInstance();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class UniversalCompileManager extends SystemCompileManager {
|
|||
* Return the substitution variables supported by compile commands managed by this manager.
|
||||
*/
|
||||
public SystemCmdSubstVarList getSubstitutionVariableList() {
|
||||
return UniversalCompileSubstList.getSingleton();
|
||||
return UniversalCompileSubstList.getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
package org.eclipse.rse.internal.useractions.files.compile;
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
|
@ -9,7 +7,10 @@ package org.eclipse.rse.internal.useractions.files.compile;
|
|||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.useractions.files.compile;
|
||||
|
||||
import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
|
||||
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
|
||||
|
||||
|
@ -38,7 +39,7 @@ public class UniversalCompileSubstList extends SystemCmdSubstVarList {
|
|||
|
||||
/**
|
||||
* Constructor .
|
||||
* Not to be used directly. Rather, use getSingleton().
|
||||
* Not to be used directly. Rather, use {@link #getInstance()}.
|
||||
*/
|
||||
UniversalCompileSubstList() {
|
||||
super(UNIVERSAL_FILES_VARNAMES, UNIVERSAL_FILES_DESCRIPTIONS);
|
||||
|
@ -47,7 +48,7 @@ public class UniversalCompileSubstList extends SystemCmdSubstVarList {
|
|||
/**
|
||||
* Return the singleton of this object. No need ever for more than one instance
|
||||
*/
|
||||
public static UniversalCompileSubstList getSingleton() {
|
||||
public static UniversalCompileSubstList getInstance() {
|
||||
if (inst == null) inst = new UniversalCompileSubstList();
|
||||
return inst;
|
||||
}
|
||||
|
|
|
@ -612,9 +612,9 @@ public class UDActionSubsystemFiles extends SystemUDActionSubsystem {
|
|||
*/
|
||||
public SystemCmdSubstVarList getActionSubstVarList(int actionDomainType) {
|
||||
if (actionDomainType == DOMAIN_FOLDER)
|
||||
return UDSubstListFolders.getSingleton();
|
||||
return UDSubstListFolders.getInstance();
|
||||
else if (actionDomainType == DOMAIN_FILE)
|
||||
return UDSubstListFiles.getSingleton();
|
||||
return UDSubstListFiles.getInstance();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
package org.eclipse.rse.internal.useractions.files.uda;
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
|
@ -9,7 +7,10 @@ package org.eclipse.rse.internal.useractions.files.uda;
|
|||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.useractions.files.uda;
|
||||
|
||||
import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
|
||||
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
|
||||
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDASubstVarListCommon;
|
||||
|
@ -43,16 +44,16 @@ public class UDSubstListCommonFiles extends SystemCmdSubstVarList {
|
|||
|
||||
/**
|
||||
* Constructor .
|
||||
* Not to be used directly. Rather, use getSingleton().
|
||||
* Not to be used directly. Rather, use {@link #getInstance()}.
|
||||
*/
|
||||
UDSubstListCommonFiles() {
|
||||
super(SystemUDASubstVarListCommon.getSingleton(), COMMON_VARNAMES, COMMON_DESCRIPTIONS);
|
||||
super(SystemUDASubstVarListCommon.getInstance(), COMMON_VARNAMES, COMMON_DESCRIPTIONS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the singleton of this object. No need ever for more than one instance
|
||||
*/
|
||||
public static UDSubstListCommonFiles getSingleton() {
|
||||
public static UDSubstListCommonFiles getInstance() {
|
||||
if (inst == null) inst = new UDSubstListCommonFiles();
|
||||
return inst;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
package org.eclipse.rse.internal.useractions.files.uda;
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
|
@ -9,7 +7,10 @@ package org.eclipse.rse.internal.useractions.files.uda;
|
|||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.useractions.files.uda;
|
||||
|
||||
import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
|
||||
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
|
||||
|
||||
|
@ -31,17 +32,17 @@ public class UDSubstListFiles extends SystemCmdSubstVarList {
|
|||
|
||||
/**
|
||||
* Constructor .
|
||||
* Not to be used directly. Rather, use getSingleton().
|
||||
* Not to be used directly. Rather, use {@link #getInstance()}.
|
||||
*/
|
||||
UDSubstListFiles() {
|
||||
super(UDSubstListCommonFiles.getSingleton(), FILE_VARNAMES, DESCRIPTIONS);
|
||||
super(UDSubstListCommonFiles.getInstance(), FILE_VARNAMES, DESCRIPTIONS);
|
||||
testForDuplicates();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the singleton of this object. No need ever for more than one instance
|
||||
*/
|
||||
public static UDSubstListFiles getSingleton() {
|
||||
public static UDSubstListFiles getInstance() {
|
||||
if (inst == null) inst = new UDSubstListFiles();
|
||||
return inst;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
package org.eclipse.rse.internal.useractions.files.uda;
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
|
@ -9,7 +7,10 @@ package org.eclipse.rse.internal.useractions.files.uda;
|
|||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.useractions.files.uda;
|
||||
|
||||
import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
|
||||
|
||||
/**
|
||||
|
@ -24,17 +25,17 @@ public class UDSubstListFolders extends SystemCmdSubstVarList {
|
|||
|
||||
/**
|
||||
* Constructor .
|
||||
* Not to be used directly. Rather, use getSingleton().
|
||||
* Not to be used directly. Rather, use {@link #getInstance()}.
|
||||
*/
|
||||
UDSubstListFolders() {
|
||||
super(UDSubstListCommonFiles.getSingleton(), FOLDER_VARNAMES, DESCRIPTIONS);
|
||||
super(UDSubstListCommonFiles.getInstance(), FOLDER_VARNAMES, DESCRIPTIONS);
|
||||
testForDuplicates();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the singleton of this object. No need ever for more than one instance
|
||||
*/
|
||||
public static UDSubstListFolders getSingleton() {
|
||||
public static UDSubstListFolders getInstance() {
|
||||
if (inst == null) inst = new UDSubstListFolders();
|
||||
return inst;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
package org.eclipse.rse.internal.useractions.ui.uda;
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
|
@ -9,7 +7,10 @@ package org.eclipse.rse.internal.useractions.ui.uda;
|
|||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.useractions.ui.uda;
|
||||
|
||||
import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
|
||||
|
||||
/**
|
||||
|
@ -30,7 +31,7 @@ public class SystemUDASubstVarListCommon extends SystemCmdSubstVarList {
|
|||
|
||||
/**
|
||||
* Constructor .
|
||||
* Not to be used directly. Rather, use getSingleton().
|
||||
* Not to be used directly. Rather, use {@link #getInstance()}.
|
||||
*/
|
||||
SystemUDASubstVarListCommon() {
|
||||
super(COMMON_VARNAMES, COMMON_VARNAME_DESCRIPTIONS);
|
||||
|
@ -39,7 +40,7 @@ public class SystemUDASubstVarListCommon extends SystemCmdSubstVarList {
|
|||
/**
|
||||
* Return the singleton of this object. No need ever for more than one instance
|
||||
*/
|
||||
public static SystemUDASubstVarListCommon getSingleton() {
|
||||
public static SystemUDASubstVarListCommon getInstance() {
|
||||
if (inst == null) inst = new SystemUDASubstVarListCommon();
|
||||
return inst;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
* Contributors:
|
||||
* Uwe Stieber (Wind River) - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.tests.core.registries;
|
||||
|
||||
|
@ -26,7 +27,7 @@ import org.eclipse.rse.tests.core.RSECoreTestCase;
|
|||
public class SubSystemConfigurationProxyTestCase extends RSECoreTestCase {
|
||||
|
||||
public void testSubSystemConfigurationProxy() {
|
||||
ISystemRegistry systemRegistry = RSECorePlugin.getDefault().getSystemRegistry();
|
||||
ISystemRegistry systemRegistry = RSECorePlugin.getTheSystemRegistry();
|
||||
assertNotNull("Failed to fetch RSE system registry instance!", systemRegistry); //$NON-NLS-1$
|
||||
|
||||
// get all subsystem configuration proxies and pick out the ones from our
|
||||
|
@ -53,7 +54,7 @@ public class SubSystemConfigurationProxyTestCase extends RSECoreTestCase {
|
|||
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
||||
|
||||
// walk through all known system types. Only "Local" and "Windows" should match!
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
assertNotNull("Failed to fetch list of registered system types!", systemTypes); //$NON-NLS-1$
|
||||
for (int j = 0; j < systemTypes.length; j++) {
|
||||
IRSESystemType systemType = systemTypes[j];
|
||||
|
@ -77,7 +78,7 @@ public class SubSystemConfigurationProxyTestCase extends RSECoreTestCase {
|
|||
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
||||
|
||||
// walk through all known system types. All system types declared by the tests plugin are expected to match
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
assertNotNull("Failed to fetch list of registered system types!", systemTypes); //$NON-NLS-1$
|
||||
for (int j = 0; j < systemTypes.length; j++) {
|
||||
IRSESystemType systemType = systemTypes[j];
|
||||
|
@ -101,7 +102,7 @@ public class SubSystemConfigurationProxyTestCase extends RSECoreTestCase {
|
|||
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
||||
|
||||
// walk through all known system types. Only "Unix" and "Linux" should match!
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
|
||||
assertNotNull("Failed to fetch list of registered system types!", systemTypes); //$NON-NLS-1$
|
||||
for (int j = 0; j < systemTypes.length; j++) {
|
||||
IRSESystemType systemType = systemTypes[j];
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
* Uwe Stieber (Wind River) - refactoring and cleanup.
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.tests.internal;
|
||||
|
||||
|
@ -223,7 +224,7 @@ public class RSEConnectionManager implements IRSEConnectionManager {
|
|||
Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid remote system ip address or dns name!", "unknown", address); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
String systemTypeId = properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID);
|
||||
Assert.assertNotSame("FAILED(findOrCreateConnection): Invalid system type!", "unknown", systemTypeId); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(systemTypeId);
|
||||
IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(systemTypeId);
|
||||
|
||||
exception = null;
|
||||
cause = null;
|
||||
|
@ -259,7 +260,7 @@ public class RSEConnectionManager implements IRSEConnectionManager {
|
|||
throw new RuntimeException(MessageFormat.format("The subsystem is connected as {0}. Disconnect before changing.", new Object[] { activeId })); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
|
||||
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
|
||||
ISubSystemConfiguration desiredConfiguration = registry.getSubSystemConfiguration(desiredConfigurationId);
|
||||
if (desiredConfiguration instanceof IServiceSubSystemConfiguration) {
|
||||
IServiceSubSystemConfiguration t = (IServiceSubSystemConfiguration)desiredConfiguration;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial API and implementation.
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.tests.persistence;
|
||||
|
@ -174,7 +175,7 @@ public class PersistenceTest extends RSECoreTestCase {
|
|||
assertNotNull(profile);
|
||||
|
||||
try {
|
||||
IRSESystemType linuxType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LINUX_ID);
|
||||
IRSESystemType linuxType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LINUX_ID);
|
||||
registry.createHost("bogus", linuxType, "myhost", "myhost.mynet.mycompany.net", null);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
* David Dykstal (IBM) - moved SystemPreferencesManager to a new package
|
||||
* - created and used RSEPreferencesManager
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.tests.preferences;
|
||||
|
@ -66,7 +67,7 @@ public class PreferencesTest extends RSECoreTestCase {
|
|||
}
|
||||
|
||||
public void testDefaultUserIds() {
|
||||
IRSECoreRegistry registry = RSECorePlugin.getDefault().getRegistry();
|
||||
IRSECoreRegistry registry = RSECorePlugin.getTheCoreRegistry();
|
||||
//TODO should we test deprecated methods as well? Probably yes...
|
||||
IRSESystemType systemTypeDeprecated = registry.getSystemType("Local"); //$NON-NLS-1$
|
||||
IRSESystemType systemType = registry.getSystemTypeById("org.eclipse.rse.systemtype.local"); //$NON-NLS-1$
|
||||
|
@ -74,7 +75,7 @@ public class PreferencesTest extends RSECoreTestCase {
|
|||
String oldValue = RSEPreferencesManager.getDefaultUserId(systemType);
|
||||
RSEPreferencesManager.setDefaultUserId(systemType, "bogus1"); //$NON-NLS-1$
|
||||
assertEquals("bogus1", RSEPreferencesManager.getDefaultUserId(systemType)); //$NON-NLS-1$
|
||||
IRSESystemType localType = RSECorePlugin.getDefault().getRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
IRSESystemType localType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
|
||||
RSEPreferencesManager.setDefaultUserId(localType, "bogus2"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
assertEquals("bogus2", RSEPreferencesManager.getDefaultUserId(systemType)); //$NON-NLS-1$
|
||||
RSEPreferencesManager.setDefaultUserId(systemType, oldValue);
|
||||
|
|
Loading…
Add table
Reference in a new issue