June 19, 2013

Remediation Support, Top Eclipse Kepler Feature #2

In one week, on June 26th 2013, Eclipse Kepler will ship. To prepare for the release I’m counting down the Top 10 most interesting features according to me. Number 2 on my list is close to my heart — the Eclipse Provisioning Platform (p2) — and the new features it supports.

The Eclipse Provisioning Platform (p2) has been responsible for installing and managing Eclipse plug-ins for over 5 years now. With a large ecosystem of components with complex dependencies, installing plug-ins is more involved than simply downloading and unzipping. Often multiple components may provide a suitable API, and finding the best (optimal) set of plug-ins is actually a hard  satisfiability (SAT) problem.

The value p2 brings is that it handles dependencies and other integration problems at install time instead of at runtime – if you can install it, you can run it. It uses SAT4J for solving the SAT problem and finding the optimal solution. Unfortunately this leads to many headaches when trying to install complicated software stacks. The provisioning platform will often present cryptic error message and users are left with no way forward.

Screen Shot 2013 06 19 at 11.01.28 AM Remediation Support, Top Eclipse Kepler Feature #2

We’ve investigated this problem in the past by trying to present the error message in a more meaningful way, or by giving the user some idea of how to ‘fix’ the problem. During the development of Eclipse Kepler, Pascal Rapicault approached it from a different angle.  Instead of trying to comprehend the SAT4J error message, p2 will now proactively search for alternate solutions to help you proceed.

Screen Shot 2013 06 19 at 11.25.46 AM Remediation Support, Top Eclipse Kepler Feature #2

For example, p2 may now suggest that you un-install or upgrade a conflicting component. Or, if you are trying to install a number of components and only a few of them cannot be satisfied, p2 will allow you to proceed with the ones that can be installed.

Screen Shot 2013 06 19 at 11.27.28 AM Remediation Support, Top Eclipse Kepler Feature #2

The Remediation Wizard is automatically invoked whenever a solution cannot be found. It’s enabled for both the standard p2 UI as well as the Market Place Client (MPC). While this will certainly improve the user experience, it also should help the ecosystem since it’s more likely a user will now complete their install with their existing Eclipse base, instead of always starting from a fresh Eclipse Download.

In addition to the remediation support, Pascal also added migration support for ‘shared installs‘. When running Eclipse in read-only mode — as is often done on *nix systems — Eclipse automatically enters ‘shared install mode‘. This is because several users often ‘share’ the same install base. When users install additional plug-ins, they are installed locally, for that user only. Problems arise however when the base is upgraded — in fact, when this happened the updated Eclipse would simply ignore the users local plugins.

In Eclipse Kepler, when a base install is updated in a shared install situation, the users will be presented with a new migration wizard to help them install and keep using their local plug-ins.

Screen Shot 2013 06 19 at 12.27.12 PM Remediation Support, Top Eclipse Kepler Feature #2

With these changes we hope to see a lot fewer of you on the bug reports icon smile Remediation Support, Top Eclipse Kepler Feature #2 .

For more Eclipse Tips & Tricks and for my Eclipse Top 10, follow me on Twitter.


TwitterGoogle+LinkedInFacebook

Leave a Comment. Tagged with eclipse, kepler, p2, eclipse, kepler, p2

MOXy's @XmlVariableNode - Using a Map's Key as the Node Name

People often ask me how they can map a java.util.Map such that the keys become the node names.  In this post I will demonstrate how this can be done using the new Variable Node mapping that we have added in EclipseLink MOXy.

You can try this out today using a nightly build of EclipseLink 2.6.0:
Read more »

Build the e4 tools with “mvn clean install”

We finally made the build for the e4 tools as simple as possible. Just can now build the e4 tools which a simple “mvn clean install”. For the exact commands, please see Building Eclipse tutorial.

I think it is important to make the Eclipse build process as simple as possible and I think it is great that the build process for the e4 tools are now as simple as it can get.

See Bug report for the details on the fix. Many thanks to Paul Webster, Thanh Ha and Markus Kuppe for contributing this fix.

Five good reasons to port your code generator to Xtend

If you happen to have an existing code generator written in Xpand or some other (template) language, here are five good reasons why you should migrate to Xtend.

Xtend is fast

Code generation adds to the development turn around time. We all know it : tools can slow us down. They take their share of CPU cycles during the daily development and all that automation is not worth it, if you have to wait for your machine all day long. Many template languages are interpreted and are therefore rather slow as they cannot benefit from optimizations done during compilation. Code generators written in these languages suffer from that of course, and if you don't care you can easily multiply the time your build takes with a slow code generator.

Xtend code is translated to readable and idomatic Java code. It runs as fast as Java, which is *very* fast and there's no additional overhead nor dependencies at runtime. Rough measures have shown that code generators implemented with Xtend are up to ten times faster then the equivalent Xpand version.

Xtend is debuggable

Code generators, just like any other software system, have a tendency to get a bit complex over time. It's not so funny to find and fix a bug in a real world code generator without any debugging support. Unfortunately that's the situation with most template languages : They don't have any good debugging support.

