July 25, 2014

Yakindu Statechart Tools 2.3.0 is ready for Luna!


Today, the Luna release train arrived at Yakindu Statechart Tools Station! Apart from Luna compatibility, the new release version 2.3.0 provides some great new features. If you are new to statecharts and Yakindu Statechart Tools you should take a look at our Getting Started Tutorial.



Installation

 

You can download Yakindu Statechart Tools 2.3.0 for Luna either from our dowload page or install it into your existing Eclipse installation via our update site:

http://updates.yakindu.org/sct/luna/release

New and Noteworthy

Version 2.3.0 is shipped with a new C++ Code Generator. Of course, all advanced statechart features like history states and parallel regions are supported. Furthermore, we implemented some features requested via our user group, for example a name wrangler for c function names and fixed a bunch of bugs. Of course, all the other cool new Luna features like the split editor are working with the new release, even the dark theme is. ;-)
Another interesting project worth to mention is the Statechart Tools Arduino Integration. Marco wrote a great article on how to run the generated statechart tools code on an Arduino board.

What's next? 

 

Based on the new GMF Compare feature (thanks for this, great job!) we started to create a diff/merge viewer for statechart diagrams. Since our viewer's merge functionality is not stable yet, we decided to publish it with the next release. However, if you want to test it, you can checkout the plugin from our svn repository. Do not forget to send us some feedback!

 
Preview of the new SCT Diff/Merge viewer



We hope you like the new Statechart Tools release, if you have any questions do not hesitate to contact us via our user group!

Committer and Contributor Hangout -- Eclipse Project Infrastructure and Best Practices

Thanh Ha from the Eclipse Foundation will be talking about our infrastructure, some best practices and using Hudson, Git and Garret. Links Below: IT Infrastructure https://wiki.eclipse.org/IT_Infrastructure_Doc Common Build Infrastructure https://wiki.eclipse.org/CBI Hudson https://wiki.eclipse.org/Hudson Social Coding (GitHub) https://wiki.eclipse.org/Social_Coding/Hosting_a_Project_at_GitHub Git Code Contributions https://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions Gerrit https://wiki.eclipse.org/Gerrit Sonar https://wiki.eclipse.org/Sonar
July 24, 2014

JFace Viewers in a Java8 world – Part 1 ListViewer

Most people who write RCP applications today know about JFace Viewers and in my opinion the Viewer framework is one of the best programming patterns that came out of Eclipse – easy to understand, easy to apply but still powerful.

Still working with viewers in a world of Java8 feels really bad because of 2 things:

  • JFace Viewers don’t have generics and useage of Object[] in the API
  • JFace APIs does not use SAM-Types

There’s a google summer of code project that tries to add generics to the JFace Viewer API but this does not change the 2nd IMHO as important part – the API feels alien in a Java8 world of lambda expressions and method references.

A few weeks back a discussion came up at the GEF mailing list in conjunction with GEF4 who thought API adopting the JFace API to setup graph viewers but that brought up a 3rd problem – JFace Viewer does not completely hide the SWT API and because GEF4 is designed to be widget toolkit agnostic then JFace Viewer API.

So the requirements for a revised JFace API is:

  1. Use generics to provide type safety
  2. Make use of SAM types
  3. Do not depend of any toolkit technology

Today I had to make a break from my day work and thought about how an Viewer 2.0 would look like and this what I came up with:

Viewer.java

/**
 * Base interface of all viewers
 * 
 * @param <O>
 *            the domain object representing a row
 * @param <I>
 *            the input to the viewer
 * @param <C>
 *            the content provider responsible to translate the input into the
 *            internal structure
 */
public interface Viewer<O, I, C extends ContentProvider<O, I>> {
  public void setContentProvider(
    @NonNull Supplier<@NonNull C> contentProvider);

  public void setInput(@NonNull Supplier<@NonNull I> input);
}

You notice that the content-provider and input are not set directly but through suppliers, the reason for that is the input most of the time is not created next to viewer but through a method call into the business layer and for the content provider one often uses a factory to reuse content provider implementations.

So the 2nd and 3rd step of setting up Viewers 2.0 would look like this:

public class Demo {

  private void setup(ListViewer<Person,List<Person>,ContentProvider<Person, List<Person>>> viewer) {
    // ... (setup of labels, ...)
    viewer.setContentProvider(
      ContentProviderFactory::createListContentProvider);
    viewer.setInput(this::listInput);
  }

  // ....
}

and the helper methods could look like this:

