May 16, 2012

Making P2 working with RPM - last milestone

Maybe you remember my last post about making P2 and RPM working robustly together. Having the Eclipse Platform M7 packaged in Fedora, and Fedora frozen, I have finally found time to look at that work again.

So, first of all, I was surprised how poor programmer was the past me. Then I have fixed a couple of hardcoded paths, got the solution working again, and even managed to prepare and install my first RPM-wrapped feature into the modified version of Eclipse without breaking the ownership of files.

Ownership of files is a pretty important aspect of Fedora security mechanism - a file installed by RPM into /usr should not be changed because otherwise the verification of system will fail - the system will be believed to be compromised.  P2 changes many files in Eclipse installation if it only is allowed to do so.

After the installation - Eclipse successfully started with my new RPM feature installed. But then I have discovered a hole in my logic. And then my logic appeared to be like a cheese:


I totally forgot about the fact that once I generate a profile from an assembled installation, P2 will start working as usual, and I will not be able to uninstall anything. I'm not sure if you know it, but P2 is an API to control the bundles.info file, which is

only.

P2 does not care if your bundles.info got changed. It will overwrite it.

My attempts to solve that problem made the scope of changes growing very fast. I even created wiki page and put there some things that need to be taken into account.

I'm sorry folks, especially for those haunted by issues similar to:

You will not get a revamped version of P2. I do not think it is possible and I'm officially tossing this idea. You have to be patient - there is no instant cure for those issues. Eclipse Shared Installation works poorly out of the box (see bug 358471), and things get even worse if you take into account additional restrictions that Fedora puts on P2.

In the meantime - what do you think about preventing Eclipse from being run by root by accident?  It is terribly easy to do that on Linux, but then all your dropins stuff goes into master profile and you cannot revert that.

EEF 1.1.0 Release

Hi,

We are pleased to announce the 1.1.0 EEF release, that will be included into Juno.

you can grab the zipped update site from here : http://www.eclipse.org/modeling/emft/downloads/?project=eef

or use the p2 repository : http://download.eclipse.org/modeling/emft/eef/updates/releases/1.1

Please use the corresponding acceleo maintenance release ( 3.2.1 ) to obtain the latest improvements we've made.




Debugging Vert.x apps with Eclipse


+Pascal Rapicault has me hooked on Vert.x, http://vertx.io. It looks like it can be a great competitor to node.js allowing you to use the same asynchronous web programming model not only with JavaScript by any of your favorite JVM languages, including Java believe it or not!

At any rate, tonight I started to see if I can use Eclipse to develop apps in Vert.x. It turned out to be a lot trickier than I thought so I figured I'd capture what I did here.

First, you need to create a User Library for Vert.x. I just looked at the bin/vertx script to see what it added to the Java classpath to see what jars to add to the library. After that I was able to create a Java project and add the library to the build path and code up my little hello world app (which indeed is very node.js like).


Launching is pretty tricky. First, Vert.x doesn't want your app to be on the classpath when it starts up. Weird and that means you have to remove your project from the Classpath. But you do then need to add in your Vert.x user library using the advanced option so it can launch Vert.x's main, which is VertxMgr.




And you need to add your project build output with the -cp application option, which I passed ${project_loc:/vertxHelloWorld}/bin, so it can find your Verticle class.



Finally when you debug, the Default source path matches your Classpath. Since you removed your project from the Classpath, you have to add your project to the sources manually in the Source tab.


I imagine someday, someone will create a Launch Configuration that will do this all for you but if you put some muscle in it, you can get up and debugging your Vert.x app in Eclipse now. Now, if I can debug my client-side JavaScript in the same session...

May 15, 2012

How Many Plug-ins

Few Large vs. Many SmallTension in the workplace.

In one corner, a developer that believes Separation of Concerns ends with packages. He does believe in having more than one project, but only because we have two products with code in common. So he’d have one project for product 1, another for product 2, and another for the code they have in common. (OK, he’s not that draconian, but I’m stating this stylistically).

In the other corner, me. I take it to the other extreme. I see every service (of which we supply a couple dozen) being in its own project.

