Skip to content

Commit aa4ad7a

Browse files
committed
Moved messages to the right bundle
1 parent a11371c commit aa4ad7a

File tree

5 files changed

+26
-29
lines changed

5 files changed

+26
-29
lines changed

bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/internal/copy/WorkbenchSWTMessages.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2005, 2025 IBM Corporation and others.
2+
* Copyright (c) 2005, 2019 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -42,17 +42,6 @@ public class WorkbenchSWTMessages extends NLS {
4242
public static String InternalError;
4343
public static String IDEApplication_versionTitle;
4444
public static String IDEApplication_versionMessage;
45-
public static String IDEApplication_workspaceLockMessage;
46-
47-
public static String IDEApplication_workspaceLockOwner;
48-
49-
public static String IDEApplication_workspaceLockHost;
50-
51-
public static String IDEApplication_workspaceLockDisplay;
52-
53-
public static String IDEApplication_workspaceLockPID;
54-
55-
public static String IDEApplication_workspaceCannotLockMessage2;
5645

5746
static {
5847
// load message values from bundle file

bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/internal/copy/messages.properties

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###############################################################################
2-
# Copyright (c) 2000, 2025 IBM Corporation and others.
2+
# Copyright (c) 2000, 2019 IBM Corporation and others.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the Eclipse Public License 2.0
@@ -42,9 +42,3 @@ This workspace was written with a different version of the product and needs to
4242
{0}\n\n\
4343
Updating the workspace may make it incompatible with other versions of the product.\n\
4444
Press OK to update the workspace and open it. Press Cancel to select a different workspace.
45-
IDEApplication_workspaceLockOwner=User:\t\t{0}\n
46-
IDEApplication_workspaceLockHost=Host:\t\t{0}\n
47-
IDEApplication_workspaceLockDisplay=Display:\t\t{0}\n
48-
IDEApplication_workspaceLockPID=Process ID:\t{0}\n
49-
IDEApplication_workspaceLockMessage=Workspace lock is currently held by:\n{0}
50-
IDEApplication_workspaceCannotLockMessage2=Could not switch to the selected workspace ''{0}'' because it is currently in use by another Eclipse instance.

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchMessages.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,4 +1043,12 @@ public class WorkbenchMessages extends NLS {
10431043
public static String Workbench_RestartButton;
10441044
public static String Workbench_DontRestartButton;
10451045

1046+
public static String IDEApplication_workspaceLockOwner;
1047+
public static String IDEApplication_workspaceLockHost;
1048+
public static String IDEApplication_workspaceLockDisplay;
1049+
public static String IDEApplication_workspaceLockPID;
1050+
public static String IDEApplication_workspaceLockMessage;
1051+
public static String IDEApplication_workspaceCannotLockMessage2;
1052+
public static String IDEApplication_workspaceCannotLockTitle;
1053+
10461054
}

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkspaceLock.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.nio.file.Path;
2222
import java.util.Properties;
2323
import org.eclipse.core.runtime.URIUtil;
24-
import org.eclipse.e4.ui.workbench.swt.internal.copy.WorkbenchSWTMessages;
2524
import org.eclipse.jface.dialogs.MessageDialog;
2625
import org.eclipse.osgi.util.NLS;
2726
import org.eclipse.swt.widgets.Shell;
@@ -68,7 +67,6 @@ public class WorkspaceLock {
6867
* @return <code>String</code> details of lock owned workspace,
6968
* <code>null or Empty</code> if not locked
7069
*/
71-
@SuppressWarnings("restriction")
7270
public static String getWorkspaceLockDetails(URL workspaceUrl) {
7371
Path lockFile = getLockInfoFile(workspaceUrl);
7472
if (lockFile != null && Files.exists(lockFile)) {
@@ -78,19 +76,19 @@ public static String getWorkspaceLockDetails(URL workspaceUrl) {
7876
properties.load(is);
7977
String prop = properties.getProperty(USER);
8078
if (prop != null) {
81-
lockDetails.append(NLS.bind(WorkbenchSWTMessages.IDEApplication_workspaceLockOwner, prop));
79+
lockDetails.append(NLS.bind(WorkbenchMessages.IDEApplication_workspaceLockOwner, prop));
8280
}
8381
prop = properties.getProperty(HOST);
8482
if (prop != null) {
85-
lockDetails.append(NLS.bind(WorkbenchSWTMessages.IDEApplication_workspaceLockHost, prop));
83+
lockDetails.append(NLS.bind(WorkbenchMessages.IDEApplication_workspaceLockHost, prop));
8684
}
8785
prop = properties.getProperty(DISPLAY);
8886
if (prop != null) {
89-
lockDetails.append(NLS.bind(WorkbenchSWTMessages.IDEApplication_workspaceLockDisplay, prop));
87+
lockDetails.append(NLS.bind(WorkbenchMessages.IDEApplication_workspaceLockDisplay, prop));
9088
}
9189
prop = properties.getProperty(PROCESS_ID);
9290
if (prop != null) {
93-
lockDetails.append(NLS.bind(WorkbenchSWTMessages.IDEApplication_workspaceLockPID, prop));
91+
lockDetails.append(NLS.bind(WorkbenchMessages.IDEApplication_workspaceLockPID, prop));
9492
}
9593

9694
} catch (IOException e) {
@@ -132,14 +130,13 @@ public static Path getLockInfoFile(URL workspaceUrl) {
132130
* be locked
133131
* @param workspaceLockOwner a formatted description of the existing lock owner
134132
*/
135-
@SuppressWarnings("restriction")
136133
public static void showWorkspaceLockedDialog(Shell shell, String workspacePath, String workspaceLockOwner) {
137-
String lockMessage = NLS.bind(WorkbenchSWTMessages.IDEApplication_workspaceCannotLockMessage2, workspacePath);
134+
String lockMessage = NLS.bind(WorkbenchMessages.IDEApplication_workspaceCannotLockMessage2, workspacePath);
138135
String wsLockedError = lockMessage + System.lineSeparator() + System.lineSeparator()
139-
+ NLS.bind(WorkbenchSWTMessages.IDEApplication_workspaceLockMessage, workspaceLockOwner);
136+
+ NLS.bind(WorkbenchMessages.IDEApplication_workspaceLockMessage, workspaceLockOwner);
140137

141138
MessageDialog.openError(shell,
142-
WorkbenchSWTMessages.IDEApplication_workspaceCannotLockTitle, wsLockedError);
139+
WorkbenchMessages.IDEApplication_workspaceCannotLockTitle, wsLockedError);
143140
}
144141

145142
}

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/messages.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,3 +1055,12 @@ Workbench_zoomChangedTitle=Zoom Changed
10551055
Workbench_zoomChangedMessage=Restart for the zoom changes to take full effect?
10561056
Workbench_RestartButton=&Restart
10571057
Workbench_DontRestartButton=&Don't restart
1058+
1059+
# Workspace lock messages
1060+
IDEApplication_workspaceLockOwner=User:\t\t{0}\n
1061+
IDEApplication_workspaceLockHost=Host:\t\t{0}\n
1062+
IDEApplication_workspaceLockDisplay=Display:\t\t{0}\n
1063+
IDEApplication_workspaceLockPID=Process ID:\t{0}\n
1064+
IDEApplication_workspaceLockMessage=Workspace lock is currently held by:\n{0}
1065+
IDEApplication_workspaceCannotLockMessage2=Could not switch to the selected workspace ''{0}'' because it is currently in use by another Eclipse instance.
1066+
IDEApplication_workspaceCannotLockTitle=Workspace Cannot Be Locked

0 commit comments

Comments
 (0)