Posts
Removing leftover bundles from Eclipse
Eclipse has a rich, wonderful, installer named p2. This installer manages your Eclipse plug-ins using a nice UI and allows you to add/remove features easily. Except when it doesn’t.
For the first time in several years, I was stuck with some bundles in my installation and could not get rid of them. Deleting them outright from disk is risky and confuses Equinox ( the OSGi framework powering Eclipse ) as I’m messing with its internal state. That type of operation is also discoraged in the p2 getting started documentation .
Using synergy as a pure KVM solution
I have often used Synergy as a solution to extend my mouse and keyboard input to multiple computers at the same time. At this time however I want to present a solution to using Synergy as a pure KVM ( well, KM to be pedantic ) switch, which means changing input on -demand from one computer to another.
My need was driven by the fact that I often use one desktop, one laptop and one monitor. The desktop and the laptop are connected simultaneously to the monitor, and I can quickly switch between them. The keyboard and mouse however need to be physically moved between machines. I’ve tried a physical KVM solution, but it caused erratic behaviour in my keyboard, so I looked for something else.
A cautionary tale on thread locals, pooling and reflection
Most non-trivial Java applications use thread pools to improve performance by avoiding thread creation and optionally by limiting the maximum numbers of threads in use.
The end goal is for each task to execute in a dedicated thread, without it being aware that the thread is not a fresh one, but was used before. Starting with Java 5 the Java runtime libraries offer a wealth of options for creating thread pools in the java.util.concurrent package.
Mylyn-Mantis connector 3.11.0 released
It’s been a long time since I’ve pushed a release of the Mantis connector for Eclipse. I’m happy to say that I’ve gathered some fixes and a new release is now out.
This was mostly prompted by the MantisBT 2.0 release, which needed a small change in the plug-in to work as intended.
The full list of changes is below
- Consider all versions older than 2.0 as valid
- Add support for MantisBT 2.0
- Add support for MantisBT version 2.0
- Current version 3.10.1 cannot be installed with Eclipse Mars (4.5) Build id: 20150621-1200
- Remove references to JBoss Tools from the update site
- Investigate implementing new repository validation API for Mylyn >= 3.11
Another issue worth mentioning is that starting with this release you’ll see this warning dialog before completing the installation
Going to talk about Sling IDE Tooling at adaptTo 2014
I’m happy to say that in September I’ll be going back to Berlin for adaptTo 2014 . adaptTo is a conference which gathers developers from the Apache Sling and friends community.
I’m going to talk about the progress that we’ve made the last year with the Sling IDE Tooling and show how quickly you can develop Sling-based applications. Whether you’re working with OSGi bundles, frontend files, backend scripts or unstructured content, we have something to make you more productive.
Mylyn-Mantis connector 3.10.0 released
The major reason for this release is compatibility with the newly-released Mylyn 3.10.0 version. Of course, compatibility is retained with older Mylyn versions. Other feature highlights include:
- better usage of available space in the query page
- more resilience in case of incorrect server-side default values
Announcing Desktop Notifier for Maven 1.0
We all know that builds are supposed to be fast. Otherwise, we just end up swordfighting. But sometimes the build just takes too long, either because you have an empty ~/.m2/repository, or the integration tests take a lot of time to run, or … . But you get the point.
For this very reason I ( as the saying goes, with a little help from my friends ) built a Maven extension which shows desktop notifications whenever a build is complete. It’s smart enough to notify you at the end of the reactor build for multi-module projects and it distinguishes between success and failure.
Apache Sling: viewing bundles by start level
When packaging an Apache Sling application it is useful to see the final list of bundles included in your launchpad grouped by their start levels. This is especially true if the bundle list is configured using sensible defaults, for instance using the default bundle list as a start.
When the launchpad is packaged using the maven-bundle-plugin, the bundles are placed grouped by their start level under target/classes/resources/bundles . The ever-useful tree command allows us to inspect this directory ( I’ve removed some of the bundles to make the output easier to understand )
Mylyn-Mantis connector 3.9.0 released
The major focus of this release is compatibility with the just-released Eclipse Juno , and implicitly Mylyn 3.8 .
Visual refresh
The query page has been streamlined to have a look which is more consistent with the other Mylyn connectors by using a horizontal layout which scales easier to large numbers of projects or filters.
The people selector fields have been changed from drop-downs to auto-complete fields . This has two major benefits:
Mylyn-Mantis connector 3.8.0 released
Support for the tags and profile fields
The profile fields - platform, OS and OS Version are now editable. The tags are also available using a custom selection box. Tags are only editable for MantisBT 1.2.9 or newer - not yet released.
HTML preview using WikiText
Rich text fields now use a lightweight WikiText-based renderer rather than the old HtmlText-one, which embedded a browser in the page. The new editor should provide better cross-platform stability and performance.
Mylyn-Mantis connector 3.7.0 released
This release features multi-project queries, support for deleting task attachments and support for textarea custom fields.
Multi-project queries
MantisBT allows users to define filters as belonging to ‘All Projects’ . This is very useful for working with large numbers of projects and defining just one filter, e.g. ‘My tasks’ . You can now use these filters in Eclipse, by selecting filters available under the ‘All Projects’ node:
Deleting task attachments
Task attachments may now be deleted from the attachment’s context menu.
Mylyn-Mantis connector 3.6.0 released
Mark private comments
Building on support from Mylyn 3.6, private comments are now marked as such in the task editor.
Delete tasks
We now enable deletion of task from the MantisBT repository, not only from the local task list.
Quicker task creation
When creating a new task, selecting a query or a task in the task list before creation short-circuits the project selection page, as the project is inferred from the current selection. If no selection is available, the project selection page appears as usual.
Mylyn-Mantis connector 3.5.0 released
Monitoring tasks
Thanks to recent improvements in the MantisBT SOAP API the task monitor list is available and also the ability to add yourself to the monitor list. This functionality is only available for installations running MantisBT 1.2.5 or newer.
Rich text support for comments
Our rich text support is extended to the new comment editor. We are also rendering comments as HTML if the rich text editor preference is enabled.
Mylyn-Mantis connector source moved to GitHub
SourceForge.net is a great place for an OpenSource project, taking care behind the scenes of many things so we don’t have to. That being said, GitHub’s way of encouraging contributions is a great incentive for projects to move there, so we bit the bullet and moved the source. The new location is https://github.com/Mylyn-Mantis/mylyn-mantis .
The current repository at SourceForge will remain in read-only while we make sure that the GitHub move is a success. Our other facilities - forums, issues, wiki etc - will remain at SourceForge for the time being.
Mylyn-Mantis connector 3.4.1 released
The 3.4.1 release of the connector is primarily a bugfix release concerning the HTML editor.
Open query in browser
Open query in browser is now available for users of MantisBT 1.2.5 or newer. To activate it for an existing query you need to refresh the repository configuration and then reopen the query dialog.
Update site fixes
The update site did not reference the latest available Mylyn version, but we did require it. This prevented users running versions of Mylyn 3.4 or older from installing the connector. Now the installation process is verified to work for old versions as well.
Mylyn-Mantis connector 3.4.0 released
This release features an experimental rich text HTML editor, display of real names for comments and minor performance improvements to the task editor.
Rich text editor
The task editor was based on the plain-text contents of the task, which was sub-optimal when the task description contained HTML markup. Now there is an experimental setting in the task repository page which allows you to activate the rich text editor.
Be warned that it still has its kinks, and I’m putting this out for feedback rather than for mass consumption. It is expected that the formatting will not yet completely match the one from Mantis and that some features such as highlighting incoming changes and dirty tracking are broken or require a nightly build of Mylyn.
Maven Recipe : GWT development profile
It’s no secret that I am a fan of GWT for web development. I believe it to be a superior solution for large-scale Javascript development. However, it does come with some downsides. Verbosity is one of them, but we have a solution for that - see how to cut down GWT’s verbosity. Another one is the long compilation time. Since GWT generates permutations for multiple browser targets - 6 in version 2.1 - you will wait more than needed if you just need to compile for one browser.
Mylyn-Mantis connector 3.3.1 released
This version rounds up a number of small fixes and enhancements.
Better search dialog integration
Searching for an nonexistent issue now pops up an informative dialog, rather than a scary internal error one.
Attachment page enhancements
The attachment description fields is superfluous, and was removed. Comments are now created if specified.
Sub-task creation enhancements
A manual sync was needed to enable the ‘Create Subtask’ action on existing tasks. This requirement has been removed. Also, new sub-tasks have custom fields added before creation.
Mylyn-Mantis connector 3.3.0 released
The 3.3.0 release focuses on usability issues, aiming to make connector simpler to use and closer to the brower-based MantisBT experience.
Repository dialog improvements
We now recognized when the task repository returns a HTTP redirect, which usually signals that another location should be specified. The user is properly notified, instead of being presented an error dialog.
As you might notice from the above screenshot, we no longer require you to enter the full path to the repository location. Although we support the old setting, we encourage you to enter just the base path to your MantisBT installation.
Mylyn-Mantis connector 3.2.0 released
Version 3.2.0 is a major feature release, comprising of performance enhancements, complete support for localised MantisBT repositories and better support for repository-configured settings.
Performance enhancements
Refreshing the repository configuration is usually slow due to large number of configuration settings that are retrieved. A first step towards making this faster is to implement refreshing the configuration of a single project only. This feature is now implemented and you can refresh only a single project’s attributes using the corresponding task editor button .
Mylyn-Mantis connector 3.1.5 released
Time has come for another release of the Mylyn connector for MantisBT. I find that these released don’t arrive so often since the connector is solid and has the features that I for one need for day-to-day usage.
Nevertheless, I found the time to remove some issues which have annoyed both me and the users kind enough to report them.
Correct display of incoming changes
I’ve worked hard to correctly display incoming changes in both the task list and the popup notification used by Mylyn. The connector used to display changes from one step behind and this has annoyed me for a long time. No more.
Mylyn-Mantis connector 3.1.4 released
This release of the connector brings around minor improvements and bugfixes.
One notably troublesome problem was not being able to run under IBM RAD 7.5.5, which was solved by re-organizing the Import-Package and Require-Bundle statements to please the 3.4 platform.
Yet another bug which affected non-English based MantisBT installations was fixed, and installation from the Mylyn Connector discover tool / Eclipse Marketplace was fixed.
This release also features support for the SOAP API changes from MantisBT 1.2.2.
Cutting down GWT's verbosity with gwt-mpv-apt
I am strong believer in GWT’s potential as a client-side web development solution. Its value proposition is quite exciting: write all your web code in Java, using tools of your choice, and the GWT compiler will output highly tuned, browser-compatible JavaScript. I use it whenever possible and never look back.
Still, there are some times when I feel that GWT’s programming style is too verbose ( see Reducing GWT custom widget verbosity ) to be really productive. I obviously save a lot of time, compared to what I would need to write a comparable interface using “plain” Javascript. But that does not mean that I’m happy to spend time writing code which in “real” Java would be much simplified using reflection. As there is no reflection ( java.lang.reflect ) support in GWT, I was stuck writing verbose code for event handling and DTOs.
Maven Recipe: Delivering applications as RPMs
In the Java world, the standard unit of delivery is the jar/war/(x)ar file. For applications which don’t fit the ‘single file’ delivery model, there is no standard alternative. To provide a solution, I will show you how to package your application with Maven as an RPM.
As we are talking about Maven, the solution starts with finding the right plugin - in our situation the rpm-maven-plugin. We include the plugin as follows:
Maven Recipe: Building an aggregate jar
Maven builds follow the “one project, one artifact” rule. This means that although it’s possible to build more than one artifact from a Maven project, it’s not a good idea. It also means that while it’s also possible to build one artifact from multiple projects, it’s not entirely straightforward, and that’s what this post is about.
When refactoring a monolithic build into a modular one, often the downstream consumers are not prepared to consume multiple artifacts, so the build still needs to create a single jar with all the classes. This type of change is what I like to call build refactoring, similar to code refactoring. If code refactoring deals in restructuring an existing body of code, build refactoring aims to restructure an existing build.
Mylyn-Mantis connector 3.1.2 released
A few bugs sneaked in the 3.1.1 release - which should’ve been named 3.2.0 due to its new features - so 3.1.2 a small bugfix and stability release is now out.
Noteworthy fixes:
- All repository dates were incorrectly parsed . This also had the unpleasant side effect of always considering the tasks stale, which slowed operations a lot.
- We now properly retrieve and set the ‘assigned’ status for bugs. This is important for both non-English installations and for projects using custom statuses.
Mylyn-Mantis connector 3.1.1 released
This version is hot on the heels of Mantis 1.2.0 , therefore we build on the latest SOAP features added in that release.
Retrieve tasks using built-in filters
Up till now, retrieving tasks was only possible if you defined filters using the web interface. We now take advantage of recent bug fixes in MantisBT to retrieve the latest project tasks, without defining a project filter.
Due date integration
We now recognize and display the due date field if the repository supports it. Not only that, but the Mantis and Mylyn due dates are kept in sync. Note the due icon and the due date overlay
Mylyn-Mantis connector 3.1.0 released
The Mylyn-Mantis connector 3.1.0 brings new features and stability improvements. The highlight of this release is building on Mylyn’s web services support to bring a more predictable model of interaction with the Mantis repositories.
Credentials dialog
We now build on the support offered by Mylyn to display a credentials dialog when access is denied for a SOAP operation.
Improved sub-projects display
Sub-projects are now clearly displayed in the new query page.
Mylyn-Mantis connector 3.0.6 released
UI improvements
The Steps to reproduce and Additional info fields are now collapsed if empty. This helps increase the information density when first opening the task editor.
Better support for internationalised Mantis installations
Until this release the connector was reading the task status as a string and looking for the harcoded default values. This broke both internationalised Mantis installations and those with custom workflows.
Now we do the right thing and compare the task status priority with the one defined in the Mantis installation, which means we behave exactly as the web interface does.
Mylyn-Mantis Connector 3.0.5 released
Custom field support
The headline for this release is custom fields are now supported. The fields are enabled by default and usable for both new task submissions and editing existing tasks. I’ve also enabled the ETA field to be a drop-down list.
Filtered trees for project selection
Project selection for the new task wizard and new query wizard now use the more elegant filtered trees provided by the Mylyn project.
Mylyn-Mantis Connector 3.0.4 released
Summer seems to be a good time for hacking code, and I’ve prepared a new release of the Mantis Connector for Mylyn.
Version 3.0.4 adds the possibility of creating sub-tasks for repositories which support it ( version 1.2.0a3 or better):
Other fixes of interest are:
- Provide user-friendly error messages on repository validation;
- Fixed problem with file uploads which happened on starting with Mantis 1.1.7;
- Fixed problem with being unable to submit tasks for repositories with custom priorities.
As always, our bug tracker and forums await you.
Official Eclipse 3.5 builds for Solaris
Eclipse 3.5 M7 introduced a small gem in the Eclipse Platform: Solaris x86 has joined the lineup of supported configurations for which SWT and Eclipse are routinely built.
Although there always ways the option of Solipse, it is better to have the official platform vendorsupport your configurations. The change does make OpenSolaris a more attractive development platform, and I’m more inclined than ever to make the switch.
Mylyn-Mantis connector quick install in Mylyn 3.2
The recent Mylyn 3.2 release features a host of improvements, but one stands out for me, as a Mylyn-Mantis connector committer: the connector discovery mechanism, which allows easy installation of connectors. Mik Kersten has blogged about this already, so I won’t spent too much time praising it.
Even more exciting is that it includes the Mylyn-Mantis connector by default:
This is great news for our visibility, and I hope it will bring a lot of new users, and possibly new contributors.
Eclipse and Firefox 3.1 on Linux
Eclipse and Firefox 3.1 ( or XulRunner 1.9.1 to be more precise ) don’t work well together on Linux. Using MOZILLA_FIVE_HOME and LD_LIBRARY_PATH yields no results.
Fortunately, there is a workaround: have FireFox 3.0 ( or XulRunner 1.9.0 ) installed as well, and modify your eclipse.ini to contain
-vmargs
-Dorg.eclipse.swt.browser.XULRunnerPath=PATH_TO_XULRUNNER_1.9.0
References: