Bug 6698 - [Markers] Quick Bookmark
Summary: [Markers] Quick Bookmark
Status: CLOSED DUPLICATE of bug 115202
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement with 14 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Hitesh CLA
URL:
Whiteboard: hasPatch
Keywords: helpwanted
: 16932 22708 40887 45342 46213 58076 76067 121636 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-12-07 18:52 EST by Torrey Stevens CLA
Modified: 2014-07-02 06:11 EDT (History)
23 users (show)

See Also:


Attachments
Quickmarks feature/plugin incl. source (470.15 KB, application/octet-stream)
2005-10-31 18:20 EST, Georg Rehfeld CLA
no flags Details
Updated plug-in (499.59 KB, application/octet-stream)
2006-11-28 14:38 EST, Tod Creasey CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torrey Stevens CLA 2001-12-07 18:52:56 EST
It would be nice if I could add a bookmark for a line within a file by just 
hitting ctrl-F2, and then navigate forward and backward between bookmarks using 
F2 and shift-F2. This is a feature I use quite often in most editors.
Comment 1 Kevin Haaland CLA 2001-12-18 21:35:10 EST
Torrey,

   Are you interested in writing this enhancement for us?
Comment 2 Kevin Haaland CLA 2002-04-23 23:31:07 EDT
Consider as a post 2.0 enhancement
Comment 3 Randy Giffen CLA 2002-08-08 17:13:11 EDT
Reopen for investigation
Comment 4 Sonia Dimitrov CLA 2002-12-02 11:14:54 EST
*** Bug 16932 has been marked as a duplicate of this bug. ***
Comment 5 Alan Oursland CLA 2002-12-02 11:59:41 EST
I have seem bookmarks done two ways. I have found both of them useful at 
different times.

One way is as bug 16932 describes where a file/caret location is associated 
with a hotkey. Pressing the hotkey goes to the bookmark location -- even if the 
curren editor needs to change or a file needs to be opened. The implementation 
in VisualCafe does not give any visual indication of where the bookmark is set 
(and I have found that it is not really needed for this functionality).

This bug (6698) describes the way msdev does bookmarks. Ctrl-F2 toggles a 
bookmark icon in the left bar for the current line. Pressing F2 and Shift-F2 
cycles forward and backwards through the bookmarks within a single file.
Comment 6 John Arthorne CLA 2003-07-29 10:29:50 EDT
*** Bug 40887 has been marked as a duplicate of this bug. ***
Comment 7 Sebastian Davids CLA 2003-08-07 07:06:18 EDT
I have been working on this and have a rough-cut working version.

I have the following question for the Eclipse UI team:

These "Fast Bookmarks" should they be:

a) regular bookmarks with a predefined name say "Fast Bookmark 1", "Fast
Bookmark 2" etc.

b) a new type of IMarker say IMarker.FAST_BOOKMARK
Comment 8 Tom Hofmann CLA 2003-09-15 05:02:36 EDT
*** Bug 22708 has been marked as a duplicate of this bug. ***
Comment 9 Thomas Arns CLA 2003-10-09 09:34:50 EDT
It definitively would be "cool" to have the "usual" [Ctrl|Shift]+F2 handling of 
bookmarks.
Now (Version 2.1.1) a bookmark can be set with Ctrl+F2, if defined manually, 
but no shjortcut for bookmark removal is possible.
Will this be available in version 3?
Comment 10 Ross Judson CLA 2003-10-11 15:25:26 EDT
16932 is not a duplicate of this bug; they are two different methods of doing 
bookmarking.

The "Microsoft-style" is to use control-F2 to toggle a bookmark, and F2 to 
move the cursor from the current position to the _next_ bookmark, cycling 
around once at the top.

The "Borland-style" is to designate ten bookmarks by number key -- control-
shift-# sets that bookmark, and control-# goes to the bookmark, even across 
different files.  Bookmarks are displayed with a small numbered icon in the 
left margin of the file they are associated with.