private List<Person> listInput() {
  try {
    return Arrays.asList(
      new Person(false, "Tom", "Schindl", format.parse("01.05.1979")),
      new Person(true, "Maria", "Musterfrau", format.parse("01.05.1970"))
    );
  } catch (ParseException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
  return Collections.emptyList();
}
public class ContentProviderFactory {
  public static <O> ContentProvider<O, List<O>> createListContentProvider() {
    return new ContentProvider<O, List<O>>() {
      @Override
      public List<O> getRootElements(List<O> input) {
        return input;
      }
    };
  }

  // ... more factory
}

Let’s go on with the translation of the domain element into information a the viewer can present so we need to take a look at the ListViewer interface:

public interface ListViewer<O, I, C extends ContentProvider<O, I>> extends Viewer<O, I, C> {
  /**
   * Translate the domain object into a string
   * 
   * @param converter
   *            the converter
   * @return the list viewer
   */
  public ListViewer<O, I, C> textProvider(
    Function<@NonNull O, @Nullable String> converter);

  /**
   * Translate the domain object into a style information to style the cell
   * and its contents e.g. background color
   * 
   * @param converter
   *            the converter
   * @return the list viewer
   */
  public ListViewer<O, I, C> styleProvider(
    Function<@NonNull O, @Nullable String> converter);

  /**
   * Translate the domain object into a style ranges
   * 
   * @param converter
   *            the converter
   * @return the list viewer
   */
  public ListViewer<O, I, C> textStyleRangeProvider(
    Function<@NonNull O, @NonNull List<@NonNull StyleRange>> converter);

  /**
   * Translate the domain object into an image definition
   * 
   * @param converter
   *            the converter
   * @return the list viewer
   */
  public ListViewer<O, I, C> graphicProvider(
    Function<@NonNull O, @Nullable String> converter);

This makes our complete setup look like this:

public class Demo {

  private void setup(ListViewer<Person,List<Person>,ContentProvider<Person, List<Person>>> viewer) {
    viewer
     .textProvider(this::personFullText)
     .graphicProvider(this::genderImage);

    viewer.setContentProvider(
      ContentProviderFactory::createListContentProvider);
    viewer.setInput(this::listInput);
  }

  // ....
}

where the textProvider and graphicProvider-Function look like this:

private String personFullText(Person p) {
  return p.getFirstname() + "," + p.getLastname() 
   + "("+format.format(p.getBirthdate())+")";
}
private String genderImage(Person p) {
  return p.isFemale() ? "female.png" : "male.png";
}

That’s it for today – in the next post I’ll show you how a revised TableViewer API could look like


Announcing Jnario 1.0

After lots of improvements behind the scenes I finally decided to release Jnario 1.0. If you are new to Jnario, here is a blog post introducing the main features of Jnario. You can install the new release via update site or maven. Special thanks go to Stefan Oehme, Boris Brodski and Sebastian Poetzsch for their help and contributions!

Xtend 2.6 Compatibility

Jnario is based on Xtend and this release provides compatibility to Xtend 2.6! This means you benefit from all the improvements made in Xtend 2.6 when writing tests with Jnario. One of the most prominent new features is that you can define anonymous classes in your Jnario specs. This is a great way to quickly create test stubs in your specs. Furthermore, the IDE performance in Eclipse has also been greatly improved.

Fun with Tables

Tables have always been one of my favorite features of Jnario specs. Thanks to Sebastian Poetzsch, using tables has become even more fun in this release! Sebastian contributed an automated formatter for specs, which works also for tables. No more fiddling with spaces when formatting your tables necessary! Just press (CTRL|CMD)+SHIFT+F and there you go:

Improved Maven Support

The standalone Jnario compiler has been completely rewritten. This lays the foundation for future support for other build environments such as gradle. Right now, this means faster compile times when compiling Jnario specs with Maven. In general the maven support has been improved. For example, in combination m2e, Eclipse will automatically synchronize your maven and project configuration.

Better Docs

There has been lots of fixes for generating html reports from your Jnario specifications. If you are curious, here is a great example for what executable documentations created with Jnario can look like.

Want to know more?

Check out the documentation or join the mailing list. You can find the full release notes here

These posts might also be interesting for you:

Happy testing!

Warning: AngularJS Modules are not Modular

In most frameworks and languages, a module's exports are only visible to the other modules that directly import it. As a simple example, the following node.js program prints undefined:

parent.js

require('./sub1');
require('./sub2');

sub1.js

exports.myVal = 7;

sub2.js

console.log(require('./parent').myVal);

> node parent.js

Ignoring the fact that circular dependencies are evil, a novice node user would realize why the printed value is undefined. The reason is one of the defining characteristics of the node module system (actually, it is a characteristic of most module systems ever created). Modules must explicitly declare the modules that they use. Referencing values from modules that are not explicitly required will result in undefined values or errors.

This is not so with AngularJS.

The Angular module system provides some nice syntax to describe required modules. For example, this says that the parent module uses the sub1 and sub2 modules:

angular.module('parent', ['sub1', 'sub2']);

Now, let's assume that sub1, and sub2 each declare no dependencies:

angular.module('sub1', []);
angular.module('sub2', []);

Using just about any other module system as a guide, you would expect that code from parent can reference (i.e., inject) values from either sub1 or sub2, but neither of the sub-modules can reference values from each other or parent.

But, no. That is not the case. Consider that this is added to the app:

angular.module('sub1')
.run(function(sub2Value) {
console.log(sub2Value);
});

angular.module('sub2').value('sub2Value', 'I should be an error!!!');

Referencing sub2Value from module sub1 does not cause an error even though its module is not directly referenced. Rather, the program prints "I should be an error!!!" to the console. Try it out yourself.

What's going on here?

Each Angular application has a singleton instance of an injector. This injector is not namespaced or partitioned. All instances provided by all modules in the application exist in the injector. And the injector can serve any of its instances to anything that requests it.

You can see that similar behaviour in Guice:

class ModuleMain {
static class Service1 { }

static class Module1 implements Module {

@Override
public void configure(Binder binder) {
binder.bind(Service1.class).in(Singleton.class);
}
}

static class Service2 {

@Inject
Service1 service1;
}

static class Module2 implements Module {

@Override
public void configure(Binder binder) {
binder.bind(Service2.class).in(Singleton.class);
}
}

public static void main(String[] args) {
Injector injector = Guice.createInjector(new Module1(), new Module2());

Service1 service1 = injector.getInstance(Service1.class);
Service2 service2 = injector.getInstance(Service2.class);

// Will print true since instances from unrelated modules can reference each other
System.out.println(service2.service1 == service1);
}
}

In this snippet, you can see that instances can be shared across unrelated modules. In Guice, like in Angular, the injector is a giant bucket where you can put stuff in and take stuff out with no restrictions.

But, there is a difference. In Angular, modules explicitly declare which modules they depend on, but not in Guice. In Angular, the syntax provides the expectation that only instances from directly required modules can be injected into another module. I am sure that there is a reason for this non-intuitive design, and I would like to learn it.

Consider this post as an explanation of what is going on, but not why. Also, consider this a warning to not rely on the Angular framework to enforce module boundaries. Perhaps in a future version, the Angular team can create truly hierarchical modules. Angular modules would be safer to compose, and name clashes between third-party modules would be prevented.
July 22, 2014

Fun stats about WildFly and Luna

In our recent milestone releases of JBoss Tools 4.2 we’ve started gathering additional data from those who are have agreed sending back anonymous usage data to us (Thank you!).

Reminder: As always, this is my personal interpretation of the data and again it is early days for the data collection. These numbers are just for the last month of beta testers thus do take these absolute numbers with a grain of salt!

In any case I find the numbers interesting and thought I would share since there are some lessons to be learned.

JBoss Server Usage

One of the data points are which JBoss servers users create.

Mind you we don’t collect the exact version of the server installed, just which server adapter users are using - i.e. EAP 6.1 also covers EAP 6.2 and 6.3, WildFly 8 covers 8.0 and 8.1 etc.

server creation stats

The numbers above shows the last two weeks of server creation by our beta users. Not surprisingly majority of users are using the community version of the latest JBoss servers (AS 7.1 and WildFly 8), and its great to see the third most used server is the free for development/enterprise supported EAP 6.0/EAP 6.1 server is picking up.

Oldie but goodie

What I find funny is that there are still users using the latest/greatest development tools, but who runs JBoss AS 3.2 - this was last released back in 2006! Talk about dedication :)

Importance of Multiple runtime support

What the list shows to me is the importance of development tools need to support multiple versions because even though most are using latest/greatest runtime there are still a great bunch of users that will be using older versions of runtimes. Many developers tend to forget or blissfully ignore this.

I’m convinced as users move to our release that gathers these data we will start see even higher numbers of "older" runtime usage.

Deploy Only Server

What is a bit disconcerning is how few seem to know about our Deploy only server (in this list noted as systemCopyServer ). This server allows you to use Eclipse’s support for incremental deployments to any directory locally or remotely available. Really useful for deploying to a non-JBoss server, a remote PHP or just a plain html app.

You should try it out!

File ▸ New ▸ Server ▸ Basic ▸ Deploy Only

Combine this with our LiveReload support and you get a great and fast workflow!

Uptake of Eclipse versions

Another data item we have insight to is the uptake of Eclipse versions.

Uptake of Eclipse versions

The graph above is our recorded startups of Eclipse Java EE installs since January pr. week. Be aware the versions listed are the EPP versions, not Eclipse release train versions - I’ll do the mapping for you below.

Two things to note: the "Drop" at the end is just the effect of the numbers ending middle of the month, the "Dip" in mid April I’m not sure what is but we see it across all our Google analytics thus I expect it was an Google Analytics anomoly. The numbers have since stabilized, that said…lets interpret!

This graph shows how Eclipse Kepler SR1 release (2.0.1) usage is dropping as users upgrade to Kepler SR2 release (2.0.2) - this are most likely the effect of users using Eclipse built-in update mechanism to upgrade.

What also can be seen is that the latest stable release (4.4.0) uptake is gaining faster than total Eclipse version usage (the faint lines are even older eclipse versions). Meaning total usage of JBoss Tools is up/stable. Eclipse isn’t dead yet :)

