From b0651de5ab10eb5e289101e6f6249be2c69a9c41 Mon Sep 17 00:00:00 2001 From: David Dykstal Date: Tue, 5 Jun 2007 17:22:16 +0000 Subject: [PATCH] [191038][api] fix scratchpad init bug by fixing SystemRegistryUI initialization --- .../UI/org/eclipse/rse/ui/RSEUIPlugin.java | 4 ++-- .../ui/internal/model/SystemRegistryUI.java | 21 ++++++------------- 2 files changed, 8 insertions(+), 17 deletions(-) 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 d85ee99374b..b5f8a3bb9a2 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 @@ -26,6 +26,7 @@ * David Dykstal (IBM) - [189858] Delay the creation of the remote systems project * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands * API to the user actions plugin + * David Dykstal (IBM) - [191038] initialize SystemRegistryUI without a log file, it was not used ********************************************************************************/ package org.eclipse.rse.ui; @@ -657,8 +658,7 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi { if (_systemRegistryUI == null) { - String logfilePath = getStateLocation().toOSString(); - _systemRegistryUI = SystemRegistryUI.getInstance(logfilePath); + _systemRegistryUI = SystemRegistryUI.getInstance(); } return _systemRegistryUI; } diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java index 203323115da..b8d94f4c8a8 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java @@ -13,6 +13,8 @@ * Contributors: * Martin Oberhuber (Wind River) - [186773] split SystemRegistryUI from SystemRegistry implementation * Martin Oberhuber (Wind River) - [189123] Prepare ISystemRegistry for move into non-UI + * David Dykstal (IBM) - [191038] remove getInstance(logFilePath) log file was not used + * initialize correctly in getInstance() ********************************************************************************/ package org.eclipse.rse.ui.internal.model; @@ -80,9 +82,8 @@ public class SystemRegistryUI implements ISystemRegistryUI, ISystemViewInputProv * Constructor. * This is protected as the singleton instance should be retrieved by * calling @link{#getInstance()}. - * @param logfilePath Root folder. Where to place the log file. */ - protected SystemRegistryUI(String logfilePath) + protected SystemRegistryUI() { super(); registry = SystemRegistry.getInstance(); @@ -93,23 +94,13 @@ public class SystemRegistryUI implements ISystemRegistryUI, ISystemViewInputProv // ---------------------------- /** - * Return singleton instance. Must be used on first instantiate. - * @param logfilePath Root folder. Where to place the log file. - * @return the singleton SystemRegistryUI instance. - */ - public static SystemRegistryUI getInstance(String logfilePath) - { - if (_instance == null) - _instance = new SystemRegistryUI(logfilePath); - return _instance; - } - - /** - * Return singleton instance assuming it already exists. * @return the singleton SystemRegistryUI instance. */ public static SystemRegistryUI getInstance() { + if (_instance == null) { + _instance = new SystemRegistryUI(); + } return _instance; }