Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 156864 - [Undo] Edit > Add Bookmark... does not work
Summary: [Undo] Edit > Add Bookmark... does not work
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-11 08:51 EDT by Dani Megert CLA
Modified: 2006-09-19 14:07 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2006-09-11 08:51:24 EDT
I20060906-1200

1. start fresh workspace
2. create simple project P
3. create simple file f
4. close the editor (the editor actions works)
5. Edit > Add Bookmark...
==> bookmark is not added
Comment 1 Dani Megert CLA 2006-09-11 08:55:50 EDT
Susan, might this be casued by work done for bug 7691?
Comment 2 Susan McCourt CLA 2006-09-11 16:44:34 EDT
I'll assume it's caused by my work in this area, since the scenario works properly in the 3.2 maintenance stream.  My interactive testing focused on the bookmark view and editor actions, so I missed this path.
Comment 3 Susan McCourt CLA 2006-09-12 20:52:42 EDT
Fixed in HEAD, >20060912.

When the marker dialogs were refactored to share a common superclass, the add bookmark dialog did not properly designate its marker type.  The dialog was only used in the editor action codepath where the file is not open.  (other codepaths simply use a prompter to prompt for bookmark name).  

So in this codepath, the marker was created, but the marker type was generic (org.eclipse.core.resources.marker) rather than org.eclipse.core.resources.bookmark.  Even though a marker was created (and it could be undone/redone), it would not show up in the bookmark view, and since it has no location, it normally wouldn't show up anywhere else either.

Fixed the dialog to set the marker type.
Comment 4 Dani Megert CLA 2006-09-13 02:56:15 EDT
> The dialog was
> only used in the editor action codepath where the file is not open.
You mean the Edit > ... code path? Or does Platform UI have specific editor actions for creating bookmarks?
Comment 5 Susan McCourt CLA 2006-09-13 13:11:42 EDT
Yes, I meant the Edit... code path.  

The problem surfaced if BookmarkPropertiesDialog is opened to create a bookmark.  The only codepath for that scenario is the AddBookmarkAction, used by the navigator as the global action handler for Edit>Add Bookmark.
Comment 6 Susan McCourt CLA 2006-09-19 14:07:39 EDT
verified in I20060919-0010, WinXP.
Although this bug addresses the navigator Edit>AddBookmark.. action, I tested these scenarios:

- add a bookmark to foo.java using the ruler
- add a bookmark to foo.java from the navigator edit menu (bookmark with no location)
- add a bookmark to foo.java from foo.java's Edit... menu 

In all of these cases, the add bookmark succeeds, the bookmark appears in the bookmark view, and undo is available and working.