I wish Google Analytics had a way to show this graph cumulative instead of per line…anyone up for a data extraction and visualization project ? I’ll give you access to the data to play with.

Uptake of Eclipse Luna

Finally, my personal main interest was to see what the uptake of Eclipse Luna is.

You can see what effect a GA release of Eclipse has. The red line is Eclipse Luna going from a couple of hundreds starts to now 7.000 starts pr. week since its release - but do notice that there is no corresponding drop (yet) in Kepler. Looks like most are installing Luna next to their Kepler installs (my theory at least ;)

This mimicks previous years uptake patterns and once everyone gets back from vacation and Luna SR1 release comes out it should be close to the level of Eclipse Kepler installs. Good to see users continue to picking up latest greatest features and bugfixes!

I’ll go look at the numbers again in a few months to see if the trend continues.

If there is some additonal data you are interested or questions about the above let me know in comments and I’ll try include/answer it!

Have fun!

Max Rydahl Andersen
@maxandersen

Development of Hybrid Mobile Tools has moved to Eclipse Foundation

Even back when the first line of code was dropped for Hybrid Mobile tooling, making the tools as part of the Eclipse foundation was a goal. When starting, we looked at the available tools for developing Cordova applications. We found out that there were no open source solutions that we could contribute and use as part of our tools. Furthermore, interoperability among what very little existed was poor. Of course, our main goal is creating good tools for Apache Cordova development, but while doing that we always keep an eye on interoperability and extendibility.