As Xtend code is translated to readable Java code you can always use the advanced Java debugging tools you are used to. Additionally the Eclipse debugger lets you choose whether you want to debug through the Xtend source code or the generated Java code. You can even switch back and forth during the same debug session (see the screenshot).

Better IDE Support

Xtend's Eclipse support is propably the most advanced after Java. The integration between Xtend and Java is seamless : Navigation, Call Hierarchies and even cross language refactorings just work. And Xtend features the whole Java type system and gives you errors and warnings as you type.

Template Expressions and Grey-Space Support

In contrast to typical template languages such as Xpand, templates in Xtend are expressions which yield some value. This allows for composing multiple templates and lets you pass the results around and process them.

A unique feature to Xtend is the greyspace support. It solves the conflict between pretty printing a template and pretty printing the to-be-generated output. Common template languages cannot distinguish between indentation meant for the template and indentation meant for the output. Xtend can. Here's an example (note the different coloring of whitespace):

Better Extendability

In order to reuse a code generator and adapt it to the needs of a particular project, you need to be able to hook into it and change certain implementation details. In Xpand this was supported through AOP: You could hook into any template invocation and do what seems fit.

Although very flexible, this approach is also very fragile. The original code generator cannot be evolved, since clients might hook into any template call and you break them easily. Even worse you don't get any compile-time feedback about the broken extension hook.

With Xtend you can use dependency injection together with extension providers. No AOP anymore and the solutions is even faster and statically typed. If you need to exchange some implementation, just reconfigure your dependency injection configuration and your are good.

Summary

There are many more advantages and cool features in Xtend, but I hope the five listed here are convincing enough. If you don't have the time to do it yourself, but can afford some money, itemis is always there to help.

Eclipse Scout in a nutshell

Eclipse Scout is the perfect choice for an open source business application framework. It is simple to learn and substantially reduces development time for client-server software. User-friendly applications are easily implemented with Scout’s comprehensive set of user interface components. Completely based on Java/Eclipse, Scout applications integrate well in existing IT environments.

http://www.bsiag.com/en/technology/eclipse-scout.html

scout usp

June 18, 2013

Eclipse Platform Improvements, Top Eclipse Kepler Feature #3

Eclipse Kepler is 8 days away and I’m into the Top 3 Features in my Annual Top 10 List. Number 3 on my list is the Eclipse Platform — arguable the most important component for anybody using Eclipse.

The Eclipse Platform has come a long way over the past 12 years. Eclipse originally targeted two windowing systems (Motif and Win32). The View / Editor stacks were fairly static, the extensibility was limited and the customizability of the UI was almost non-existant.

eclipse platform 1.0 Eclipse Platform Improvements, Top Eclipse Kepler Feature #3

In 2012, Eclipse 4 was released (4.2 actually), and behind this major release was a new PlatformUI. The new platform was based on a dynamic model which could be extended and customized at runtime. While there were certainly some growing pains with this new platform, many of those have now been addressed and Eclipse 4.x is the platform of choice moving forward.

With Kepler, the Eclipse Platform is shipping 4.3. There are a number of New and Notable features.

Most importantly, the performance problems that plagued Eclipse have been addressed. In particular, some applications that were experiencing slow editor opening, closing, and switching are now much faster. Editor selection changes and the Open Resource dialog have also been made faster. A number of leaks have been addressed to avoid long-running applications don’t run out of memory.

Views and editors can be detached and multiple views can be combined into a single window and separated with sashes, stacks and arbitrary layouts. This is particularly important for those who want to spread their Eclipse windows across multiple displays.

platform Eclipse Platform Improvements, Top Eclipse Kepler Feature #3Toolbars can also be dragged and repositioned.

toolbar Eclipse Platform Improvements, Top Eclipse Kepler Feature #3The OpenResource dialog now supports “Open With” and “Show In”. This way you can choose which editor to open a file with (If you are like me, Dashcode would launch each time I tried to access a JavaScript file).

Screen Shot 2013 06 18 at 11.43.59 AM Eclipse Platform Improvements, Top Eclipse Kepler Feature #3

Also this year, the first official Eclipse 4 API is now available. This includes API for the user interface model and IEclipseContext / Dependency injection. There are some good resources for those of you ready to leverage the API in your own projects, including the EclipseCon 2013 API Slides, the RCP and Services Tutorials by Lars Vogel, and Jonas Helming’s Tutorials on e4.

In addition to this, there is an early access release of SWT running on GTK3 (See Bug 340067).

gtk3 Eclipse Platform Improvements, Top Eclipse Kepler Feature #3

Also, with Kepler, the entire Eclipse Platform uses a new build technology. Historically, Eclipse used a custom build tool (called PDE/Build). While some claim that this was because of NIH Syndrome, the truth is that Maven was not around in 1999 / 2000 when Eclipse was being developed. Last year, the platform team made the decision to convert the build to Maven / Tycho, and this took over 1 year with several people working full-time. The result of this is a portable build for Eclipse that you can run on your own hardware. See the Platform Build CBI Page for more information.

Screen Shot 2013 06 18 at 3.21.42 PM Eclipse Platform Improvements, Top Eclipse Kepler Feature #3And finally, while not technically part of the Eclipse Platform, the PDE (Plug-in Development Environment) has introduced a new view to help you search, browse and manage your icon / image files.

