Dartboard: Icons, bug fixes & a new committer
Dart icon, bug fixes and a new committer. Dartboard is getting better and better every week. So what's new?
Installing the plug-in typically involved adding an update site, downloading its content and then installing the plug-in. This process is quite tedious. That's why I added the plug-in to the Eclipse Marketplace, which is much nicer to use.
To install the plug-in from the marketplace make sure you have the Marketplace client installed. Open the marketplace entry and drag and drop the install button into your running Eclipse instance. Alternatively, you can open the Marketplace client from the Help>Eclipse Marketplace... menu and search for Dartboard.
In the future you will also receive notifications about updates and an option to update the plug-in.
Since using the icon of the Dart language requires to first ask permission from Google, it took some time to use the logo in the project. Now however we are allowed to use the icon and I have added it to the code base. It is now shown in many places like launch configurations or file creation wizards.
Property Testers Instead of Project Natures
In my last post I wrote about the usage of project natures in the plug-in. After reevaluating this, we came to the conclusion that it is better to use property testers instead. The reason for this is, that project natures are written into the project configuration file. One drawback to this is that a project nature is extremely Eclipse specific. This means that just importing a project might not enable all features.
To curb with this problem, I removed the project natures again and added a
PropertyTester that checks for the existence of a
pubspec.yaml file or any file with the
.dart file extension.
The first implementation of the Dart console, that was used to display output from Dart programs, was very basic. It did not allow to cancel the currently running program and did not remove itself when it wasn't needed anymore.
It turns out that the Eclipse IDE APIs actually allow to use a
ProcessConsole for these tasks. Using the Console just requires to add a process. It will take care of life cycling and lets the user cancel longer running tasks.
The Dart preference was also heavily improved. Firstly, on first starts of the IDE with the plug-in installed it automatically tries to detect the location of the Dart SDK that is on the path of the host system. If it can't find an SDK, a warning will be shown.
Secondly, the validations on the preference page now validate if the entered location is actually a valid Dart SDK location. If not the "Apply" button will not be enabled.
Custom Methods in LSP4J
The Dart analysis server uses some custom methods when communicating with the client. To handle these however a custom handler for each method is needed. If no handler is available LSP4J will throw an error.
The custom method from the Dart analysis server was
$ at the beginning indicates that it's a custom method. The
analyzerStatus method is used to notify the client of the current analyzer status (e.g. if the server is currently analyzing or not). This information could be used to indicate the status in the UI in the future. For now it was sufficient to just have a handler that essentially suppressed the error message.
See dartboard#35 for more details.
I would also like to mention that the project now has its first committer: Lakshminarayana Nekkanti. After he raised a few pull request in the past weeks, we decided that it would be very nice to have him as a committer.
Thanks Lakshminarayana for your excellent work and code reviews.
Licenses and Signing
Artifacts from our build server are now signed by the Eclipse Foundation. Essentially this means you can be sure that the artifact you are downloading is in fact our plug-in. Upon installation the licenses (EPL2) are now also shown.
As this post marks half of my time with Google Summer of Code, there is only one and a half month to go. There are still some things left to do and I'm looking forward to increasing the plug-ins user count and its features in the next weeks.
Dart and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.