It is only natural that we are moving the development of our tools for Cordova based application development and forming the Eclipse THyM project. We hope that, as a vendor neutral non-profit organization, Eclipse foundation will encourage contributions and be the base for interoperable Cordova tooling.

What is contributed

Everything related to Cordova based development including the project management, plugin discovery, and support for iOS and Android excluding the Cordova simulator is contributed to Eclipse.org. We have excluded CordovaSim for now because of its complex set of dependencies

What is changing

The development will continue to happen on GitHub but on a repository owned by Eclipse foundation. The contributed code is already renamed, cleaned and on the new repository. If you are a contributor, or want to be one, please use https://github.com/eclipse/thym

We will use bugzilla, and thym-dev mailing list from now on as provided by Eclipse foundation. As expected project documentation is at the wiki. The builds will be running on eclipse.org build server instance.

What is NOT changing

JBoss tools will continue to have support for Cordova development. We will consume Thym project and extend them with more capabilities and integrate with other parts of the tools and technologies coming from projects such as Aerogear.

And of course our wish to create good tools for Apache Cordova development continues with a hope for better collaboration with other individuals and companies.

m2e 1.5.0 improvements

The Maven Integration for Eclipse plugin, a.k.a. m2e, released version 1.5.0 a few weeks ago, as part of the annual Eclipse release train, this year known as Luna. 77 Bugs were fixed as part of that release, compatible with both Eclipse Kepler and Luna. I believe it’s a pretty solid one, with numerous interesting fixes and usability improvements that deserve a blog post. So here goes, in no particular order:

Improved project import workflow

Selecting Maven projects to import used to take an inordinate amount of time, due to a suboptimal - I love that word :-) - Maven Lifecycle Mapping Analysis (LMA). LMA is used to determine whether the projects would require further configuration to operate properly in Eclipse. That LMA is now only run after projects are imported, making selection of projects to import much, much faster (< couple seconds vs 1-2 min for the wildfly 8.0 codebase and its 130 projects, for instance)

After import, lifecycle mapping error markers are collected on imported projects and the discovery service is invoked to find proposals to fix those errors.

Another improvement to this workflow is the ability to easily import multi-module projects to an Eclipse Working Set. The default name is inferred from the root project but can be overridden manually:

