New Quick Bookmarks Release 1.2

Version 1.2 of Quick Bookmarks introduces a few new features.

A third page was added to the popup dialogue listing all bookmarks from the workspaces. The selected bookmark list in the dialogue is now remembered even when restarting Eclipse.

Bookmarks store the editor type they were set in. For example, when opening an HTML file in a text editor and setting a bookmark, then reopening the same file in browser mode, jumping to the bookmark will jump to the text editor instead of the browser.

For installation instructions, please see here. As always, feedback is welcome.

b70f8695438696b3f6f35cd12ab0c853
Share via email Share
Posted in Quick Bookmarks | Tagged , , , | Leave a comment

New Quick Bookmarks Release 1.1

Version 1.1 of Quick Bookmarks adds a popup dialogue listing the most recently used bookmarks:

Quick BookmarksThe dialogue is triggered via Alt+End and can be navigated with the cursor keys. Selecting a bookmark and pressing Return jumps directly to the bookmark and also moves it to the top of the list.

For installation instructions, please see here. As always, feedback is welcome.

82c98e1f0639dffcd15a104c4e27fb9c
Share via email Share
Posted in Quick Bookmarks | Tagged , , , | Leave a comment

New Eclipse Plug-in: Quick Bookmarks

For years I’ve been missing simple bookmarks in Eclipse – bookmarks that can be quickly toggled and navigated via the keyboard, like I remember them from Delphi all those years ago.

Now I decided to do something against it and wrote another simple plug-in: Quick Bookmarks.

It doesn’t do much – just provide a keyboard shortcut to add or remove a bookmark from the current editor line, and two shortcuts to jump to the previous or next bookmark relative to the current line. The bookmarks created by the plug-in are sub types of the standard Eclipse bookmarks, but you don’t have to enter a name every time you create a new bookmark.

Feedback, as always, is welcome.

185332b4a5c4049b885212c4b25b845e
Share via email Share
Posted in Uncategorized | Tagged , , , | Leave a comment

New Releases

Over the past weeks I’ve made several bug fixes to Grep Console and Tail Console. In the case of Clippets, I’ve added new few features.

Grep Console’s popup notification implementation is now also used by Clippets and therefore has been moved to its own plug-in. Eclipse will automatically install the new plug-in when installing or updating to the latest versions.

As always, feedback is welcome.

Grep Console 3.6.1

This is a bugfix release, containing the following fixes:

  • Disablement of items not stored – Disabled items were enabled again after reloading the configuration. Folderes were unaffected. Thanks to Thomas Widmaier for reporting this bug.
  • Wrong style ranges for overlapping highlighting styles – Overlapping styles ended one character too early, leaving the last matched character unstyled. Thanks to 赛文思 for reporting this bug.
  • File link path and base dir not handled correctly – Absolute file paths were not recognised correctly and would always be prefixed with the base directory. Some Eclipse variables return file: URIs. These are now automatically converted to regular file paths. Thanks to 赛文思 for reporting this bug.

For installation instructions, please see here.

Clippets 1.1.0

This is a feature release, containing the following improvements:

  • Styles – Clippets can now be assigned styles to change the foreground and background colours shown in clippet lists.
  • Clippet collection memory – The clippet selection popup by default now opens with the last clippet collection that was selected. Changing the collection also updates the Clippet View. Both features can be deactivated in the preferences.
  • Popup notifications – To provide feedback with some of the “blind” actions (e.g. recalling clippets via keyboard shorcuts), certain actions now trigger notification popup notifications. These popups can be disabled in the preferences.
  • Inserting clippets – A new action (triggered e.g. by double clicking a clippet) directly inserts the selected clippet into the current editor without changing the clipboard content. Thanks to Robert Mark Bram for suggesting this feature.
  • Store to selection in popup – Pressing Shift+Enter in the clippet storing popup dialogue now stores the clipboard content into the selected clippet. Thanks to Robert Mark Bram for suggesting this feature.

For installation instructions, please see here.

Tail Console 1.0.1:

This is a bugfix release, containing the following fix:

  • Launch configuration icon – The launch configuration was missing an icon.

For installation instructions, please see here.

Popup Notifications 1.0:

This is a helper plug-in. It doesn’t offer any active end user features on its own. Instead, it provides an API to display popup notifications that automatically disappear after a short moment. The plug-in is used by both Grep Console and Clippets and may be used in other projects under the terms of the Eclipse Public Licence.

For more info, please see here.

