Bug 114627 - [Help] Unable to delete bookmark in help window
Summary: [Help] Unable to delete bookmark in help window
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3.1   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 131027 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-01 15:18 EST by Curtis d'Entremont CLA
Modified: 2007-07-11 11:40 EDT (History)
2 users (show)

See Also:


Attachments
Fixes the bug. (1.45 KB, patch)
2006-07-12 17:50 EDT, Adam Archer CLA
no flags Details | Diff
Patch for 3.3.1 stream (3.75 KB, patch)
2007-06-13 14:05 EDT, Adam Archer CLA
no flags Details | Diff
Patch with JUnit tests (8.15 KB, patch)
2007-07-03 17:04 EDT, Adam Archer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis d'Entremont CLA 2005-11-01 15:18:53 EST
- Open Help -> Search.
- Search for anything, add a few bookmarks.
- Open Help -> Help Contents.
- Click on Bookmarks on the bottom in new Help window.
- Select a bookmark.
- Click on the "Delete Selected Bookmark" action.
- Bug: Nothing happens.

This works when deleting all bookmarks, or deleting bookmarks that were added
from the online help window, not the view.
Comment 1 Mazen Faraj CLA 2005-11-02 11:10:46 EST
reproducable in 3.1.1.
Comment 2 Curtis d'Entremont CLA 2006-06-14 14:10:01 EDT
Sending back to inbox since not being actively worked on.
Comment 3 Curtis d'Entremont CLA 2006-06-27 12:26:21 EDT
I recall fixing a few bookmark problems earlier.. can you see if this one is still reproducible?
Comment 4 Adam Archer CLA 2006-07-05 13:10:44 EDT
Still reproducable in 3.2 RC7, will investigate.
Comment 5 Adam Archer CLA 2006-07-12 17:50:26 EDT
Created attachment 46211 [details]
Fixes the bug.

The bookmark was being added with the ?resultof parameter in the href. This was preventing it from being removed correctly upon bookmark deletion. Added a method to ReusableHelpPart to parse the href and remove any parameters before creating the bookmark.
Comment 6 Curtis d'Entremont CLA 2006-07-12 18:08:25 EDT
Patch applied.

This also fixes another side effect of the ?resultof where viewing such a bookmark would result in highlighting of the original search query from which the bookmark was created. This one is also fixed with the patch.
Comment 7 Adam Archer CLA 2007-06-11 10:34:28 EDT
This bug is reproducible again in I20070608-1718. Reopening.
Comment 8 Adam Archer CLA 2007-06-11 11:05:44 EDT
This should be corrected again for 3.3.1.
Comment 9 Adam Archer CLA 2007-06-13 14:05:56 EDT
Created attachment 71212 [details]
Patch for 3.3.1 stream

The previous fix was to a piece of code which is no longer used when the add bookmark button is clicked from the toolbar. It instead goes directly to the bookmark manager with the href that the BrowserPart is pointing at. In the case of a search result, this href has the query parameter on it. The previous fix is still required for the case of adding the bookmark from the context menu for a search result.

Since the fix for the BrowserPart toolbar button also needed to strip out the parameter, I moved the method introduced by the previous fix out of the ReusableHelpPart and created a utility class in org.eclipse.help.base called LinkUtil to provide it.
Comment 10 Chris Goldthorpe CLA 2007-06-28 18:44:22 EDT
Adam can you write a few JUnit tests for LinkUils.StripParams() and attach them as a second patch? This kind of string manipulation utility is always a good candidate for adding JUnit tests. See org.eclipse.ua.tests.cheatsheet.other.TestEscape for an example of such a test.
Comment 11 Adam Archer CLA 2007-07-03 17:04:18 EDT
Created attachment 72987 [details]
Patch with JUnit tests

New patch includes JUnit tests for LinkUtil.stripParam(). Also makes the method null safe.
Comment 12 Chris Goldthorpe CLA 2007-07-03 17:23:56 EDT
Fixed in HEAD.
Comment 13 Chris Goldthorpe CLA 2007-07-03 17:26:16 EDT
Fixed in 3.3 maintenance stream
Comment 14 Chris Goldthorpe CLA 2007-07-11 11:40:48 EDT
*** Bug 131027 has been marked as a duplicate of this bug. ***