m2e-workingset-import

More performance improvements during import itself are to be expected to be included in m2e 1.6.0.

See bugs 409732, 408042 and 417466.

Improved memory consumption

Maven project instance caching strategy has been revisited to reduce memory consumption. For a workspace with 300+ projects for instance, heap memory used went from 2.5GB down to well under 1GB without any noticeable side effects.

Nexus index download disabled by default

Before m2e 1.5, by default, Nexus indexes were downloaded on new workspace startup, then subsequently once a week. Depending on your internet connection, that whole process could take 15 minutes or more, heavily pegging the CPU. Once the indexes were updated, the size of the workspace would increase by approximately 500 MB. Even though space is relatively cheap these days, those with many workspaces (eg., for testing) or large workspaces, this extra disk usage can add up quickly.

m2e 1.5.0 now has this feature disabled by default. You can still enable it in Preferences ▸ Maven ▸ Download repository index updates on startup. One major downside of having this feature disabled by default though, is Archetype and Artifact/Plugin searches are now much less efficient, as they rely on this indexed content.

See bug 404417

New Maven Profile management UI

The JBoss Tools team contributed its Maven Profile management interface to m2e 1.5.0. This new interface eases switching between profiles.

Rather than right-clicking on a project, going to the Properties ▸ Maven page, then manually (mis)typing a list of active or disabled profiles, you can now just use Ctrl+Alt+P to open the new Maven Profile selection interface.

m2e-profile-selection

The new interface is also accessible from the Maven context menu: Right-click project Maven ▸ Select Maven Profiles…

The list of available profiles is inferred from profiles defined in:

  • the project pom.xml

  • the project’s parent hierarchy

  • user and global maven settings.xml

When several projects are selected, only the common available profiles are displayed for selection. Common profiles are profiles defined in settings.xml or profiles having the same id in different pom.xml.

You can learn more about that feature from the original JBoss Tools blog

See bug 428094

Easily update outdated projects

The Update Maven Project dialog (launched via Right-click project Maven ▸ Update Project… or via Alt-F5), now shows a dirty overlay on projects which need updating.

Additionally, an "Add out-of-date" button adds all out-of-date (OOD) projects to the current selection. If an OOD project has not been selected, a warning is shown underneath the selection table with a link equivalent to "Add out-of-date". Warning text and "Add out-of-date" button tooltip show a count of unselected OOD projects.

m2e-select-ood-projects

See bug 422667

No more Unsupported IClasspathEntry kind=4

There’s a very popular question on StackOverflow about an m2e bug that plagued many users of the maven-eclipse-plugin: m2e would throw Unsupported IClasspathEntry kind=4 exceptions on classpath entries generated by the maven-eclipse-plugin (one of the reasons why you should never mix maven-eclipse-plugin and m2e).

m2e 1.5.0 no longer complains about these unsupported classpath entries, but unexpected classpath issues may still arise, should you mix duplicate jars from m2e and those added by the maven-dependency-plugin.

New checksum settings

Ever connected to a network with limited Internet access or simply stayed at a hotel where you needed to get past a for-pay-firewall, resulting in HTML pages being downloaded instead of jars? There’s nothing better to pollute your local Maven repository. Maven CLI builds can use these flags:

  • -C - fail build if checksums do not match

  • -c - warn if checksums do not match

m2e now has a global Checksum Policy available in Preferences ▸ Maven, that will help you keep your sanity, and yor local repository clean:

m2e-checksum-policy-flag

While m2e actually won’t create any Warning markers on projects when "Warn" is selected, it will override existing checksum policies set on repositories.

Improved settings for Errors/Warnings preferences

m2e has been known for generating specific errors that have puzzled more than one user in the past:

  • Project Configuration is not up-to-date - a change in pom.xml might require a full project configuration update.

  • Plugin execution not covered by lifecycle - m2e doe not know if it is safe to execute a maven plugin as part of the Eclipse build

With the new Preferences ▸ Errors/Warnings page, users can now decide according to their own needs whether these errors should be downgraded to Warning, or even be ignored entirely.

m2e-warnerrors-prefs

See bugs 433776, 434053

Maven runtime changes

A few changes have been made with regards to the Maven runtime(s):

  • The embedded Maven runtime has been updated to maven 3.2.1.

  • The Netty/AsynHttpClient transport layer as been replaced with OkHttp 1.5.4. OkHttp is now the default HTTP client on the Android platform. It brings HTTP 2.0 and SPDY support to artifact downloads. Please note though, NTLM authentication is not supported.

  • Maven runtime installations can now be customized with a name, and additional libraries can be added. Maven Launch configurations now reference the Maven runtime by name, instead of using a hard-coded location so the configuration is more portable.