His argument is that he doesn’t want an explosion of projects from what we currently have. He wants every extracted project to be well justified.

My argument is that an increase in modularity in bundles brings design to a higher level of abstraction and has a number of benefits, including slower degradation of quality and improved software comprehension.

The question is this: what is the best philosophy to have? Few large projects? Many small projects? Or is there always a balancing act that makes this inseparable from art? I am dying for your opinions! (And relevant reading (such as articles) if you know any.)

RAP mobile 0.5.8 – New and Noteworthy

We are happy to announce another preview release of RAP mobile. Version 0.5.8 adds support for even more widgets on the Android side while improving stability and performance on iOS and Android.

The new release brings improvements to the mobile client side but RAP itself has undergone some minor changes as well and we highly recommend that you update your target definition. The changes will also impact your server-side code slightly as the wording of some RAP classes has been refined.

Most notably the ApplicationConfigurator is now called ApplicationConfiguration and the ApplicationConfiguration has been renamed Application. Simply replace the names in your code and organize the imports.  You will also need to update your dynamic service declaration which now provides an org.eclipse.rwt.application.ApplicationConfiguration implementation. For more details check the great post from Ralf.

And now for the new and noteworthy features of RAP mobile. If not noted otherwise all features described here are available on Android and iOS.

New and Noteworthy

Support for the SWT Group widget

group widget RAP mobile 0.5.8   New and NoteworthyThe Android client now supports the SWT Group widget. The appearance of the groups is derived from the Android holo theme with its simplistic title and horizontal line. In addition to group.setText() you can also use group.setForeground() to colorize the title and horizontal line.

Support for right-click via long-press

The right-click is a common ui metaphor on the desktop but has no clear parallel in the mobile space. In an SWT application the right-click is usually used to open a contextual menu. The RAP mobile framework therefore uses the method Control.addMenuDetectListener() to register a listener that is activated when the user long presses on an item.

Entry point discovery mechanism

discovery1 RAP mobile 0.5.8   New and Noteworthydiscovery ios RAP mobile 0.5.8   New and NoteworthyRAP mobile supports a special mechanism to help you find the available entry points configured for an Application. You can append the special identifier “/index.json” to your url, which delivers a JSON document, listing all the available entry points. The RAP mobile client uses this list to let you choose the app to start. As part of that feature we also simplified the Android start activity as you can see in the screenshots to the right. On iOS the discovery menu is activated by doubletapping on the status bar at the top.

Client side caching of images

Up until this RAP mobile for Android release an image has been loaded from the server every time it was requested. We have now integrated client-side image caching on Android as well which greatly reduces the bandwidth and power requirements when an image is requested multiple times. Try out the “/virtual-tree” demo which displays the same icon dozens of times.

Improved handling of server session timeout

timeoutDialog1 RAP mobile 0.5.8   New and NoteworthySince the state of a RAP mobile application is bound to a session on the remote server, there is always the possibility of a session timeout. We’ve recently improved this (expected) behavior so that you can now restart your session from the message dialog.

Android Specific

Enhancements and Bugfixes

  • Toolbar has a fixed height
  • ScrolledComposite supports simultaneous horizontal and vertical scrolling
  • Shells now have title support for setting text and icon


Java 8: extensible module definitions with JSON

While the Java Modularity JSR [1] is still AWOL (come on, Oracle, I thought that this JSR was planned to be launched by September 2011!), I did some work in OpenJDK Penrose around changing the Java SE 8 module metadata from the .java/.class format into JSON.

JSON is quite nice because
with JSON, the SE 8 Quick Start module org.astro module definition looks like this:

{
  "module" :
  {
    "name" : "org.astro",
    "version" : "1.2",
    "exports" : [ {"name" : "org.astro"} ]
  }
}

and the same module info file can be expanded to contain OSGi metadata, for example to add a version to the exported package like this:

{
  "module" :
  {
    "name" : "org.astro",
    "version" : "1.2",
    "exports" : 
    [
      { 
        "name" : "org.astro", 
        "org.osgi.version" : "1.2.3"
      }
    ]
  }
}

Any OSGi metadata can be added to the JSON module descriptor. I've added a simple test to the Penrose codebase to give an idea what this looks like: hello-json-custom.sh.

