mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[191038][api] fix scratchpad init bug by fixing SystemRegistryUI initialization
This commit is contained in:
parent
7701d6a928
commit
b0651de5ab
2 changed files with 8 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue