From 7af0ea93c094a4077b7f61f10eabe1de8cae6669 Mon Sep 17 00:00:00 2001
From: Martin Oberhuber < martin.oberhuber@windriver.com>
Date: Thu, 10 May 2007 12:40:20 +0000
Subject: [PATCH] [177523][api] Unify singleton getter methods to use
getInstance()
---
.../discovery/ServiceDiscoveryWizard.java | 3 ++-
.../engine/ServiceDiscoveryEngine.java | 5 ++--
.../discovery/view/ServiceDiscoveryView.java | 5 ++--
.../ServiceDiscoveryWizardDisplayPage.java | 9 ++++---
.../DeveloperConnectorServiceManager.html | 2 +-
.../DeveloperSubSystemConfiguration.html | 2 +-
.../DeveloperSubSystemConfiguration2.html | 2 +-
.../DaytimeConnectorServiceManager.java | 2 +-
.../DaytimeSubSystemConfiguration.java | 4 +--
.../DeveloperConnectorServiceManager.java | 2 +-
.../DeveloperSubSystemConfiguration.java | 2 +-
.../dstore/DStoreConnectorServiceManager.java | 12 ++++-----
.../local/LocalConnectorServiceManager.java | 12 ++++-----
.../rse/core/PasswordPersistenceManager.java | 3 ++-
.../org/eclipse/rse/core/RSECorePlugin.java | 25 ++++++++++++++---
.../rse/core/RSEPreferencesManager.java | 5 ++--
.../src/org/eclipse/rse/core/model/Host.java | 5 ++--
.../rse/core/model/ISystemRegistry.java | 7 ++---
.../rse/core/model/RSEModelOperation.java | 5 ++--
.../rse/core/model/SystemStartHere.java | 5 ++--
.../AbstractConnectorServiceManager.java | 10 +++----
.../AuthenticatingConnectorService.java | 7 ++---
.../filters/SystemFilterPoolReference.java | 5 ++--
.../core/filters/SystemFilterStartHere.java | 8 +++---
.../internal/core/model/SystemProfile.java | 7 ++---
.../SubSystemConfigurationProxy.java | 3 ++-
.../persistence/RSEPersistenceManager.java | 3 ++-
.../persistence/dom/RSEDOMImporter.java | 3 ++-
.../resources/SystemEditableRemoteFile.java | 11 ++++----
.../ui/resources/SystemTempFileListener.java | 6 +++--
.../SystemUniversalTempFileListener.java | 3 ++-
.../UniversalFileTransferUtility.java | 27 ++++++++++---------
.../rse/internal/files/ui/Activator.java | 2 +-
.../actions/SystemCopyRemoteFileAction.java | 3 ++-
.../SystemCachePreferencePage.java | 12 ++++-----
.../UniversalPreferencePage.java | 8 +++---
.../ui/resources/SystemRemoteEditManager.java | 8 +++---
.../ui/view/SystemViewRemoteFileAdapter.java | 7 ++---
.../model/SystemFileTransferModeRegistry.java | 2 +-
.../FileServiceSubSystem.java | 7 ++---
.../files/core/subsystems/RemoteFile.java | 8 +++---
.../DStoreFileSubSystemConfiguration.java | 8 +++---
.../FTPConnectorServiceManager.java | 8 +++---
.../ftp/FTPFileSubSystemConfiguration.java | 4 +--
.../LocalFileSubSystemConfiguration.java | 10 +++----
.../DStoreProcessSubSystemConfiguration.java | 4 +--
.../LocalProcessSubSystemConfiguration.java | 4 +--
.../DStoreShellSubSystemConfiguration.java | 4 +--
.../LocalShellSubSystemConfiguration.java | 4 +--
.../rse/internal/ui/view/SystemView.java | 3 ++-
.../ui/view/SystemViewConnectionAdapter.java | 3 ++-
.../ui/view/SystemViewDummyObject.java | 16 +++++------
.../rse/internal/ui/view/SystemViewPart.java | 12 ++++-----
.../team/SystemTeamViewProfileAdapter.java | 3 ++-
.../UI/org/eclipse/rse/ui/RSEUIPlugin.java | 10 ++-----
.../eclipse/rse/ui/SystemWidgetHelpers.java | 5 ++--
.../propertypages/SystemTypeFieldEditor.java | 5 ++--
.../rse/ui/validators/ValidatorFactory.java | 13 ++++++++-
...AbstractSystemNewConnectionWizardPage.java | 3 ++-
.../RSEMainNewConnectionWizard.java | 3 ++-
.../RSENewConnectionWizardDescriptor.java | 5 ++--
...nectionWizardSelectionTreeDataManager.java | 3 ++-
.../SystemNewConnectionPromptObject.java | 5 ++--
.../rse/ui/internal/model/SystemRegistry.java | 9 ++++---
.../subsystems/SubSystemConfiguration.java | 6 ++---
.../files/compile/LocalCompileManager.java | 2 +-
.../compile/UniversalCompileManager.java | 2 +-
.../compile/UniversalCompileSubstList.java | 9 ++++---
.../files/uda/UDActionSubsystemFiles.java | 4 +--
.../files/uda/UDSubstListCommonFiles.java | 11 ++++----
.../files/uda/UDSubstListFiles.java | 11 ++++----
.../files/uda/UDSubstListFolders.java | 11 ++++----
.../ui/uda/SystemUDASubstVarListCommon.java | 9 ++++---
.../SubSystemConfigurationProxyTestCase.java | 9 ++++---
.../tests/internal/RSEConnectionManager.java | 5 ++--
.../tests/persistence/PersistenceTest.java | 3 ++-
.../tests/preferences/PreferencesTest.java | 5 ++--
77 files changed, 278 insertions(+), 220 deletions(-)
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoveryWizard.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoveryWizard.java
index afe34f9cea6..5041d41351f 100644
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoveryWizard.java
+++ b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoveryWizard.java
@@ -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);
diff --git a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/ServiceDiscoveryEngine.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/ServiceDiscoveryEngine.java
index 5cab69811b3..92b9e9c775e 100644
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/ServiceDiscoveryEngine.java
+++ b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/ServiceDiscoveryEngine.java
@@ -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();
diff --git a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/ServiceDiscoveryView.java b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/ServiceDiscoveryView.java
index d76483f063e..c69a91a208e 100644
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/ServiceDiscoveryView.java
+++ b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/ServiceDiscoveryView.java
@@ -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) {
diff --git a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java
index c6b69b69def..b2809726383 100644
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java
+++ b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java
@@ -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;
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorServiceManager.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorServiceManager.html
index 69fe7749e6d..476613d0926 100755
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorServiceManager.html
+++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperConnectorServiceManager.html
@@ -56,7 +56,7 @@ public class DeveloperConnectorServiceManager extends
/**
* Return singleton instance
*/
- public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
+ public static DeveloperConnectorServiceManager getInstance()
{
if (inst == null)
inst = new DeveloperConnectorServiceManager();
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration.html
index 9e73c074f15..de0f498263e 100755
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration.html
+++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration.html
@@ -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) {
- return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
+ return DeveloperConnectorServiceManager.getInstance()
.getConnectorService(host, IDeveloperSubSystem.class);
}
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration2.html
index 6729261ec67..ee93878b699 100755
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration2.html
+++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperSubSystemConfiguration2.html
@@ -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);
}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java
index 5c3ae872796..c131a343bec 100644
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java
+++ b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java
@@ -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();
}
diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
index 379b81039bd..abe8e316d3d 100644
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
+++ b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
@@ -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);
}
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java
index 2c84d46238e..19ab8c6eaf9 100644
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java
+++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java
@@ -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();
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java
index 9b1fb549a84..10614f44819 100644
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java
+++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java
@@ -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);
}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java
index 70ff2cd4461..32d5831bb4f 100644
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java
+++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java
@@ -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.
*
* 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();
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorServiceManager.java
index 5496c837bde..33599921d31 100644
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorServiceManager.java
+++ b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorServiceManager.java
@@ -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.
*
* 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();
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java
index a71ac9d5029..2f0da158958 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java
@@ -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++) {
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
index 3a731a50dfb..fb9720ae5f7 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
@@ -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
+ *
* 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
- *
* Because you only need a singleton of these class, the constructor is protected.
*
- * Your subclass must supply a method like the following:RSECorePlugin.getDefault().getRegistry()
.
+ * @return the RSE Core Registry.
+ */
+ public static IRSECoreRegistry getTheCoreRegistry() {
+ return getDefault().getCoreRegistry();
+ }
+
+ /**
+ * A static convenience method - fully equivalent to
+ * RSECorePlugin.getDefault().getSystemRegistry()
.
+ * @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();
}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java
index c846214aee0..083a3d337fa 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java
@@ -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()) {
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java
index fcd664b67ad..3b36bd7fa18 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java
@@ -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);
}
/*
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
index 1a08072a7bd..770f7dba08a 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
@@ -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()}.
* RSECorePlugin.getDefault().getRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}
+ * RSECorePlugin.getTheCoreRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}
*
* @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
- * RSECorePlugin.getDefault().getRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}
+ * RSECorePlugin.getTheCoreRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}
*/
public IHost[] getHostsBySystemTypes(IRSESystemType[] systemTypes);
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java
index ea47f3a4913..0ba83f2ee02 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java
@@ -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();
}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemStartHere.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemStartHere.java
index 726c40487c7..b39aa554ba3 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemStartHere.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemStartHere.java
@@ -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);
}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java
index 6f6c5283944..e6e3be15cc6 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java
@@ -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;
*
- * public static MyConnectorServiceManager getTheMyConnectorServiceManager()
+ * public static MyConnectorServiceManager getInstance()
* {
* 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()
{
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java
index e0e712215ce..451a10ba534 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java
@@ -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);
}
}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java
index 14be732f401..f1a3cb4093e 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java
@@ -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();
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java
index 55b543d1f94..da6ebaac593 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java
@@ -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
*
@@ -54,7 +54,7 @@ public class SystemFilterStartHere
{
}
- public static SystemFilterStartHere getDefault()
+ public static SystemFilterStartHere getInstance()
{
if (_instance == null)
{
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java
index 5968fec141c..82df2e5d875 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java
@@ -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++)
{
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java
index e4d7037b415..2540d3ccf41 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java
@@ -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
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java
index c34f00fe976..8639b7a7089 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java
@@ -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]);
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
index 7bb9b86d314..42691eb2600 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
@@ -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);
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
index 572802062cb..b1aa9777e1d 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
@@ -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());
}
/**
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java
index 768b7eb63c9..d371db572d1 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java
@@ -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();
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java
index c12471576d9..b07239d1241 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java
@@ -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)
{
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
index f05f6262f07..a83c270cd66 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
@@ -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)
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java
index 8cb7fa36d5b..286b4dfbb02 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java
@@ -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();
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java
index 9a41a84775c..0141575393b 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java
@@ -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();
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java
index da925f4147f..e238b9472d7 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java
@@ -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;
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java
index a931b9dea35..7cab63a8720 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java
@@ -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();
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java
index 5024b42328d..d44c87a2fca 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
index 6ecf9252648..8fbc22b6d88 100644
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
+++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
@@ -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);
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeRegistry.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeRegistry.java
index 222841478fa..afe45af1b82 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeRegistry.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/SystemFileTransferModeRegistry.java
@@ -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();
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
index d03cfced681..bda2757d436 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
index 3232bbf1e60..2ea04c66cd6 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
@@ -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 ""
@@ -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);
}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java
index 3865896ec03..3ffe78a77e0 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java
@@ -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)
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java
index 1e315bcacd8..c0de65f02bb 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java
@@ -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();
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/FTPFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/FTPFileSubSystemConfiguration.java
index 27f2240a654..e14f3e3c4e1 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/FTPFileSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/FTPFileSubSystemConfiguration.java
@@ -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);
}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
index 5a43692a158..b70d3cceb6b 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
@@ -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)
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java
index 5ba3266d2f4..0550387e4da 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java
@@ -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()
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java
index 80dcc6b5af6..a41acfeefb4 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java
@@ -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()
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java
index 8d17348ccfe..260805ad68e 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java
@@ -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)
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java
index 1495bcd7786..b1097ba952f 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java
@@ -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()
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
index cd70d8d7806..fb5db5d3020 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
@@ -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);
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
index a84318a8d93..d2fb51591c6 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java
index a1dbb6ffe32..ee61f375268 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java
@@ -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;
}
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java
index 77ff54c59ec..a43d23a771c 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java
@@ -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())
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java
index 96f9c9c6a54..ba2c16645c2 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
index 6f941af66f5..d90de7f7104 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
@@ -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.
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
index 8c81803ca05..371cce836c9 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
@@ -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 0) {
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java
index 602e1c3a0aa..227fd5dbfac 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java
@@ -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...
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java
index 0eae25d4ce0..abcecf00a92 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java
@@ -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);
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java
index fe0a62167c8..5860ae9aba7 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java
@@ -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) {
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java
index 1b863ecf432..bb3a1cc3f46 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java
@@ -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));
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java
index 371f097d09c..bf0f16f9ffe 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java
@@ -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));
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java
index 9ea231139ec..369bbcd2115 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java
@@ -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
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemNewConnectionPromptObject.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemNewConnectionPromptObject.java
index e100dab31f5..75c6db1792d 100644
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemNewConnectionPromptObject.java
+++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemNewConnectionPromptObject.java
@@ -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
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java
index e5a6b4d1cba..36515a5180d 100644
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java
+++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java
@@ -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
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java
index 12204705dc9..a888be56ea7 100644
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java
+++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java
@@ -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);
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java
index 64fea72d183..3017d0ddabc 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java
@@ -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();
}
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java
index 9fe6fe9b48d..08574788fc4 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java
@@ -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();
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java
index 37522d56fce..6cf8786e3b0 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java
index ac11fca2c90..dec701a25ec 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java
index 725e7fc16ad..3e0da128c9e 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java
index 32ab01586a0..a05af1959dc 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java
index 800b464e239..8c05fd0fc8e 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java
@@ -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;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java
index e492048714c..2895153c5fc 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java
@@ -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;
}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemConfigurationProxyTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemConfigurationProxyTestCase.java
index 71f3c165d66..f64ebf3b4e6 100644
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemConfigurationProxyTestCase.java
+++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemConfigurationProxyTestCase.java
@@ -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];
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
index 4ed50570619..ef9586ad570 100644
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
+++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
@@ -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;
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTest.java
index 90b450743d5..3567400117c 100644
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTest.java
+++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTest.java
@@ -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);
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/PreferencesTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/PreferencesTest.java
index 3cced8e1ea0..ec312875aef 100644
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/PreferencesTest.java
+++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/PreferencesTest.java
@@ -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);