96e18b949a334578cbf90e5428003da6
Share via email Share
Posted in Clippets, Eclipse, Grep Console, Tail Console | Tagged , , , , , | Leave a comment

Remote control your Android phone through adb

I wrecked my phone the other day:

Broken PhoneDoesn’t look so bad, but in fact the touch screen is completely dead. So not only do I now have to decide whether to get a new phone or try to replace the screen myself, I also had to find a way to regain control over the phone so I could backup my data.

A bluetooth mouse would be one way to control the phone without the touch screen, but I don’t have one – and even if I did, I didn’t have bluetooth turned on (though that could apparently be accomplished through the console).

A USB keyboard would also be of help if the Nexus 4 had USB Host support. Sadly, unlike the Nexus 5 (and the Nexus 1, if I recall correctly), doesn’t.

What else then? A series of internet searches yielded the following results:

  1. There’s a ton of remote control apps for Android (as was to be expected). Most require root though. Those that don’t generally can’t control the touchscreen/mouse. And even they generally require some setup steps before they can be used – back to the start.
  2. adb (the Android Debug Bridge, part of the SDK tools) provides shell access to the phone via USB. And the shell has commands to simulate key presses and touch events. Touch events require the exact screen coordinates as numbers, so as a standalone solution that’s still rather tedious.
  3. There are ways to get screenshots from an Android phone through adb – obviously; after all, even the official Eclipse plug-ins provide a screenshot feature.
  4. A combination of points 2 and 3 would be a way to actually simulate touch events in a useful manner. Astonishingly though, nobody seems to have written such a tool.

So what does a programmer to when the obvious tool doesn’t yet exist? Write it himself, of course.

ADB Control

I spent yesterday evening hacking together a crude Java tool to serve as a primitive remote control through an Android phone. I present it here in case someone else might face the same problem I did. It requires no extra software installed on the phone, just a USB connection and the Java tool (Java 7 required) and SDK tools installed on the computer. It uses adb access to the phone – meaning that you have to have the SDK tools installed and you have to have already confirmed the USB debug connection on your phone earlier. If you didn’t, connecting the phone will open a confirmation dialogue on the phone – and without a touchscreen, you obviously won’t be able to confirm it. But if you’re a programmer like me and have already access the phone via adb before, all you have to do is fire up the tool on the computer. I won’t get into how to setup and configure adb here – please check the official docs if necessary.

The tool does the following:

  • Repeatedly grab a screenshot from the phone and display it in a Window
  • Capture keyboard events and forward them to the phone
  • Capture mouse clicks and drags and forward them to the phone

It’s slow as hell (everything is being done through shell calls, which makes the screenshot updates particularly slow), but it works.

Before you first start it, make sure you have adb installed and modify the config file provided with the download. It contains four settings:

  • adbCommand – the full path to the adb tool as a shell command. Linux users note that Java doesn’t seem like the ~ character in file paths to access the home directory.
  • screenshotDelay – the delay (in milliseconds) between displaying a screenshot and grabbing the next one. Note that the actual grabbing process will probably take considerably longer than this delay, so the update rate will be slower.
  • localImageFilePath – the tool has to download the image file from the phone. This path tells it where to store the file on the local system before displaying it.
  • phoneImageFilePath – the location on the phone where the screenshot file is stored before downloading it.

Once the configuration is done, simply run the tool like this:

java -jar adbcontrol.jar

If you put the config file in a different directory, you can add the path to it as an option after the jar file name.

Here’s what it looks like:

ADB ControlIn the window, you can single click to send a tap event or click-drag to send a swipe event to the phone. Pressing a number or letter key (or anything else that produces an ASCII character between 33 and 127) will send that key press to the phone. Additionally, the following keys are forwarded:

  • Enter
  • Escape – as the Back key on Android
  • Home
  • Backspace
  • Cursor keys

Download

The download includes the full source code and is provided under the Eclipse Public Licence.




In case you find this tool useful, please consider donating – after all, I only wrote it because I wrecked my phone.

3c79ebe22acefd9649ff9a23c21f8563
Share via email Share
Posted in Android, Uncategorized | Tagged , , | 2 Comments

New Grep Console Release 3.6 and two new Eclipse plug-ins

It’s been a while since the last update, but there finally is a new version of Grep Console, providing bug fixes and a new feature.

Features:

  • Statistics – Expression occurences can be counted and displayed in a separate view. Also, the last match for an expression can be displayed in the same view. Based on a feature suggestion by Frank Musolf.

Bug Fixes:

  • When an item has a null name and expression, the item table throws null pointer exceptions. Reported by Thomas Klimke.
  • Grep View should be cleared when the console is cleared. Reported by Thomas Dutreuilh.