Screen Shot 2013 06 18 at 12.03.13 PM Eclipse Platform Improvements, Top Eclipse Kepler Feature #3

For more Eclipse Tips & Tricks, follow me on Twitter.


TwitterGoogle+LinkedInFacebook

Leave a Comment. Tagged with eclipse, kepler, eclipse, kepler

CERN LHC uses Eclipse Java with Genuitec, EclipseCon France 2013

While using the Large Hadron Collider (LHC) in attempts to discover the origins of the universe, CERN relies heavily on open source technologies, including Eclipse Java. The LHC is as sensitive a machine as the NASA space shuttles, so the open source Eclipse Java must have a software management and software delivery mechanism that is tightly controlled and understood by IT administrators of the LHC. CERN turned to Genuitec's Secure Delivery Center as a powerful, yet cost effective technology to best control the usage of open source within the organization.

what we have done last week (Eclipse Momentics | Cascades workshop)

this is part 2 of my report from Cascades Workshop last week in Rosenheim. Read more here  to know where the workshop is running, the environment, food and also drinks

nightcoding-03

… I was asked about the ‘Weißbier’ – here’s the truth: sorry guys – not every day included, only while doing free-style Night-Coding in the evening.  There’s much work and hours of hacking code before…  ;-)

workshop-08x

Eclipse Momentics 10.2

BlackBerry rebuilt the Eclipse IDE and makes it much more fun to use with streamlined workflows. There will follow other articles on the new Momentics IDE. One of the great new features: you have directly access to all the samples, documentation and Forums.

Voila_Capture1116

BlackBerry Samples are all Open Source: you can copy / paste them without problems. And you should do it !

Voila_Capture1117

We downloaded  some samples to learn HowTo analyze the code, to see what’s done in C++, what’s in QML and HowTo implement in your own apps.

We went through the most important Views and Perspectives, did some settings in Preference and also learned about other tooling like QtLinguist to ease the internationalization.

Let’s now see what the students of my Class built last week. All done from “New Project – Empty Project“, then trying to follow the process from the idea to running Code – and every time we laerned new things, Code was refactored and enhanced.

Really fun ….

Navigation Concepts and more

We started with a simple Page, learned HowTo push more Pages on top (NavigationPane) and HowTo structure an App using TabbedPane.

navigationconcept

Startscreen with Tabs on ActionBar:

IMG_00000002

TabbedPane to structure the app:

IMG_00000001

As you can see we have put some different stuff into the Tabs:

  • a stack of 5 Pages using NavigationPane
  • a simple Tab with a Page
  • Tab with Custom Map – placed into NavigationPane to be able to push Pages on top of the Map
  • finally Tab with ListView – also placed into NavigationPane to push Details on top

Tab1: the NavigationPane with 5 Pages allows some different ways to navigate through the Stack:

  • step by step push Pages on top: Page 1 -> Page 2… 3 …4 …5
  • step by step going back: 5 -> 4 -> 3 -> 3 -> 1
  • special: Back from 5->4 getting  a SystemDialog asking if you want to jump directly to 3
  • special: peeking back from Page 3 not allowed
  • special: peeking back from Page 5: replacing content of peeked Page by Animation
  • Page 3,4,5: GoHome-Action to directly jump to the Root

While working on this NavigationPane we learned about dynamic creation of Components, Dialogs, Animations, pop(), push(), navigateTo() and also the cool Signals and Slots concept of Cascades / Qt masking it easy to plug events and handlers together

??????????????????????????????????????

Page 1 of this NavigationPane also has a Segmented Control, where switching changes some properties of Labels.

An Action  uses Signals / Slots to easy switch off the Background Color of some Containers.

Page 1 demonstrates the use of a StackLayout and SpaceQuota to realize a Layout working on Q10 and Z10 Portrait/Landscape without any changes. Our Demo app supports both: square on Q10 and Portrait/Landscape on Z10, supports bright and dark theme and devices with / without Keyboard. Students learned HowTo get these infos from Device and to use in QML.

Q10 1:1 720×720

stack-q10

Z10 768×1280:

IMG_00000042

NavigationPane in action:

switch HD on (top right)

Page with Animation, Notification, QTimer in Action

  • This Page shows an Animation when opened
  • At end of Animation the Action will be enabled (Signal-Slot)
  • Action starts QTimer, when timer ends, sends Notification to Hub
  • works in background
  • uses QSettings to select minimzed Image

switch HD on (top right)

The Image from minimzed App (ApplicationCover / SceneCover) is designed to look good on Q10 and Z10, where the space is larger. Also the displayed Image changes at every new start of the app: the value of last-used-image is stored in QSettings

Custom Map connected to Sensors, different Pins, current Location in Action

switch HD on (top right)

ListView and Invoke / Create Contacts in Action

  • different styled ListemItems: Header, Persons, Bikers
  • switch DataModel on-the-fly
  • selected Lines colored
  • push() Details Page
  • integrate PIM: add Contact with values from ListItem

switch HD on (top right)

integrate BBM and LocationMapInvoker in Action

Starting the APP you’ll get a Tip-Of-The-Day using a System Toast. Last Tip is stored in QSettings, Tips itself are stored in a QStringList and localized, so users will get the Tip in their language.