This works today in OpenJDK project Penrose. The codebase still supports module-info.java, to allow a gradual migration to JSON-based metadata, however I'd like to see the module-info.java/.class support go away ultimately.

While Jigsaw/Penrose are two variants on a module system for Java SE, other ones are clearly possible. Once the modularity JSR is up in action, it should seriously consider OSGi as a module system for Java SE 8. Apache Harmony has clearly demonstrated in the past that modularizing the Java platform using OSGi metadata works quite well. OSGi has proven to be an excellent module system for Java for the last 12 or so years, so it would be foolish not to take that experience on board...

On the lack of Modularity JSR, I think at that at this stage we can expect that it will delay the release of Java 8, given that modularity is such an important building block for Java, and is certainly not something that can be rushed through.

[1] 'Java Platform Module System' JSR as mentioned in the Java SE 8 umbrella JSR.

Getting ALM2.0+ to work - Breaking down the silos to provide an integrated value chain for software delivery and beyond

Hosted by: Mik Kersten, Founder and CEO of Tasktop Technologies, & featuring Dave West, Vice President, Research Director at Forrester Research, Inc.
 
Abstract:
* Featuring guest speaker from Forrester Research
** All webinar attendees will be automatically entered in a drawing for a new Apple iPad
For many organizations the ability to deliver software is fundamental to business success. New products, services, updates to channels, pricing or promotion require changes to applications and websites. Organizations are now looking to Application Lifecycle Management (ALM) to provide visibility into this increasingly core business process.

ALM promises the benefits of business management to the practice of software delivery. ALM2.0+ describes the next generation of practices that broaden the lifecycle to include operations and the business and add functionality for planning and collaboration.

But introducing ALM is difficult, with developers, business analysts, operations, project managers and QA professionals all having their own tools and working practices. Bringing order to this chaos requires a different way of thinking about ALM – one based on stakeholder inclusion and cross-vendor integration.

In this talk, featured speaker Dave West, Vice President, Research Director at Forrester Research will describe the reality of ALM adoption. West and Mik Kersten, Founder and CEO of Tasktop Technologies will present patterns for successful ALM adoption for mid and large-scale organization, and highlight how organizations can incrementally obtain the benefits of ALM by connecting siloes, one stakeholder at a time.

This talk will:
  • Introduce ALM2.0+, its promise and its challenges
  • Define a series of ALM integration patterns
  • Describe how successful organizations are delivering software more efficiently with ALM2.0+ today


delicious delicious | digg digg | dzone dzone

Close the loop between Software Project Planning and Development

Daniel Morris, Polarion Softare, and Benjamin Muskalla, Tasktop Technologies
 
Abstract:
Join this session for a live demo of a day in the life of a developer and project manager using state of the art development and ALM tools from Tasktop and Polarion. Learn how to:
  • Improve project visibility for all team members
  • Drive productivity by connecting the IDE with requirements management, development planning and reporting
  • Foster innovation, communication and knowledge transfer by bringing virtual teams together in one integrated platform
  • Get the most modern and integrated developer experience for Polarion

delicious delicious | digg digg | dzone dzone

Upcoming Event: Lean ALM – The changing face of ALM

Event Date: May 31, 2012 8:00 am GMT-8

Register Now

Dave West, Chief Product Officer at Tasktop
 
Abstract:
In this talk Dave West, Chief Product Officer at Tasktop, describes what Lean ALM looks like and introduces the 4 tenets of Autonomy, Transparency, Adaptability and Collaboration (ATAC) that unite to maximize flow. We are increasingly living in a software economy where business innovation and value are directly tied to software. Software supply chains are changing into ecosystems where control has to be replaced with transparency and collaboration. But has the management discipline of software delivery kept pace? Has ALM kept pace? The answer is NO. Traditional ALM approaches focused on tools and the SDLC rather than the collaboration and flow. In this talk Dave will cover:
  • Why the time is right for Lean ALM
  • What is Lean ALM
  • Autonomy
  • Transparency
  • Adaptability
  • Collaboration
  • What it means to your tool and process strategy