See bugs 427932, 418263, 432436

Accept contributions from Gerrit

In order to lower the contribution barrier and increase contributor diversity, the m2e project now accepts changes contributed via the Gerrit review system. Head over the wiki that explains how to use it. Does it work? Hell yeah! After several significant contributions, Anton Tanasenko has joined the m2e team as commiter!

Welcome Anton!

See bug 374665

Conclusion

With new blood on the m2e team, numerous fixed bugs and some big new features & improvements, m2e 1.5.0 is a pretty exciting release. Hope you guys appreciate this year’s release, before an even better version next time.

So if you haven’t installed m2e 1.5.0 yet, head over to https://www.eclipse.org/m2e/download/ and have at it.

We’d love to hear your feedback on the mailing list, or whether you report bugs or enhancement requests.

Fred Bricon
@fbricon

Snipmatch: a solution for configuring scout properties from the java editor?

Scout comes with powerful tools in the Scout perspective. You have a logical representation of your application in the “Scout Explorer” view and a “Scout Object Properties” view where you can set or change a property for the selected object. A modification in the property view updates the java code and a code modification is reflected in the property view. This allows the developers to work as they want.

Scout Property View

The problem is that power users are not using this property view very often. The explanation is simple: using the view breaks the flow when you are typing code in the java code editor. You need to switch to the mouse, find your current object in the scout explorer and set the properties in the other view.

When you know the name of the getConfigured method you want to set, then you are quicker if you stay in the java editor. The problem is that what the JDT is offering by default is not really what you need in this case. Lets see how Snipmach can help.

With the JDT

If you are in a column’s inner-class you might want to define it as editable. You need to override the getConfiguredEditable() method and return true instead of the default false.

The JDT can help: enter “getCondiguredEdit” and press control space:

Jdt CTRL Space

This works well, but the result is not as efficient as it could be:

Jdt result

My problems are:
* I really do not need the “(non-Javadoc) comment” block.
* The cursor is not at the correct position; It would be preferable to have the cursor in the line of the return statement.
* In this specific case I do not need to call the super implementation at all.
* And the TODO statement makes sense in a lot of cases, but not here.

With Snipmach

Snipmatch can help too. I have defined snippets to handle those cases. They are shared in this git repository. In my column, press CTRL + Alt + Space + the search filter set to “edit”, I can find the snippet I am looking for:

Snipmatch CTRL+Alt+Space

Now when I press enter, there is a big difference with what the JDT override assist function provides:

Snipmatch result

The cursor is where it should be. In the Snippet’s definition, I have defined as first choice the value that will be most likely used at this point (in this case true because the default in AbstractColumn is false). The result is really straight forward.

Just to be clear, I am not complaining about the JDT doing a bad job. We are comparing a generic feature coming out of the box in the JDT and another approach where someone needs to configure the possible snippets. It is normal to have a better user experience with a specific tool because it is a specific use case.

What is missing in snipmatch?

The snippets do not have any metadata to define a context. The consequence is that the search engine is only based on the keyword entered by the user in the search box. It would be nice to be also able to influence the search result depending on the cursor position. I have commented Bug 435632. Let’s hope that the code recommenders team will propose something going in this direction to improve the user experience.

Scout Links

Project Home, Forum, Wiki, Twitter

July 21, 2014

(Yet) Another Charting Widget for RAP

Maybe you’re familiar with Ralf Sternberg’s d3 widget for RAP (it’s part of the RAP Examples Demo). Like the name implies, it’s a charting widget based on the d3 library, which uses SVG to render its elements.

I was interested in doing the same with the other popular method used to draw freely in a modern browser, the HTML5 canvas element. The most promising project I found for that is Chart.js, a pleasantly simple and lightweight charting library that’s currently in its 1.0 beta phase.

The original idea was to keep it as simple as possible while also making it work on IE7/8 (unlike the d3 widget), but that didn’t work out to my satisfaction. After letting it rest for a while I decided to publish the project without IE8 support, a move made easier by our plan to drop IE8 for RAP 3.0 as well.

charts (Yet) Another Charting Widget for RAP
DOWNLOAD

Chart.js supports 6 basic chart types that feature optional tooltips, appear animations and limited customization. The Java API is fairly close to the original JS API and pretty self-explanatory. Just create an instance of the Chart class and call one of the 6 draw***Chart methods. The first argument is the data object (instances of either ChartRowData or ChartPointData), and the (optional) second a configuration object (instance of ChartOptions). You can call these methods as often as you want, the previous chart will simply be replaced. There are currently no transitions between two charts. I experimented with this, but it made everything insanely complicated, which is exactly what I didn’t want. Perhaps in a later version.