BBM can be invoked to talk about the Workshop and LocationMapInvoker opens the BlackBerry Map to show the Location of ekkescorner TrainingsCenter, so it’s easy to see what’s around there…

switch HD on (top right)

Unique Wokshops produce unique Workshop APPs :)

Demos above were from Q10 with dark Theme, but we support Z10 with bright Theme, too. On Q10 Shortcuts are supported – if Bluetooth Keyboard attached, KeyListeners are used.

and much more…. cannot go into all the details we solved on this Cascades Workshop.

tribesman90x90

What do YOU think ?

Isn’t this great what students of my class have developed from scratch ? Without knowledge of Cascades before ?

Every Workshop @ekkescorner is unique and every Workshop APP is unique – this is the real challenge and also fun for me providing these kinds of dynamic Workshops.

Best feedback for me are mails like ‘have written my first app

Here’s some feedback from Twitter by students of this workshop last week:

tweets

Want to learn more ?

It’s no problem to have special 1 or 2-day Workshops to go deep into your scenarios.

There are also some great online resources provided by BlackBerry – besides the documentation I already mentioned:

Become a BlackBerry Builder

Want to be certified ? There’s the new BlackBerry Builder program ….

Voila_Capture1120

… with many Webcasts available and they are free. My Workshops are NOT a replacement of these WebCasts – it’s recommended to work through all of them.

I already did the exam: you have to answer around 100 questions and it’s no easy certification ! The WebCasts together with my Workshops will give you a great chance to master it.

Get your App certified as BuiltForBlackBerry

Next important part if you publish your APPs to BlackBerry World. There’s also a certification to show that your app is following the UI Design Guidelines and your APP is BUILT FOR BLACKBERRY.

Voila_Capture1118

Take a look at the Criteria here: these cover all areas of development:

  • User Benefits
  • User Experience
  • Performance
  • Service Integration
  • Security
  • Localization

I recommend to read through all these criteria – it helps you to create great apps certified as Built For BlackBerry.

In my workshops you’ll get some hints HowTo solve the certification.

Cascades Workshops @ekkescorner or elsewhere

Perhaps now you got a feeling what happens at my Cascades Workshops. You need  a workshop ? You need an App ? feel free to ask me  ;-)

Meet me

… next week at MDC in Nürnberg

MDC2013_BannerSPEAKER

…in september at MTC Berlin:

mtc-2013

where I will talk about “Peer-to-peer pushes ion Business Apps

June-29 Eclipse Day China (Beijing):

I will demo the new Eclipse Momentics IDE: live hacking – no slides.

Thanks to BlackBerry you can win a brandnew BlackBerry 10 Device – a Q10 :)

Q10-Homescreen

If you’re in Beijing listen carefully to my session – at the end there will be a question: first one from audience answering this will win the Q10 !


(c) 2013 Creative Commons License 3.0 (BY-NC-SA) by ekkescorner


Filed under: BB10, Blackberry, C++, Cascades, Eclipse, mobile
navigationpane
animation-notification-qtimer
custom-map
listView
invoke-bbm-map

Xtend's Extension Providers

Xtend supports extension methods very similar to how they are supported by C#. The basic idea is to make static methods available as instance method on the first argument's type. Example :


import static extension java.util.Collections.*

...

// we can use static methods from Collections like this
val maxValue = myCollection.max // calls Collections.max(myCollection)
val minValue = myCollection.min // calls Collections.min(myCollection)
...

This makes code much more readable as you don't have to read inside out, but can read from left to right. Also the discoverabilty of available features via content assist works much better.

But of course using static methods all over the place is problematic, as you bind your code to the implementation which makes it hard to test and to reconfigure for different situations (e.g. use a different database system).

Enter Extension Providers!

In Xtend you can put the extension keyword to a local field or a parameter. This will make its instance methods available on the first parameter's type.

I'll explain that with an example using JPA and Java EE.


// Java code
@PersistenceContext
EntityManager em

public LineItem createLineItem(Order order, Product product, int quantity) {
LineItem li = new LineItem(order, product, quantity);
order.getLineItems().add(li);
em.persist(li);
return li;
}

public void removeOrder(Integer orderId) {
Order order = em.find(Order.class, orderId);
em.remove(order);
}

If you add the keyword extension to the field declaration, the instance methods of the PersistenceManager get projected onto the entities. So you no longer have to write em.persist(li) but can just write li.persist:



@PersistenceContext extension EntityManager

def createLineItem(Order order, Product product, int quantity) {
val li = new LineItem(order, product, quantity)
order.lineItems += li
li.persist
return li
}

def removeOrder(Integer orderId) {
val order = Order.find(orderId)
order.remove
}

Extension provider allow for adding layer specific functionality to any classes in a non-invasive way. And you don't have to use static methods for that.

Better APIs with Extension Providers

When designing an API, you can make it very easy for the clients to have the right extension providers on the scope.

One possibility is to provide an abstract base class which contains visibly extension fields:



abstract class AbstractDao {
@PersistenceContext
protected extension EntityManager em;
}

class Concrete extends AbstractDao {
// use extension methods from EntityManager
}

