Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2010-06-15 18:15:00 +0000
committerChris Goldthorpe2010-06-15 18:15:00 +0000
commit44b94bcfba41e4fbe614e00d816d15ba41cc7c49 (patch)
tree730eee3bc168ce7ad5e41c5fbf8b149b14852936 /org.eclipse.help.ui
parente84f9dca248805d4f4394cf8a68031c992b98510 (diff)
downloadeclipse.platform.ua-44b94bcfba41e4fbe614e00d816d15ba41cc7c49.tar.gz
eclipse.platform.ua-44b94bcfba41e4fbe614e00d816d15ba41cc7c49.tar.xz
eclipse.platform.ua-44b94bcfba41e4fbe614e00d816d15ba41cc7c49.zip
Bug 316776 - [Help][Search] "Error saving the scope set" message when searching the doc
Diffstat (limited to 'org.eclipse.help.ui')
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java23
1 files changed, 7 insertions, 16 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java
index c991dc2fe..4e0a9db69 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -54,22 +54,13 @@ public class HistoryScopeSet extends ScopeSet {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < name.length(); i++) {
char c = name.charAt(i);
- switch (c) {
- case '\"':
- buf.append("QUOTE"); //$NON-NLS-1$
- break;
- case ' ':
- buf.append("_"); //$NON-NLS-1$
- break;
- case '?':
- buf.append("QUESTION"); //$NON-NLS-1$
- break;
- case '*':
- buf.append("STAR"); //$NON-NLS-1$
- break;
- default:
+
+ if (c == '_' || Character.isLetterOrDigit(c)) {
buf.append(c);
- break;
+ } else {
+ buf.append('_');
+ buf.append((int) c);
+ buf.append('_');
}
}
return buf.toString();

Back to the top