delicious delicious | digg digg | dzone dzone

Eclipse 4 training partnership with Industrial TSI (Netherlands, English Training)

Industrial TSI and vogella have entered into a partnership to provide Eclipse 4 RCP courses in The Netherlands and the Flemmish part of Belgium.

We believe that Industrial TSI is the suitable partner in this region to provide Eclipse 4 RCP trainings and spread the knowledge. Industrial TSI is an Eclipse Foundation member and provides several Eclipse related courses.

The first Eclipse 4 RCP course is scheduled from October 1 to October 5 2012 and will take place in Nieuwegein, The Netherlands. This will be the first Eclipse 4 RCP Training from vogella which is held in english. Visit our Training Site for more details on this course.

For more information about Industrial TSI, please vist: http://www.industrial-tsi.com/

May 14, 2012

Start Simple, Then Build “Call of Duty”

My son is taking a course in computer programming at his high school. As is the case for many (most?) high school students in Ontario, they’re using a programming language named Turing.

I initially hated the Turing programming language. That hate was a bit irrational, as–like many of my peers–I have great respect for Alan Turing and find it more than a bit audacious for someone to dare name any programming language after the man that is responsible for much of what we take for granted.

After spending the weekend helping my son with an assignment, I still don’t particularly like the programming language: I find it unnecessarily verbose and cumbersome; its libraries lack important features; the development environment is sluggish; and it only runs on Windows (though it seems to work reasonably well using the wine emulator on Ubuntu 11). But, I’m starting to warm to it as a pedagogical tool.

