Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-04-19 14:31:55 -0400
committerAlexander Kurtakov2012-04-19 14:31:55 -0400
commit47716dcc7406fd255483837f7e6f4dd808bafd67 (patch)
tree7b5367f1f7b82f15905482da1588975c0aa0388d /libhover
parentd5dd38989ad022c0d2d583946bd9f33afe4336a0 (diff)
downloadorg.eclipse.linuxtools-47716dcc7406fd255483837f7e6f4dd808bafd67.tar.gz
org.eclipse.linuxtools-47716dcc7406fd255483837f7e6f4dd808bafd67.tar.xz
org.eclipse.linuxtools-47716dcc7406fd255483837f7e6f4dd808bafd67.zip
Ignore http params in href for devhelp.
Eclipse help system adds parameters to the href but this breaks our path creation so we just strip them.
Diffstat (limited to 'libhover')
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpContentProducer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpContentProducer.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpContentProducer.java
index dcf3d68011..216b4f6e2b 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpContentProducer.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpContentProducer.java
@@ -30,6 +30,10 @@ public class DevHelpContentProducer implements IHelpContentProducer {
@Override
public InputStream getInputStream(String pluginID, String href,
Locale locale) {
+ // Eclipse help system adds parameters to the href but this breaks our path creation so we just strip them.
+ if (href.contains("?")) {
+ href = href.substring(0, href.indexOf('?'));
+ }
IPreferenceStore ps = DevHelpPlugin.getDefault().getPreferenceStore();
IPath devhelpLocation = new Path(ps.getString(PreferenceConstants.DEVHELP_DIRECTORY)).append(href);
IFileSystem fs = EFS.getLocalFileSystem();
@@ -38,7 +42,7 @@ public class DevHelpContentProducer implements IHelpContentProducer {
try {
stream = localLocation.openInputStream(EFS.NONE, new NullProgressMonitor());
} catch (CoreException e) {
- // do nothing and return null
+ e.printStackTrace();
}
return stream;
}

Back to the top