If you don't like inheritance that much, another approach is to mark a parameter of an abstract method with the extension keyword.


interface JPACallBack {
def void doStuff(extension EntityManager em)
}

When implementing that method, the IDE will automatically add the extension keword for you. The active annotations API uses that idiom.

Note that in case you define the abstract class or the interface in Java, you can add the @Extension annotation instead of the keyword.

IDE Support

Sometimes the reader might be a bit unsure where a certain member has been declared. Of course the hover as well as navigation always shows the correct declaration. In addition the semantic coloring highlights extension methods ...

...and you can even inspect the desugared version of an expression in the hover :

RAP 2.x, Top Eclipse Kepler Feature #4

As we approach the release of Eclipse Kepler, I’m counting down the Top 10 Features I’m most excited about. Number 4 on my list is RAP 2.x. Powerful, stable and well thought-out APIs is a common theme among Eclipse projects. From the early days of Eclipse, there has always been a focus on API development and RAP continues exemplifies this.

During the past year, RAP has moved away from simply being a Rich Ajax Platform to being a general Remote Application Platform. This means that RAP is a general platform for developing modern UIs,and serving them natively on a variety of different devices through the use of an Open Protocol. The open-source web based client is still available, but other clients are now being added, such as: commercial clients for Android and iOS devices.

tabris mdevices RAP 2.x, Top Eclipse Kepler Feature #4

In February RAP shipped version 2.0, and with Kepler, version 2.1 will land. With the RAP 2.x major release, the client-server protocol was finally standardized and all communication is now done using a JSON protocol. A number of new APIs were also released, including an API for creating custom widgets, an API for executing arbitrary JavaScript on the client, and an updated API for entry points and branding.

In Kepler, RAP has added Mnemonic and Accelerator support. This allows users to select and execute actions using keyboard short-cuts.

Screen Shot 2013 06 17 at 10.41.58 PM RAP 2.x, Top Eclipse Kepler Feature #4

The GraphicsContext (GC) has been enhanced with GC.drawPath and GC.fillPath. With this API, you can now draw complex shapes such as quadratic or bezier curves. As Ivan showed us, you even draw an airplane.

jet RAP 2.x, Top Eclipse Kepler Feature #4

RAP 2.x now supports multi-tabs. Until now, you had to turn off session cookies in the servlet container in order to support access to a RAP application from multiple browser tabs. This is not needed anymore. The framework can now handle multiple connections from within the same HTTP session. For every connection, a new UISession will be created.

Screen Shot 2013 06 17 at 10.50.27 PM RAP 2.x, Top Eclipse Kepler Feature #4And finally, RAP Tools has been updated and will ship with Kepler. You should install these tools in your IDE when developing RAP applications to give yourself a productivity boost. RAP tools will help you manage your target, create sample projects and launch your RAP applications.

For my Eclipse Kepler Top 10 and other Tips and Tricks, follow me on twitter.


TwitterGoogle+LinkedInFacebook

2 Comments. Tagged with eclipse, kepler, rap, eclipse, kepler, rap

June 17, 2013

Gerrit London Hackathon May 2013

At the beginning of May 2013 first European Gerrit Hackathon took place in London. It was quite some time ago (more then a month), but in my opinion it is always good to have summary afterwards.

So, as I mentioned it was first Gerrit Hackathon in Europe, organized by Luca Milanessio in London and kindly hosted by ITHR Consulting. Twelve participants come from variety of  countries and industry areas to work together on Gerrit. We had three really productive days full with many interesting discussions, about project future and new improvements, and code sessions with interactive feedback loop (no delays or time zone differences) … just focus on task at hand and proper solution for it ;)

I think that main topic and killer feature of this hackathon was inline editing driven by Marting Fick (Qualcomm), Edwin Kempin (SAP) and Dave Borowitz (Google). As far as I know this is already available in current master branch (2.8-SNAPSHOT) and allow user edit its commit in the browser. By ‘edit’ I really mean editing files in browser and ‘commiting’ them back (of course this will create new patch set). With this functionality you can easily and quickly fix typos/white spaces/comments in code and commit message without fetching given change locally, amending and pushing back. This could save tons of time… but of course it could hit you very hard if you are not careful enough.

Another interesting topic, which actually is not often addressed during such events, was … documentation. Lets be honest, Gerrit documentation is good when you are a contributor/commiter, but for the new comers or end users it is simply unhelpful. Huge thanks to Fredric Luthander (Ericsson) who bring this topic up and did awesome work in this area! … I’m not really good in documentation, and still need to update Gerrit docs about JavaScript and GWT based plugin development hopefully will do it … in few months ;)

Next topic was statistics and some ground work around generating reports from Gerrit. AFAIR Edwin Kempin, David Pursehouse (Sony Mobile), Gustaf Lundh (Sony Mobile) and Emanuele Zattin (Switch Gears) had some discussions how stats can be collected and accessed. AFAIR there was also a (POC (?)) patch send for review that was adding REST service with some basic statistics.