When I was just learning about programming, the coolest game available was Lode Runner. This is the game that my high school peers and I strived to emulate on four beat up Apple ][ plus computers. The teaching staff wasn’t very much help with regard to learning how to write software; there wasn’t even a formal course on computers. They did provide one big bit of help, however: they only let us play video games that we wrote ourselves; no store-bought games were allowed in the lab. Through trial and error, with help from Nibble magazine, Beagle Bros., other students, and an occasional visit from one of the professors from Royal Roads Military College we learned to program. I produced many great games like Airwolf, a top-down shooter based on the television programme; Corridors of the Inquisition, a 3D maze game; and Kitty Munch–my most popular contribution–another 3D game in which the user drops bricks on cats from the top of a tall building.

By “great”, I of course mean “totally lame”. Nothing that we ever built compared to Lode Runner. But the important part in this little trip down memory lane is that there was a fighting chance that any one of us–or perhaps some small number of us–could write something like Lode Runner, and sell enough copies to make a decent bit of money.

Fast forward to today. “Call of Duty: Modern Warfare 2″ cost between $40 and $50 million to produce. A big boatload of people where involved in the creation of this masterpiece of mayhem and violence. I worry a bit that today’s student programmers can’t possible look at games like this and draw inspiration. I can’t see how any reasonable person can look at Call of Duty and say “I could build this” like we did with Lode Runner?

So what does any of this have to do with Turing?

I’ve tried a few times to teach my son how to program in Java. Maybe with more time and effort, that could work. But it was difficult to get to a point were we could do anything meaningful or interesting. In a couple of hours, I managed to get an working version of Kitty Munch (actually the third version) implemented in Java and running on Android, but this just left my son’s head spinning. Three decades of growing with the industry has equipped me with what I need to get that job done, but teaching all of the moving parts to a teenager is pretty difficult. Jumping into the middle of this is a great way to discourage people from even getting started

This is where Turing comes in. It’s a simple language that shares many concepts with Pascal. Like the Applesoft Basic and, later, Turbo Pascal, that I cut my teeth on, it’s possible to write a working program without understanding functions, objects, or structures. You can get by with a very basic understanding of a couple of data types, and grow from there. My son and his classmates have all, in a matter of a few days, managed to build working games. My son’s “Kitty Munch 4″ is almost as functional as the original after only about two days worth of effort; more functional if you count the use of colour as functionality. Yesterday, I taught him about using double buffering to eliminate flickering, which should give him a leg up on his classmates. Tomorrow night (he has baseball tonight), I’ll show him how to use image masks.

I’m still not a big fan of the Turing programming language. But I do appreciate the ability to get something running very quickly, and then incrementally introduce concepts without having to worry about all the nitty-gritty things that real programmers have to think about. For students who are just learning to program, I don’t necessarily recommend Turing. What I do recommend, however, is that you start simple. Don’t try to build Call of Duty. Start with Lode Runner. Or Pong. Learn the basics. Get something working. Then make it better.

Do this first. Then go get a degree in Computer Science.


Upcoming Events


With Juno's arriving to the end of the release cycle Eclipse Day's are popping up everywhere in the world.
If you are not too far from France, you should consider joining us next week for Eclipse Day Toulouse


Great content, very low price (20€) and Toulouse is so sunny it can only be nice !

I will be there presenting Eclipse Modeling. A 101 session leading you to the jungle of one of the most diverse top level project in Eclipse, describing some of the main components and how you can use them in your day to day work.

Register now, this event takes place next week!



It is said the west of France is less sunny but I'm pretty sure its a myth spread by the Bretons frighten tourists.   The 2012 breizhcamp will be the occasion to confirm my belief.

This is a Java/Webapps event during two days with more than 50 speakers ! I will be representing Eclipse there along with Stéphane. We will give an Acceleo tutorial.

And here is the Breizh Camp trailer :



The EclipseCon Europe call for paper is out ! You should consider to start preparing your submission.  The  conference tracks are :

  • Eclipse Technology
  • Building Industry Solutions.
  • Community and Collaboration.
  • OSGi.
  • Other Cool Stuff.

Lets make this the best EclipseCon ever!

Joining Mozilla

I’m very excited to say that as of today I’m a Mozillian! I’ll be working with the fine folks on the WebAPI team. This is an entirely new set of technologies for me so I’ll be learning a tonne. I’m looking forward to meeting and working with all the excellent people in the Mozilla and broader web communities. I’ll be working out of the beautiful Toronto office.

As for Eclipse and Fedora stuff, I’m really looking forward to the release of Linux Tools 1.0 and the rest of Juno in June, 2012. Before then, Fedora 17 will come out and is going to be an outstanding release, especially from the Eclipse point of view. As I’ll be consuming Eclipse tools for my new work, I’ll be sure to file and fix bugs and spread the good word about the power of Eclipse for C++ developers. When I have some good HOWTO content for developing Mozilla stuff with Eclipse, I’ll post it here and be sure to tag it so Planet Eclipse picks it up.

With apologies to Neil Young: keep on rockin’ in the Free and Open Source world!

Eclipse Scout 3.8 M7 is here!

The Scout 3.8.0 M7 package is released!
You can download it from here: http://www.eclipse.org/downloads/index-developer.php.

Please feel free to test the new package and play around e.g. with the updated tutorials: http://wiki.eclipse.org/Scout/Tutorial/3.8.

This release has been tested against the reference platforms as documented in the Juno Overview (http://wiki.eclipse.org/Scout/Release/Juno#Target_Environment).

Known Bugs:

 

Scout Links: Twitter, Forum, Project Home, Wiki

May 12, 2012

Object Teams 2.1 Milestone 7 (finally) brings hot code replacement

As part of the Juno Milestone 7 also Object Teams has delivered its Milestone 7.

As the main new feature in this milestone hot code replacement finally works when debugging OT/J or OT/Equinox applications.

What took us so long to make it work?

  • Well, hot code replacement didn’t work out of the box because our load-time weaver only worked the first time each class was loaded. When trying to redefine a class in the VM the weaver was not called and thus class signatures could differ between the first loaded class and the redefined version. The VM would then reject the redefinition due to that signature change.
  • Secondly, we didn’t address this issue earlier, because I suspected this would be pretty tricky to implement. When I finally started to work on it, reality proved me wrong: the fix was actually pretty simple :)

In fact the part that makes it work even in an Equinox setting is so generic that I proposed to migrate the implementation into either Equinox or PDE/Debug, let’s see if there is interest.

Now when you debug any Object Teams application, your code changes can be updated live in the running debug target - no matter if you are changing teams, roles or base classes. Together with our already great debugging support, this makes debugging Object Teams programs still faster.

More new features can be found in the New&Noteworthy (accumulated since the Indigo release).

May 11, 2012

Netbeans nightly catching up with e(fx)clipse with improved JavaFX support

As the author of the eclipse tooling for JavaFX I checkout my competitors (which is the wrong word here because I don’t see us competing) which is Netbeans in my case.

I just download the latest nightly build and voilá they have now:

  • Autocompletion in the CSS-Editor for -fx properties
  • Autocompletion in the FXMl-Editor for element properties

Both of those features are also available in e(fx)clipse since a long time.

  • CSS autocompletion
  • FXML autocompletion

I’m currently working on improving the autocompletion for fxgraph and fxml for the upcoming 0.0.14 release. I wish I had more time to work on e(fx)clipse because this tooling stuff is more fun I ever thought it is. I have soooo many ideas and improvements but no time to implement them all.


Add Values to a BIRT Chart

When building reports that contain Charts, the BIRT data engine is responsible for creating the chart series data points. These data points are generally tied to BIRT data sets or cubes. While these mechanisms handle a lot of the grouping an aggregation of the data to be charted it may be desirable to add some manual data points to the chart. Fortunately this can be done with a fairly simple chart script event handler. If you have not done any chart scripting before, you may want to read over this post on scripting.

Chart event handlers are fired on the server and can be written in Java or JavaScript. The event order is listed in the post described earlier. The before and after DatasetFilled events are fired first. These events are fired for every runtime series that will be plotted. For example if you have one bar series, these events will be fired once for the category series values and once for the bar series values. If you use optional grouping, these events will be fired for every optional group the data engine encounters. The afterDataSetFilled event handler is passed a reference to the current series and the data set that will be used by the chart engine. This is an ideal location to change values, check for nulls or add values to the chart.
Lets assume we have the following Chart:
Generic Chart
This chart contains one bar series with four data points. In this example the afterDataSetFilled event will be fired twice, once for the category values and once for the bar series values. We can then use the following script to add a value to the beginning and the end of the series.

function afterDataSetFilled(series, dataSet, icsc)
{
importPackage( Packages.java.util );
importPackage(Packages.java.lang);
importPackage( Packages.org.eclipse.birt.chart.model.type.impl );
importPackage( Packages.org.eclipse.birt.chart.model.data.impl);
var list = dataSet.getValues();
var narray1 = new ArrayList( );

//Check Series Type
//SeriesImpl used for category series
//AreaSeriesImpl
//BarSeriesImpl
//BubbleSeriesImpl
//DialSeriesImpl
//DifferenceSeriesImpl
//GanntSeriesImpl
//LineSeriesImpl
//PieSeriesImpl
//ScatterSeriesImpl
//StockSeriesImpl


if( series.getClass() == BarSeriesImpl ){
narray1.add(new Double(40.6));
}else{
narray1.add("AddBefore");
}

var llen =list.length;
for ( i=0; i < llen; i++)
{
narray1.add(list[i]);
}
//Chart Data Set Types
//BubbleDataSetImpl
//DateTimeDataSetImpl
//DifferenceDataSetImpl
//GanttDataSetImpl
//NumberDataSetImpl
//StockDataSetImpl
//TextDataSetImpl

if( series.getClass() == BarSeriesImpl ){
narray1.add(new Double(25.6));
series.setDataSet(NumberDataSetImpl.create( narray1 ));
}else{
narray1.add("AddAfter");
series.setDataSet(TextDataSetImpl.create( narray1 ));
}

}
The first thing this script does is to get the current values for the given series and creates a new ArrayList. Next it checks to see which series triggered this event. It does this by checking the series class. You could also check the series identifier. Once the series type is determined we add an initial value to the ArrayList, followed by adding all existing values to the ArrayList. Finally a last value is added to the ArrayList and a new chart data set is created. The type of chart data set that is created will depend on how you configured the chart and what type of chart you are using. The comments show additional options. In this example we are using a Text data set for the categories and a number data set for the bar series values. The output of the chart should now look like:
Chart After Script
This example is available for download at Birt-Exchange. For an example on adding a whole new series to a chart, see this post.

Inactive Blogs