Skip to content

Commit b348417

Browse files
committed
Make org.eclipse.terminal.view.core.utils subsystem-internal
The API package `org.eclipse.terminal.view.core.utils` may be converted to subsystem-internal, since types it provides has questionable value outside the scope of terminal subsystem implementation.
1 parent cbe2947 commit b348417

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

terminal/bundles/org.eclipse.terminal.connector.local/src/org/eclipse/terminal/connector/local/launcher/LocalLauncherDelegate.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void execute(Map<String, Object> properties, ITerminalService.Done done)
108108
// Initialize the local terminal working directory.
109109
if (!properties.containsKey(ITerminalsConnectorConstants.PROP_PROCESS_WORKING_DIR)) {
110110
// By default, start the local terminal in the users home directory
111-
String initialCwd = IPreferenceKeys.getPreferences()
111+
String initialCwd = UIPlugin.getScopedPreferences()
112112
.getString(IPreferenceKeys.PREF_LOCAL_TERMINAL_INITIAL_CWD);
113113
String cwd = null;
114114
if (initialCwd == null || IPreferenceKeys.PREF_INITIAL_CWD_USER_HOME.equals(initialCwd)
@@ -279,7 +279,7 @@ private final File defaultShell() {
279279
}
280280
}
281281
if (shell == null) {
282-
shell = IPreferenceKeys.getPreferences().getString(IPreferenceKeys.PREF_LOCAL_TERMINAL_DEFAULT_SHELL_UNIX);
282+
shell = UIPlugin.getScopedPreferences().getString(IPreferenceKeys.PREF_LOCAL_TERMINAL_DEFAULT_SHELL_UNIX);
283283
if (shell == null || "".equals(shell)) { //$NON-NLS-1$
284284
if (System.getenv("SHELL") != null && !"".equals(System.getenv("SHELL").trim())) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
285285
shell = System.getenv("SHELL").trim(); //$NON-NLS-1$
@@ -314,7 +314,7 @@ public ITerminalConnector createTerminalConnector(Map<String, Object> properties
314314

315315
String arguments = (String) properties.get(ITerminalsConnectorConstants.PROP_PROCESS_ARGS);
316316
if (arguments == null && !Platform.OS_WIN32.equals(Platform.getOS())) {
317-
arguments = IPreferenceKeys.getPreferences()
317+
arguments = UIPlugin.getScopedPreferences()
318318
.getString(IPreferenceKeys.PREF_LOCAL_TERMINAL_DEFAULT_SHELL_UNIX_ARGS);
319319
}
320320

terminal/bundles/org.eclipse.terminal.view.core/META-INF/MANIFEST.MF

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@ Bundle-ActivationPolicy: lazy
1212
Bundle-Localization: plugin
1313
Export-Package: org.eclipse.terminal.view.core;version="1.0.0",
1414
org.eclipse.terminal.view.core.internal;x-internal:=true,
15-
org.eclipse.terminal.view.core.utils;version="1.0.0"
15+
org.eclipse.terminal.view.core.utils;version="1.0.0";
16+
x-friends:="org.eclipse.terminal.connector.local,
17+
org.eclipse.terminal.connector.ssh,
18+
org.eclipse.terminal.connector.telnet,
19+
org.eclipse.terminal.connector.process,
20+
org.eclipse.terminal.view.ui"
1621
Automatic-Module-Name: org.eclipse.terminal.view.core

terminal/bundles/org.eclipse.terminal.view.ui/src/org/eclipse/terminal/view/ui/IPreferenceKeys.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2018 Wind River Systems, Inc. and others. All rights reserved.
2+
* Copyright (c) 2011, 2025 Wind River Systems, Inc. and others. All rights reserved.
33
* This program and the accompanying materials are made available under the terms
44
* of the Eclipse Public License 2.0 which accompanies this distribution, and is
55
* available at https://www.eclipse.org/legal/epl-2.0/
@@ -9,12 +9,10 @@
99
* Contributors:
1010
* Wind River Systems - initial API and implementation
1111
* Dirk Fauth <[email protected]> - Bug 460496
12+
* Alexander Fedorov (ArSysOp) - further evolution
1213
*******************************************************************************/
1314
package org.eclipse.terminal.view.ui;
1415

15-
import org.eclipse.terminal.view.core.utils.ScopedEclipsePreferences;
16-
import org.eclipse.terminal.view.ui.internal.UIPlugin;
17-
1816
/**
1917
* Terminal plug-in preference key definitions.
2018
*
@@ -71,8 +69,4 @@ public interface IPreferenceKeys {
7169
public final String PREF_LOCAL_TERMINAL_DEFAULT_SHELL_UNIX_ARGS = PREF_TERMINAL
7270
+ ".localTerminalDefaultShellUnixArgs"; //$NON-NLS-1$
7371

74-
static ScopedEclipsePreferences getPreferences() {
75-
return UIPlugin.getScopedPreferences();
76-
}
77-
7872
}

0 commit comments

Comments
 (0)