I think that most of Gerrit administrators and contributors doesn’t know what term ‘capability’ means in Gerrit environment. So, ‘capability’ is ‘type of permission’ eg. ‘forge autor’ or ‘label verified’ are core Gerrit capabilities. Unfortunately plugins cannot contribute their own specific capability, this is really painful in case of replication plugin. Which uses ‘start-replicate’ capability defined in core (but not used there) to grant users permission to execute replication. Looks like this awkward situation was somehow painful for David Ostrovsky (independent) since he started working on this topic (together with Dave Borowitz). I know that there was some patches send for review and I hope that in 2.8-SNAPSHOT this problem is sorted out. Also this means that other plugins can contribute theirs own capability and extend this way Gerrit access rights.

There was also continuation of (never ending story) Gerrit multi-master configuration. As usually this topic was brought by Luca Milanesio and Deniz Türkoglu (Spotify) ;)

Deniz Türkoglu during hackathon was also working on ‘blame plugin’ for Gerrit. The idea is to send mails to code-line-authors when somebody changes specific line or code section. AFAIR there was serious problems with Gerrit API that disallow accessing DB out of RequestSope. Hope that this problem will be solved in nearest future and we could enjoy this plugin in community ;)

And finally, last but not least, my main focus area in Gerrit… the WebUI extendability. Together with Luca Milanesion, Emanuele Zattin and David Ostrovsky we tried to make Gerrit more extendable. David was pushing to server side UI extensions and already did some ground work for this, so I’ve picked up this idea and implemented server side extension port for contributing links to Gerrit top menu (code example), then Luca comes and integrated it with GitBlit plugin. But my main goal is to have native UI plugins in Gerrit either in JavaSript, GWT or ClojureScript (everything that compiles down to JavaScript) so few hours later I’ve proposed event based JavaScript API. Right now this is only a concept and I’m looking for feedback about it, currently it only allows to add rows into patch info table (code example).

Last few hours of hackathon I’ve spent on investigating GWT replacements for Gerrit WebUI. After investigating some possibilities I’ve chosen AngularJS and did initial hacking. There is not much to share right now, I can just say that implementing project list page in Angular was really fun and straightforward. But playing with new JavaScript ecosystem was quite pain for me … maybe I’m to Java-ish ;) . Currently I have replacement for current GWT based project list page in Angular, but this was the easy part (I think) more difficult would be to integrate this with current Gerrit GWT UI and build system.

As we are in ‘build system’ topic… during hackathon decision was made that Gerrit will give a try to Buck (ant-like, developed in Facebook, similar to Google’s) build system. In Gerrit 2.8 you will not find pom.xml but BUCK file, this transition should make Gerrit development and releasing easier. Gerrit’s Buck srripts can generate Eclipse project configuration files, also use maven repositories for fetching dependencies. I can confirm that with without tons of Maven projects in Eclipse, IDE is more responsible, GWT development is faster and easier… also build time is shorter … but … there are the down  sides as well. Buck is only supporting unix like systems and it is not (yet :) ) an industry standard.

OK, I think thats it… I had a great time during this event also during my morning runs in Kensington Gardens. Hope to visit London again. See you all on next Gerrit Hackathon/User Summit ;)

create awesome Cascades Apps: attend workshop @ekkescorner

as you probably know I like to create awesome apps for BlackBerry 10 Cascades, but I also like to teach others and to give my experiences  from daily work to other devs. last week I presented a 5 – Day – Workshop  in Rosenheim.

this is part 1 of my report, part 2 can be found here.

before the workshop started …

After weeks of rain finally on saturday the sun comes back and immediately some attractions in the city for all the tourists:

the-day-before-01

photo taken 100 m from my home(office)

My workshops are always only for small groups of 4-6 developers to be effective and allow dynamic schedule: nothing is fixed, it depends from the developers knowledge and requirements what we’ll do. The goal: at the end all should be able to write their own apps.

This time attendees came from Munich, Nuremberg and also Liz coming from London, UK. As Liz arrived on Sonday weather changed again and we got hail:

the-day-before-02

Trainingscenter @ekkescorner

Workshop started on Monday at “Zur Historischen Weinlände”:

service-01

doesn’t really look like a trainings center ;-)

but they’re equipped well with HDMI Beamer and best of all: a great cuisine and friendly team supporting us all over the week:

service-02

My workshops are no workshops to relax from your daily business work: be warned – you have to listen carefully and hack much code by yourself ;-)

food for brain and more

  • Cascades: awesome food for your brain
  • surrounded by great food for your sense of taste

If you can get both: a great week is guaranteed !

my equipment

fortunately my home(office) is only some hundred meters away, so it’s easy to bring all the equipment you need as a mobile developer:

equipment-01

Z10, Q10 (DevAlphaC), MacBookPro with Momentics, Keynote presentation, HDMI – switch, Bluetooth Keyboard, Bluetooth Mouse, …

even my iPhone got a job as remote control for Keynote ;-)

equipment-02

recently I did some work with external Bluetooth keyboards,Mouse and HDMI monitors connected to BlackBerry10 devices. I blogged about this here. In the meantime I also got a 10″ HDMI Monitor and used this one to demo HowTo use it in Cascades apps:

workshop-05

photo: 10″ HDMI Monitor (1920×1280) connected to Z10 with custom Map from Cascades.

the workshop