Speaking of later versions, from my point of view this is just an experiment, but if there is some good feedback I might polish it up a bit and contribute it to the RAP Incubator. Be sure to try the d3 widget as well.


TwitterGoogle+LinkedInFacebook

Leave a Comment. Tagged with custom widget, incubator, javascript, Luna, rap, custom widget, incubator, javascript, Luna, rap

July 18, 2014

Mozilla pushes - June 2014

Here's June 2014's  analysis of the pushes to our Mozilla development trees. You can load the data as an HTML page or as a json file

Trends
This was another record breaking month with a total of 12534 pushes.  As a note of interest, this is is over double the number of pushes we had in June 2013. So big kudos to everyone who helped us scale our infrastructure and tooling.  (Actually we had 6,433 pushes in April 2013 which would make this less than half because June 2013 was a bit of a dip.  But still impressive :-)

Highlights
  • 12534 pushes
    • new record
  • 418 pushes/day (average)
    • new record
  • Highest number of pushes/day: 662 pushes on June 5, 2014
    • new record
  • Highest 23.17 pushes/hour (average)
    • new record

General Remarks
The introduction of Gaia-try in April has been very popular and comprised around 30% of pushes in June compared to 29% last month.
The Try branch itself consisted of around 38% of pushes.
The three integration repositories (fx-team, mozilla-inbound and b2g-inbound) account around 21% of all the pushes, compared to 22% in the previous month.

Records
June 2014 was the month with most pushes (12534 pushes)
June 2014 has the highest pushes/day average with
418 pushes/day
June 2014 has the highest average of "pushes-per-hour" is
23.17 pushes/hour
June 4th, 2014 had the highest number of pushes in one day with
662 pushes





July 17, 2014

Announcing FOSS4G North America 2015 Program Chair

Next March, we’ll be hosting FOSS4G North America 2015 co-hosted with EclipseCon from March 9th to 12th. This conference is a wonderful collaboration between multiple communities. With participants from Eclipse, OSGeo, LocationTech, IoT, Science, and other communities of open source communities, we anticipate some weird and wonderful cross pollination of ideas. Attendees can attend any talk they wish for no added cost.

One of the biggest contributing factors to the value and success of the conference is the quality of the program. The program committee, led by the program chair, is responsible for selecting which presentations are part of the program at FOSS4G North America.

It is my pleasure to announce that Rob Emanuele has agreed to be program chair for FOSS4G North America 2015. Rob is best known for his work on the GeoTrellis high performance geoprocessing framework. His combination of breadth and depth of technology skills, along with his ability to connect with people will serve the program committee well. Thank you Rob! And I look forward to working with you to make this an outstanding conference in 2015.


July 16, 2014

Gyrey 1.3. Release

As part of the Eclipse Luna release train the Gyrex development team has released version 1.3 of Eclipse Gyrex. Eclipse Gyrex is an cluster application framework on top of Equinox OSGi. It provides seamless and pain-free creation and operation of OSGi clusters.

With Gyrex 1.3. the following new functionality is available:

Distributed EventBus

With the EventBus it’s now possible to distribute events between cluster nodes. Events can be of any type, i.e. they don’t need to implement a specific interface or extend an abstract class. This allows for a broad set of use-cases supporting pojos as well as sophisticated objects entities. Out of the box, strings byte arrays and byte buffers are supported event types. The (de-)serialization of event objects is extensible so that any preferred serialization mechanism can be used. Event handling is supported using either annotations on any public method with a compatible signature or by implementing a handler interface. They will be triggered once events of those types are distributed. With the EventBus feature you can support use cases like cluster wide cache invalidation of local (in-process) caches.

Servlet 3.1 API and WebSockets in JAX-RS application

Gyrex applications are mainly focused on providing REST-API resources, but with 1.3 it’s now also very easy to provide web sockets in your application. In addition to JAX-RS annotated resources and provides, servlets annotated with @WebServlet will be found and deployed. Also based on annotations you can build web socket endpoints and once you’ve configured your application in the Gyrex Admin Console and map it to an URL, the web socket is available immediately on all cluster nodes.

Of course, servlets support dependency injection using the @Inject JSR-330 DI mechanism, which includes injection of tenant specific objects (in a multi-tenant environment) as well as OSGi service proxies.

New Editor for Gyrex Context preferences in Admin Console

The web-based Admin Console got a new editor for modifying Gyrex context preferences. Previously, it was possible to modify preferences from the Gyrex shell (via telnet or ssh). The new editor provides a generic way to manage the preferences in a browser and will help you to more easily introduce and use preferences in your application.