I favor the Borland-style -- it gives me ten bookmarks to work with, I can hop 
to another file with them, and I don't need to "cycle" through bookmarks to 
find the one I need.  In practice, when working on a problem, it is rare to 
define more than three or four, but I will very often define at least two.
Comment 11 John Arthorne CLA 2003-10-22 12:22:46 EDT
*** Bug 45342 has been marked as a duplicate of this bug. ***
Comment 12 Paolo CLA 2003-10-29 04:27:56 EST
I favor also (and with me all the people interested in the bug #22491) the 
Borland/Brief style of handling the bookmarks.

I also think that is a very useful and necessary enhancement which should 
definetly go into 3.0!

Cheers
-PaVel
Comment 13 John Arthorne CLA 2003-11-06 12:51:22 EST
*** Bug 46213 has been marked as a duplicate of this bug. ***
Comment 14 Georg Rehfeld CLA 2004-07-11 19:36:59 EDT
There is an enhanced version of Quickmarks (1.0.10 for Eclipse 2.1.x) available 
at http://eclipse-tools.sourceforge.net/quickmarks/ since today. It works by 
default in "Borland" style, but can be completely switched to "Microsoft" style 
or give you the best of both worlds. It is highly configurable (e.g. you can 
have one Set of Quickmarks per Workspace, Project, Folder or Document) and well 
documented. It runs basically in Eclipse 3.0 too in compatibility mode, a native 
port to Eclipse 3.0 is underway. I consider this the "ultimate" solution to all 
quick bookmarking functionality in Eclipse!
Comment 15 Dani Megert CLA 2004-10-12 09:06:38 EDT
*** Bug 76067 has been marked as a duplicate of this bug. ***
Comment 16 Dani Megert CLA 2004-10-12 09:45:25 EDT
*** Bug 76067 has been marked as a duplicate of this bug. ***
Comment 17 Oliver CLA 2004-10-12 09:47:26 EDT
Is there any plan to integrate such a feature in Eclipse SDK 3.X ?
Comment 18 Tod Creasey CLA 2005-10-31 15:12:28 EST
No plans yet but given the high votes I would certainly be willing to look at a
proposed patch
Comment 19 Georg Rehfeld CLA 2005-10-31 18:20:29 EST
Created attachment 29038 [details]
Quickmarks feature/plugin incl. source

May be this is the help asked for.
Comment 20 Georg Rehfeld CLA 2005-10-31 22:10:08 EST
Sorry, I forgot to mention:

the feature/plugin is for Eclipse 3 and works for me since some time (month).

I find it rather hard to contribute to Eclipse and get accepted.
Some reasons might be:
- my little playground is just not important (it was though, for me)
- I did something wrong? Feature/plugin doesn't work for you?
- my javadoc comments are too few/too verbose?

And, yes, I know, my doc and declaring this little thing a 'feature' is
just -vvvv, drop or shorten that at your will.

I hope, this finally makes it into Eclipse.

Best regards, Georg
Comment 21 Tod Creasey CLA 2005-11-01 08:07:30 EST
No - just a time issue I am sure. I am new to this component and it went through
a lot of performance work in 3.1 which was higher priority.

I will up the priority to P2 so that we can see if we can get it into 3.2.
Comment 22 Tod Creasey CLA 2005-11-02 15:13:12 EST
*** Bug 58076 has been marked as a duplicate of this bug. ***
Comment 23 Dani Megert CLA 2005-12-21 03:39:13 EST
*** Bug 121636 has been marked as a duplicate of this bug. ***
Comment 24 Leopold Welsch CLA 2006-10-19 04:30:02 EDT
Any reason, why this is not included in 3.2?
Comment 25 Tod Creasey CLA 2006-10-19 07:30:06 EDT
Because other priorities ate the time we had to look at it. I'll mark it for 3.3.
Comment 26 Leopold Welsch CLA 2006-10-19 08:27:19 EDT
Are there any kind of *real* chances that this will make it for 3.3? 

Cause start was 2001-12, so almost 5 years ago - and I frankly guess there are *always* other priorities. 

But it makes me thinking, why other Editors (like Ultraedit) run with this feature for years while Eclipse no one thinking about it. And the provided patch for Quickmark has the short-comming of not working in ALL available editors:(
Comment 27 Tod Creasey CLA 2006-10-19 08:54:04 EDT
Frankly it didn't make it into 3.2 because the markers views were in a lot of flux then. There is no significant work on them in 3.3 so I should be able to look at it now.

With 10 votes it is clearly of enough interest to the community to merit our attention in 3.3. The main issue I can see is taking more keybindings away in the platform - there is always an outcry if we reduce the amount of flexibility RCP apps have.
Comment 28 Georg Rehfeld CLA 2006-10-19 19:15:30 EDT
(In reply to comment #26)
> ... And the provided patch for Quickmark has the short-comming of not
> working in ALL available editors:(

Hmm, I really did my best to make Quickmarks work everywhere where one can set
a normal Bookmark and I don't know of editors, where it isn't possible to set
Quickmarks. Except for instance the class inspection view looking like an editor
and coming up similar (e.g. when inspecting a jar or *.class file ... but
neither you can edit that binary nor set a bookmark there (although the latter would be usefull).

If you find editors, where you can set a normal bookmark but no Quickmark,
would you please notify me at rehfeld@georg-rehfeld.de and give me neccesary
details. Thanks, Georg
Comment 29 Tod Creasey CLA 2006-11-28 14:37:11 EST
All of these keybindings are currently in use in the platform - we are trying to minimize the extra keybindings we ship and this causes so many conflicts that we can't. We also trying to avoid the use of action sets that we can do everything by commands - we would need to migrate this plug-in too.

Having said that I think that Quickmarks would be a great contribution as a third party plug-in for people to use.  I went through and fixed up the compiliation problems for 3.3. I'll attach the updated plug-in to this bug.
Comment 30 Tod Creasey CLA 2006-11-28 14:38:14 EST
Created attachment 54665 [details]
Updated plug-in
Comment 31 Sebastian Davids CLA 2007-01-04 14:23:51 EST
Considering the high number of votes and duplicates -- please reconsider adding this feature into the main eclipse distribution.

Just add the commands without "default" keybindings.
Comment 32 Tod Creasey CLA 2007-06-21 11:31:55 EDT
Lets try again
Comment 33 Tod Creasey CLA 2007-10-19 13:49:17 EDT
In 3.4 we are going to want to do this differently that it is implemented now so as to use the new markers and commands support.

I had a look at this again and I am still not convinced that this is not something that would be better suited to a contribution from the community rather than adding a second concept for bookmark in the SDK.

If you were to use this then I think you want to define a markerContentGenerator for this type of bookmark (see the ide plug-in).

Also all of your actions should switch to commands. You could add keybindings to them in your own plug-in as well.
Comment 34 Tod Creasey CLA 2007-10-19 16:40:48 EDT
With this plug-in loaded we currently break the multi-editor test suite (org.eclipse.ui.tests.multieditorMultiEditorTest) with this exception

java.lang.NullPointerException
	at net.sourceforge.eclipsetools.quickmarks.AbstractMarkAction.getLastStatusLine(AbstractMarkAction.java:731)
	at net.sourceforge.eclipsetools.quickmarks.AbstractMarkAction.clearMessage(AbstractMarkAction.java:303)
	at net.sourceforge.eclipsetools.quickmarks.AbstractMarkAction.selectionChanged(AbstractMarkAction.java:230)
	at org.eclipse.ui.internal.PluginAction.refreshEnablement(PluginAction.java:206)
	at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:277)
	at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:299)
	at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
	at org.eclipse.ui.internal.AbstractSelectionService.setActivePart(AbstractSelectionService.java:282)
	at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:125)
	at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:115)
	at org.eclipse.ui.internal.WWinPartService$1.partDeactivated(WWinPartService.java:48)
	at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:113)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:857)
	at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53)
	at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:111)
	at org.eclipse.ui.internal.PartService.firePartDeactivated(PartService.java:116)
	at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:165)
	at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:56)
	at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:126)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3384)
	at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:602)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2728)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2633)
	at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPage.java:2625)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2577)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2572)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2556)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2539)
	at org.eclipse.ui.tests.multieditor.MultiEditorTest.openAndValidateEditor(MultiEditorTest.java:422)
	at org.eclipse.ui.tests.multieditor.MultiEditorTest.testTrackOutline(MultiEditorTest.java:276)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:58)
	at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:122)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:124)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3721)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3358)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.pde.internal.junit.runtime.UITestApplication.start(UITestApplication.java:52)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:515)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:455)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1193)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1169)
Comment 35 Susan McCourt CLA 2009-07-15 12:47:30 EDT
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Comment 36 Cezariusz Marek CLA 2011-09-21 02:54:46 EDT
10 years and still not resolved? Even simple text editors have this feature and it's very useful.
Comment 37 Lars Vogel CLA 2014-07-02 06:11:33 EDT

*** This bug has been marked as a duplicate of bug 115202 ***