First day I started to present my BuiltForBlackBerry APPs to demonstrate live what does it mean to have a TabbedPane, NavigationPane, Peek, InvocationFramework, Notifications, Custom Maps, Communication with Server, Dialogs, Toasts, ShortCuts, KeyListener and much more.

I did this all and want to transmit my experiences …

Every day we only had 1 – 2 hours  slides and some theory …

workshop-03

… and then went over to hack the code.

workshop-07

My workshops are not a replacement for BlackBerry’s WebCasts where you can learn Cascades to become a BlackBerry Builder – these WebCasts are a great foundation to know what’s available and can be done with Cascades.

My workshops are focused to become a great developer and learn HowTo use all the frameworks, HowTo read the documentation, try things out, copy and modify code from samples. Cascades documentation is great and now all is integrated directly into the new Momentics 10.2 IDE. On the other side there are so many APIs, so many different areas of app-development you can be lost in space …

I went through the normal app – development – process and step-by-step we developed a Cascades APP from scratch. Designing a new mobile app it’s important to understand the Navigation Model…

workshop-04

… where Cascades provides TabbedPanes, NavigationPane, Pages, Sheet and ApplicationMenu. It’s important to understand this and to know HowTo use it for your specific apps. In such a small group of developers we can discuss those decisions and think about alternate ways.

As soon as you know HowTo navigate through your app, you should be aware of the ways to create your UI dynamically…

workshop-08

… this is more work to be done as developer, but your users will get a fast app with low memory consumption. If you know this from the beginning, it’s easy to follow.

We also went through the main UI Controls, UI Design and the cool Signals and Slots concept to connect events with handlers, where the difficult part was done by magic from Cascades – or better: by Qt MOC – Meta Object Compiler for you.

workshop-10

Coming from Java to C++  perhaps there’s the fear about creating and deleting objects without a Garbage Collection. Qt provides a cool concept of Parents to make all of this easy for you.

Every mobile application has to deal with Lists and underlying data models – and this is a really easy job using Cascades.

workshop-01

We also discussed what’s important to get apps certified as BuiltForBlackBerry and I explained the UI Guidelines and we did it in our app: per ex. to provide a SceneCover if the app will be minimized:

workshop-11

using images made at the workshop as minized Application Cover ;-)

…hard work for developers new to Cascades or even to mobile development, but every day there was one break to get lunch :)

great food served

food_drink-09

food_drink-13

food_drink-05

also in the morning some bavarian butter pretzels are waiting and later on some sweets:

food_drink-08

Night Coding

Normaly learning new stuff and hacking code for 10 hours is more then enough. Here the Night-Coding comes in: it’s a special offer by me, free and optional. Perhaps you don’t believe: all developers also attended the night coding sessions !

… perhaps you understand the motivation if taking a look at the pictures below :)

nightcoding-02

Nightcoding is something like a free-style workshop: you can ask what you want, we can try things out …

…drink…

nightcoding-03

…enjoy some snacks…

nightcoding-05

discuss HowTo code …

nightcoding-08

be shocked by the awesome speed Cascades populates a list with 90,000 records  ….

nightcoding-01

or again take some more from the snacks:

nightcoding-06

If you want to see some more pictures: here I uploaded some to Flickr.

the app built from scratch

want to take a look at the app built from scratch by workshop attendees ? This is always the most curious part for me: I never know what kind of app we’ll build at a workshop – it depends from the requirements, questions, …

the_app-01

home page with Toast as “Tip of the day”

the_app-02

TabbedPane as root of the app

I will demo the app in my next blog on this … stay tuned …

update: Part 2 is written and can be read here.

Need a Cascades Workshop ?

ask me for a workshop – for those small groups I can arrange workshops on-demand in a short timeframe.

You want to arrange rooms and audience ? I can also come to you and present – but then you’ll miss the great food, night-coding, …

Meet me

… next week at MDC in Nürnberg

MDC2013_BannerSPEAKER

…in september at MTC Berlin:

mtc-2013

where I will talk about “Peer-to-peer pushes ion Business Apps

June-29 Eclipse Day China (Beijing):

I will demo the new Eclipse Momentics IDE: live hacking – no slides.

Thanks to BlackBerry you can win a brandnew BlackBerry 10 Device – a Q10 :)

Q10-Homescreen

If you’re in Beijing listen carefully to my session – at the end there will be a question: first one from audience answering this will win the Q10 !


(c) 2013 Creative Commons License 3.0 (BY-NC-SA) by ekkescorner


Filed under: BB10, Blackberry, C++, Cascades, Eclipse, mobile

Eclipse Contributor License Agreements Are Live

As we started talking about back in February, the Eclipse Foundation is doing a major overhaul of our IP processes. With the Kepler release now firmly in its end-game, the time has come to start rolling this out.