Dependency Injection in distributed Eclipse Jobs API

The development of batch processing using the Eclipse Jobs API now support dependency injection. Instead of implementing and providing a custom JobProvider, Gyrex provides a ScanningJobProviderComponent implementation which can be registered as an OSGi DS component by any bundle. The component will scan the registering bundle for Eclipse Jobs annotated with @JobType. The jobs instances will be created on demand and support dependency injection using the @Inject JSR-330 DI mechanism, which includes injection of tenant specific objects (in a multi-tenant environment) as well as OSGi service proxies.

Dependency updates

With Gyrex 1.3. we’ve updated many of the tools and dependencies we use in Gyrex. Most notably are the upgrades of Jetty 9.1,  RAP 2.3 and EclipseLink 2.5.

Download

Gyrex 1.3 can be downloaded here:
http://download.eclipse.org/gyrex/1.3/

For more information, support and contributor engagement please visit eclipse.org/gyrex.


Filed under: Announcements, Updates
July 15, 2014

Orion’s new Markdown editor

Markdown has emerged as a popular authoring format for on-line documentation. The recently released Orion 6.0 includes a new split-pane Markdown editor that previews your generated HTML document as you type. You can try it out now, along with the rest of Orion 6.0, on OrionHub.

Initial editing of a .md file: Features typical Orion editor responsiveness, syntax styling and annotations. The preview pane is auto-scrolled to keep it in sync with the source editor, and its highlighted region reflects the caret position in the editor.
mdEditor_initial

Some editor options you may wish to change (note: to add Word Wrap to this menu go to Settings > Editor and select the little circle beside the Word Wrap option)
mdEditor_options

Vertical split orientation: The preview pane is still auto-scrolled to keep it in sync with the source editor.
mdEditor_vertical

gfm extensions: The editor handles extended markdown syntax supported by the marked library, which includes Git Flavored Markdown. The following screenshot shows a gfm table, fenced code block and strikeout text.
mdEditor_gfm

What’s next?

The Markdown editor will continue to improve during the Orion 7.0 timeframe. We have some initial enhancement ideas in mind, including content assist, warning annotations, and various usability tweaks. We’d also really like to hear your enhancement requests and bug reports, to ensure that it’s the best markdown editor out there. Thanks in advance!

New Eclipse Scout Homepage

Hi Eclipse Scout Users,

we think it is time for a new Eclipse Scout homepage. The old one is quite outdated not up to date anymore.

Therefore we created a design contest for a new state of the art homepage. It’s been a few days and now we have 3 designs we think are pretty awesome. Since Scout is open-source and a community project, we want to know your opinion. What do you think is the design which represents Scout the best?

Design #1

Design #2

Design #3

 

Vote here!

Please give your vote until Friday, 18th July 2014.

Thank you very much!

Adoption... Sort of

Apparently, myeclipse has started to use bits and pieces from Thym. It was brought to my attention that the plugin wizard image on the myeclipse feature page is from Thym. You can compare it with an image of the same wizard on JBoss tools features page for yourself. I have not tried the product myself hopefully it is working well.

Normally, I would be very excited about a product adoption happening this quickly. However, the folks behind this product have a different way of adopting open source software, which usually means project Thym will get zero benefits from this adoption. Of course, one can only hope for a positive surprise.
July 14, 2014

What are you doing with Eclipse right now?

I recently attended a conference session on the topic of getting user feedback. One of the key takeaways for me was that people lie about how they use software. It’s not that they’re trying to be misleading, it’s more that it’s easy to misrepresent yourself out of context. The speaker suggested that you need to interrupt your users and find out what they’re doing at the moment. And you need to do this in regular intervals.

With such a large, diverse, and distributed community–combined with no actual budget–that’s going to be hard to do in any traditional sense.

So I tried a quick experiment on Twitter this morning, asking folks to stop what they’re doing and tell me which views they have on top in their currently-running Eclipse.

I’ve received six responses so far; seven if I count my own (with an audience this engaged, I’m thinking that it might be time to get verified).

  1. Package Explorer, History, and Console
  2. Package Explorer, and Git Staging
  3. Package Explorer, and Search
  4. Package Explorer, History, and Task List
  5. Package Explorer, Task List, Console, and Outline
  6. Package Explorer, Outline, and Console
  7. Package Explorer, Task List, and History

Clearly (and as expected), the Package Explorer get top billing. The Mylyn Task List shows up a lot which is encouraging. That almost half of the responds include the History view is a bit of a surprise (at least to me).

There’s not enough information here to make any real conclusions, but I think the method shows some promise. Let’s see what my next question brings…

Nothing so far…


Inactive Blogs