Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java25
-rwxr-xr-xbundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandlerMessages.java36
2 files changed, 39 insertions, 22 deletions
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java
index 9945daa447..353d83025e 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java
@@ -40,7 +40,7 @@ import org.eclipse.ui.themes.ITheme;
import org.eclipse.ui.themes.IThemeManager;
class ExtensionEventHandler implements IRegistryChangeListener {
-
+
private Workbench workbench;
private List changeList = new ArrayList(10);
@@ -56,11 +56,11 @@ class ExtensionEventHandler implements IRegistryChangeListener {
.getExtensionDeltas(PlatformUI.PLUGIN_EXTENSION_NAME_SPACE);
IExtension ext;
IExtensionPoint extPt;
-// RAP [rh] fix for bug 290920
+// RAP [rh] fix for bug 290920
// IWorkbenchWindow[] win = PlatformUI.getWorkbench()
// .getWorkbenchWindows();
IWorkbenchWindow[] win = workbench.getWorkbenchWindows();
-// End of fix
+// End of fix
if (win.length == 0) {
return;
}
@@ -74,9 +74,9 @@ class ExtensionEventHandler implements IRegistryChangeListener {
int numPerspectives = 0;
int numActionSetPartAssoc = 0;
- // push action sets and perspectives to the top because incoming
- // actionSetPartAssociations and perspectiveExtensions may depend upon
- // them for their bindings.
+ // push action sets and perspectives to the top because incoming
+ // actionSetPartAssociations and perspectiveExtensions may depend upon
+ // them for their bindings.
for (int i = 0; i < delta.length; i++) {
id = delta[i].getExtensionPoint().getSimpleIdentifier();
if (delta[i].getKind() == IExtensionDelta.ADDED) {
@@ -137,7 +137,7 @@ class ExtensionEventHandler implements IRegistryChangeListener {
};
display.syncExec(run);
}
-
+
private void appear(IExtensionPoint extPt, IExtension ext) {
String name = extPt.getSimpleIdentifier();
if (name.equalsIgnoreCase(IWorkbenchRegistryConstants.PL_FONT_DEFINITIONS)) {
@@ -204,15 +204,17 @@ class ExtensionEventHandler implements IRegistryChangeListener {
if (changeList.isEmpty()) {
return;
}
-
+// RAP [if]: need session aware messages
final StringBuffer message = new StringBuffer(
- ExtensionEventHandlerMessages.ExtensionEventHandler_following_changes);
+// ExtensionEventHandlerMessages.ExtensionEventHandler_following_changes);
+ ExtensionEventHandlerMessages.get().ExtensionEventHandler_following_changes);
for (Iterator i = changeList.iterator(); i.hasNext();) {
message.append(i.next());
}
- message.append(ExtensionEventHandlerMessages.ExtensionEventHandler_need_to_reset);
+// message.append(ExtensionEventHandlerMessages.ExtensionEventHandler_need_to_reset);
+ message.append(ExtensionEventHandlerMessages.get().ExtensionEventHandler_need_to_reset);
display.asyncExec(new Runnable() {
public void run() {
@@ -230,7 +232,8 @@ class ExtensionEventHandler implements IRegistryChangeListener {
if (MessageDialog
.openQuestion(
parentShell,
- ExtensionEventHandlerMessages.ExtensionEventHandler_reset_perspective, message.toString())) {
+// ExtensionEventHandlerMessages.ExtensionEventHandler_reset_perspective, message.toString())) {
+ ExtensionEventHandlerMessages.get().ExtensionEventHandler_reset_perspective, message.toString())) {
IWorkbenchPage page = window.getActivePage();
if (page == null) {
return;
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandlerMessages.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandlerMessages.java
index 2ac9d72d1d..a640ea3025 100755
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandlerMessages.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandlerMessages.java
@@ -10,9 +10,13 @@
**********************************************************************/
package org.eclipse.ui.internal;
-import org.eclipse.osgi.util.NLS;
+import org.eclipse.rwt.RWT;
-public class ExtensionEventHandlerMessages extends NLS {
+//import org.eclipse.osgi.util.NLS;
+
+// RAP [if]: need session aware NLS
+//public class ExtensionEventHandlerMessages extends NLS {
+public class ExtensionEventHandlerMessages {
private static final String BUNDLE_NAME = "org.eclipse.ui.internal.ExtensionEventHandler";//$NON-NLS-1$
//
// Copyright (c) 2003, 2004 IBM Corporation and others.
@@ -24,15 +28,25 @@ public class ExtensionEventHandlerMessages extends NLS {
// Contributors:
// IBM Corporation - initial API and implementation
//
- public static String ExtensionEventHandler_new_action_set;
- public static String ExtensionEventHandler_following_changes;
- public static String ExtensionEventHandler_change_format;
- public static String ExtensionEventHandler_need_to_reset;
- public static String ExtensionEventHandler_reset_perspective;
+ public String ExtensionEventHandler_new_action_set;
+ public String ExtensionEventHandler_following_changes;
+ public String ExtensionEventHandler_change_format;
+ public String ExtensionEventHandler_need_to_reset;
+ public String ExtensionEventHandler_reset_perspective;
+// RAP [if]: need session aware NLS
+// static {
+// // load message values from bundle file
+// NLS.initializeMessages(BUNDLE_NAME, ExtensionEventHandlerMessages.class);
+// }
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ExtensionEventHandlerMessages.class);
- }
+ /**
+ * Load message values from bundle file
+ * @return localized message
+ */
+ public static ExtensionEventHandlerMessages get() {
+ Class clazz = ExtensionEventHandlerMessages.class;
+ Object result = RWT.NLS.getISO8859_1Encoded( BUNDLE_NAME, clazz );
+ return ( ExtensionEventHandlerMessages )result;
+ }
} \ No newline at end of file

Back to the top