In February, I identified three major pieces of work that needed to get done:

  • First, we are going to implement Contributor License Agreements (CLAs) for all contributors at Eclipse. The CLA will be a short document that essentially asks The Three Questions once. We will collect some information about the contributor so that we have a record on file of who is giving us code or documentation. Note that the Eclipse Foundation CLA will be quite different from those in use at other organizations. For example, Apache’s CLAs basically give the ASF a license equivalent to ownership for contributions. The Oracle Contributor Agreement (OCA) used by OpenJDK community gives Oracle joint ownership of contributions. The Eclipse CLA is much more modest. In terms of licenses, all it says is that the contributor agrees that their contributions will be provided under the license(s) for the project they’re contributing to. You can review and discuss the draft CLA on bug 401349.
  • Second, we are going to support signed-off-by for contributions which flow to Eclipse project via git and Gerrit. The goal here is to make it as simple as possible for Eclipse projects to accept contributions via the community best practices which have grown up around git. As part of this, we will be developing a contributor certificate of originality, inspired by the one used by the Linux community.
  • And finally, we are going to automate as much of this workflow as possible. Our CLAs will be presented and completed on-line. There will be Gerrit support so committers get an immediate indication as to whether a contributor has a CLA on file. There will be git triggers which will reject a commit where there is no CLA on file for the author of the code commit.

Ever since then, we’ve been working on getting all of the pieces lined up to go live with these capabilities. Today is the first step!

The Eclipse Contributor License Agreement is now live. This means that contributors can execute a CLA, and get theirs on file. Committers will be able to use the PMI (project management infrastructure) to look up whether a particular contributor has a CLA on file. So starting immediately, you will be able to refer to a CLA rather than asking the “three questions” on a bug. This is basically delivering on the first item above.

For the second item, the Eclipse Foundation Contributor’s Certificate of Origin has been published, and contributors and committers should start using the signed-by option with git.

In order for a contributor to sign their CLA, they need to do the following:

  1. Obtain and Eclipse Foundation userid. Anyone who currently uses our Bugzilla or Gerrit systems already has one of those. If they don’t, they need to register.
  2. Login into the projects portal, select “My Account”, and then the “Contributor License Agreement” tab.
Navigate to the CLA

Navigate to the CLA

The day after Kepler ships — Thursday, June 27th — we will deliver on the third item, which is automation. On that day, we will start automatically enforcing CLAs. This means that every time a contribution arrives at one of our git repositories (including Gerrit), the author field will be checked to ensure that there is a CLA or Committer Agreement on file for the author. If there isn’t, the contribution will be rejected.

Progress!


Filed under: Foundation, Open Source

MOXy's @XmlVariableNode - JSON Schema Example

We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.  To accomplish this we have created a new Variable Node mapping. In this post I will demonstrate the new mapping by mapping a Java model to a JSON Schema.

You can try this out today using a nightly build of EclipseLink 2.6.0:
Read more »

Google Summer of Code at Eclipse

I would like to introduce myself. I’m Hendrik and currently I’m participating at the Google Summer of Code this year with a coding project at Eclipse.org.

The Google Summer of Code is a program by Google to motivate students (like me) to start working on Open Source projects. The whole program is organized by Google itself but the mentoring is done by volunteers of the Open Source projects. In my case I’m mentored by Lars Vogel and Markus Kuppe from the vogella GmbH and I also get support from John Arthone. After the project the students should have learned how to work at Open Source projects and be motivated to stay as committers or contributors in the Open Source community. With the successful completion of the project the participants are rewarded with a nice “pay check” from Google.

If you’re interested in the GSoC, you find more information at there site here and for Eclipse specific topics at the Eclipse Wiki .

But now to my project.

My accepted proposal with the title Implementing generics in JFace viewers is based on a feature-request/bug opened by Lars Vogel.

The reason for this bug is, that currently the JFace Framework does not support the Java generics feature, so the developers has to use typcastings to access there data in the viewers like in the following example:


col.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
Person p = (Person) element;
return p.getLastName();
}
});

While this works the casting has a big disadvantage. It does not ensure that your program is type safe, because the casting and the usage of the Object class allows the JVM only to determine the type of element object at runtime.

For example the the element object could be from the class Invoice which is not type compatible to the Person class. The program will compile, but the program will crash at runtime with a log like this:


Exception in thread "main" java.lang.ClassCastException: Invoice cannot be cast to Person

Hopefully the Exception will be raised at the testing phase, not in a sales presentation with an CEO attending.

Sure you can avoid this exception with an instanceOf like in the following example, but there is a good reason why a lot of programmers find this a little bit smelly.


combo.setLabelProvider(new LabelProvider() {
@Override
public String getText(Object element) {
if(element instanceof String){
String index = (String) element;
return index;
}else{
return "";
}
}
});

In this case the instanceof is even worse, because it will hide the potential problems. The change of the return “”; line to return null, will also get an exception and just wrote some boilerplatecode. With my project I want to fix this problem.

My task for the next three and a half months will be the implementation of the Java generics language feature for the JFace viewers.
This should help to avoid castings like in the first example. So the goal is to allow JFace users following coding.


col.setLabelProvider(new ColumnLabelProvider<Person>() {
@Override
public String getText(Person element) {
return element.getLastName();
}
});

To get started with the project I’ve committed a small change which will allow the usage of Java 1.5 within the org.eclipse.jface bundle. The change is based on the Bug #395213 and is committed to Gerrit

The next step will be the implementation of the generics feature for some smaller viewers like the ComboViewer and test them and the backwards compatibility. I also plan to look and document other things along the way if time permits.

If you’re interested in my project you find more information on my Google Summmer of Code proposal site here or on the Eclipse Wiki

Inactive Blogs