Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Mueller2019-03-19 04:54:36 -0400
committerMarvin Mueller2019-03-19 04:54:36 -0400
commit389232a861a0699244f982a1d68c44b3408416f2 (patch)
tree2e698fb9e78e808f984d138cbd7d7f68cf9cc78a
parentb82a99af66a0e31654f3ab2d0a6bc07ace09c811 (diff)
downloadorg.eclipse.jubula.core-389232a861a0699244f982a1d68c44b3408416f2.tar.gz
org.eclipse.jubula.core-389232a861a0699244f982a1d68c44b3408416f2.tar.xz
org.eclipse.jubula.core-389232a861a0699244f982a1d68c44b3408416f2.zip
Fix for Bug 545529
-rw-r--r--org.eclipse.jubula.client.api/resources/keyboard_mapping/de_DE.properties16
-rw-r--r--org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/commands/GetKeyboardLayoutNameResponseCommand.java19
2 files changed, 21 insertions, 14 deletions
diff --git a/org.eclipse.jubula.client.api/resources/keyboard_mapping/de_DE.properties b/org.eclipse.jubula.client.api/resources/keyboard_mapping/de_DE.properties
index 83d8c5643..4e08ffb91 100644
--- a/org.eclipse.jubula.client.api/resources/keyboard_mapping/de_DE.properties
+++ b/org.eclipse.jubula.client.api/resources/keyboard_mapping/de_DE.properties
@@ -7,7 +7,7 @@
###############################################################################
\!=shift+1
"=shift+2
-=shift+3
+§=shift+3
$=shift+4
%=shift+5
&=shift+6
@@ -15,23 +15,23 @@ $=shift+4
(=shift+8
)=shift+9
\==shift+0
-?=shift+
-`=shift+
+?=shift+ß
+`=shift+´
*=shift++
'=shift+#
_=shift+-
\:=shift+.
;=shift+\,
>=shift+<
-=shift+^
+°=shift+^
{=ctrl+alt+7
[=ctrl+alt+8
]=ctrl+alt+9
}=ctrl+alt+0
-\\=ctrl+alt+
+\\=ctrl+alt+ß
|=ctrl+alt+<
~=ctrl+alt++
-=ctrl+alt+2
-=ctrl+alt+3
-=ctrl+alt+m
+²=ctrl+alt+2
+³=ctrl+alt+3
+µ=ctrl+alt+m
@=ctrl+alt+q \ No newline at end of file
diff --git a/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/commands/GetKeyboardLayoutNameResponseCommand.java b/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/commands/GetKeyboardLayoutNameResponseCommand.java
index 5debde284..2862d5aab 100644
--- a/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/commands/GetKeyboardLayoutNameResponseCommand.java
+++ b/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/commands/GetKeyboardLayoutNameResponseCommand.java
@@ -11,7 +11,9 @@
package org.eclipse.jubula.client.internal.commands;
import java.io.IOException;
-import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.nio.charset.Charset;
import java.util.Properties;
import org.eclipse.jubula.client.RCPKeyboardRegistry;
@@ -69,7 +71,7 @@ public class GetKeyboardLayoutNameResponseCommand implements APICommand {
if (layoutName != null && layoutName.length() > 0) {
Properties prop = RCPKeyboardRegistry.INSTANCE
.getPropertiesForLocalCode(layoutName);
- InputStream stream = null;
+ InputStreamReader stream = null;
try {
if (prop == null) {
String filename =
@@ -77,8 +79,15 @@ public class GetKeyboardLayoutNameResponseCommand implements APICommand {
+ layoutName
+ SwtToolkitConstants
.KEYBOARD_MAPPING_FILE_POSTFIX;
- stream = getClass().getClassLoader()
- .getResourceAsStream(filename);
+ URL resource =
+ getClass().getClassLoader().getResource(filename);
+ if (resource == null) {
+ LOG.error("Mapping for '" + layoutName //$NON-NLS-1$
+ + "' could not be found."); //$NON-NLS-1$
+ return null;
+ }
+ stream = new InputStreamReader(resource.openStream(),
+ Charset.forName("UTF-8")); //$NON-NLS-1$
if (stream != null) {
prop = new Properties();
prop.load(stream);
@@ -86,8 +95,6 @@ public class GetKeyboardLayoutNameResponseCommand implements APICommand {
}
if (prop != null) {
m_connection.send(new SetKeyboardLayoutMessage(prop));
- } else {
- LOG.error("Mapping for '" + layoutName + "' could not be found."); //$NON-NLS-1$//$NON-NLS-2$
}
} catch (IOException ioe) {
LOG.error("Error occurred while loading Keyboard Mapping.", ioe); //$NON-NLS-1$

Back to the top