Also, because it has been such a frequent cause of confusion, the default match length for Grep View matching has been increased to 100.

As usual, thanks go to everyone who sent suggestions and bug reports to help continue improving Grep Console.

For installation instructions, please see here. As always, feedback is welcome.

New Plug-in: Tail Console

Jakub Staš suggested allowing Grep View to open random text files. Instead of implementing this as a Grep Console feature, I turned it into a separate plug-in.

Tail ConsoleTail Console can open text files and output them to a new console. Like the GNU command line tool tail, the console will keep monitoring the file and output any new content added to the file live.

Tail Console is fully compatible with Grep Console (in its latest version), so using both plug-ins together, text files can be styled and filtered as usual with Grep Console.

New Plug-in: Clippets

This is based on an idea I’d been thinking about for a long time. Clippets allows you to store the current clipboard text content inside Eclipse, temporarily or permanently, and later recall it directly to the clipboard, allowing you to use the clipboard for other content and then return to the earlier text. These so-called “clippets” can be arranged in collections for better overview.

ClippetsI have several ideas for extending Clippets with advanced features, but before I think about them in detail, I’d like to see what others think about the core functionality – and get used to working with it myself. So if you like the plug-in and have any feedback or feature suggestions, be sure to let me know!

8773a9613018c1c2d5eed1befc76e113
Share via email Share
Posted in Clippets, Grep Console, Tail Console | Tagged , , , | Leave a comment

Flash Builder and Grep Console (video)

Steve Warren has posted a video on using Grep Console in Flash Builder on his blog.

4671e7c9dd5334eb1d6bcb282e5309ce
Share via email Share
Posted in Grep Console | Tagged , , | Leave a comment

Eclipse, CMake and C++11

Getting C++11 to work with CMake is easy. Getting Eclipse to work with a CMake project is easy. Getting Eclipse to work with C++11 also seems to be relatively easy (there are plenty of guides on various wikis).

But getting all three to cooperate nicely is a bit trickier – or rather, the standard Eclipse way to configure C++11 support doesn’t work for CMake projects, and none of the guides I could find at first mentioned that.

It’s perfectly possible to work with a C++11 CMake project in Eclipse without any special settings. Compiling and running the code works fine (as the compiler gets its settings from the CMake config), but the code editor will keep mark various C++11 code bits as errors.

Fortunately, this Stack Overflow post shows how easy it is to fix this for Eclipse Kepler if you just know the right option to set. Simply create your Eclipse project with something like this:

cmake ../my_src_dir -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_VERSION=4.2 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_ARG1=-std=c++11

The above is for a Linux Make project. For different platforms, change the -G option accordingly. The relevant bit is of course the CMAKE_CXX_COMPILER_ARG1 option.

85b7fbdcd29918fee01a59ac5a76bf90
Share via email Share
Posted in C++11, CMake, Eclipse | Tagged , , | Leave a comment

Bugfix Release: Grep Console 3.5.1

Two bugs were introduced in version 3.5 and have been fixed in service release 3.5.1:

  • Old, close consoles would throw null pointer exceptions when the Grep View filter settings were changed
  • Even if notifications were disabled for an expression item, they would still be triggered when the item filtered lines to the Grep View

For installation instructions, please see here. As always, feedback is welcome.

8773bc16d5a1258c9d85d2bb0a8a7466
Share via email Share
Posted in Grep Console | Tagged , | Leave a comment

Eclipse 4.x tab font sizes in GTK

The Eclipse 4 branch introduced some notable visual changes compared to the previous 3.x releases, like a reliance on more whites than greys. While unexpected at first, most of these changes just take some getting used to. With the exception of the size of the tab title font, that is – on GTK in Linux, tabs are just huge:

Bad tabs (huge).Fortunately, there’s an easy remedy to be found on Stack Overflow. Eclipse’s design is now based on CSS files. For the GTK main layout, the file is $eclipse/plugins/org.eclipse.platform_4.*/css/e4_default_gtk.css, and the CSS responsible for the tab headers is .MPartStack.

A simple change to this class is sufficient to set the tab font size back to normal:

.MPartStack {
/*      font-size: 11;*/
        swt-simple: false;
        swt-mru-visible: false;
}

As you can see, it’s enough to simply comment out the font-size style to set the size back to normal:

Good tabs (normal).

b3b081a10541de2c83018730f797de52
Share via email Share
Posted in Eclipse, Linux | Tagged , , | 2 Comments