Numbered Bookmarks for recent version of the NetBeans IDE

I’ve been working with Lazarus for many years and really like the bookmark system in the editor. NetBeans also has bookmarks support but working with it is a real pain.

Yesterday I found a Numbered Bookmarks plugin from M.A.S.Jayasundara. Unfortunately this plugin has not been updated for years but we have the source code! One command in the terminal svn checkout https://svn.java.net/svn/numberedbookmarks~svn/ and source code were download to my computer. Great is, I could compile and create the NDB file without any problem.

I use NetBeans for PHP development only, I had to download and install full version to compile the extension. Here is the result – Numbered bookmarks for NetBeans 8.0.2.

How to install Numbered Bookmarks plugin

Download the file to your hard drive, run NetBeans, go to Tools -> Plugins  and choose the  Downloaded tab.

netbeans_plugins
Now click to the Add Plugins… button and select the net-java-nb.nbm file.

netbeans_plugin_install

Now you can click to the Install button. Go through the installation process and confirm also the message informs you the plugin is not signed. Click to Finish and restart the NetBeans. If you don’t restart it, you won’t be able to set shortcuts.

Shortcuts

Go to Tools -> Options and on the top choose Keymap. You should see something like this:

netbeans_plugins_options

Click to the Action column description, the items will be sorted by their names. Now look for Goto Bookmark item. Double click into the Shortcut column of Goto Bookmark 1  and hit CTRL+1. This shortcut is already assigned to something else, NetBeans will inform you about that. I clicked to Yes because I’ve never used it before. Now it’s assigned to Goto bookmark 1. Assign other Goto bookmark with all numbers. It will look like this:

netbeans_plugins_goto_shortcut

Goto bookmark will work but we have to create shortcut for toggle bookmark. Now look for Toggle Bookmark item.

The Toggle bookmark 1 will have CTRL+Shift+1 shortcut. Please assign also the rest of Toggle bookmark shortcuts. The result will look like this:

netbeans_plugins_shortcuts_toggle_final

Click to Apply and OK. Go to somewhere in your source code and hit CTRL+Shift+1 and you should see nice icon instead of a line number.

netbeans_bookmark_done
Scroll down in the opened file or open another file, hit CTRL+1 and you are back! Unfortunately this plugin has one disadvantage – after you close the NetBeans, all bookmarks are gone. You have to place them again. I’m going to study the source code and solve this issue.

1 komentář u „Numbered Bookmarks for recent version of the NetBeans IDE

  1. crashmeuster

    Thanks. I am using netbeans after a long layoff and I used to use this plugin. Glad to find a working version for the latest Netbeans (8.2).

Napsat komentář

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *