New URL

And just in case you haven’t noticed:

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”.

List of EMF Notification event types (event type name – int)

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-5e.

Just a very quick post today, which will hopefully be useful to someone other than myself as well.

When using the org.eclipse.emf.common.notify.Notification interface in Eclipse GEF editors, more precisely in any extensions of Adapter or EContentAdapter (cf. respective tutorial at vogella.com) you use in EditParts, you may want to catch certain event types in your Adapter‘s notifyChanged() method.

In my case, I have an Adapter listen to model elements, and want to implement a switch statement for certain event types. I’m able to get the event type in the method via notification.getEventType() and print that to, say, System.out1, but this only gives me an int value. To be able to quickly implement the switch case for this event type, I thought it would be useful to have a list of event types and their corresponding int values. So here it is (one ordered alphabetically, and another one ordered by int value).

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…

Building a cross-platform, feature-based Eclipse RCP Product with Tycho II: Mind your OSs

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-4T.

If you have followed Building a cross-platform, feature-based Eclipse RCP Product with Tycho (the umpteenth), and have run the build on a Windows system, you will have ended up with non-executable products for Mac OS X and Linux.

What this means is that the product will build just fine, but when transferring the product zips to the target system (Mac OS X, Linux), unzipping them, and trying to run them by double-clicking on the executable, nothing will happen. This is due to the fact that Windows does not know about file system permissions, as used for *nix systems (such as Mac OS X and Linux).

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…

Dynamically calculating the position constraints for a figure in a GEF editor layout in relation to another figure

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-48.

I’ve worked on the implementation of a GEF editor for an EMF-based model, using both the GEF book and vainolo‘s great GEF tutorials. The model consists of several types of nodes and connections, with different layout requirements for the display of their figures in the editor, as follows.

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…

Building a cross-platform, feature-based Eclipse RCP Product with Tycho (the umpteenth)

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-3z.
DISCLAIMER: This solution was tested with Eclipse Indigo (3.7.2), Java JDK 1.6.0_37, Tycho 0.16.0, using a Target Definition which contains p2 repositories only, and a Product Definition which is feature-based. A “delta pack” is not needed, as all necessary plug-ins can be pulled from Eclipse release-train p2 repositories.
Other setups may work, but have not been tested.
If you build on a Windows system, you will end up with non-executable products for Mac OS X and Linux. For more information, and how to fix this, please read Building a cross-platform, feature-based Eclipse RCP Product with Tycho II: Mind your OSs.

While the info in this post can easily be found elsewhere, I’m trying to give a beginner-friendly, hopefully at least half-coherent explanation of the topic. Part of the rationale behind this is to make a note to myself, so please forgive any inaccuracies (or better still, comment on them).

When I first set out to build an RCP application, I had to declare dependencies to mavenized OSGi-bundles, which very quickly led me to Tycho, a “set of Maven plugins and extensions for building Eclipse plugins and OSGi bundles with Maven”. And while I managed to get my basic build to work relatively quickly with Tycho 0.13.0 (after a few posts to the immensely helpful tycho-user mailing list, a few questions on stackoverflow.com, and a dozen bundles of pulled out hair), I ran into problems with realizing a working cross-platform build.

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…

A Stack Exchange site for the Eclipse community?!

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-2F.

Earlier this week, I’ve been listening to Episode #87 of the (then) Stack Overflow Podcast, where Jeff Atwood and Joel Spolsky as well as the (then) new Community Coordinator Robert Cartaino discussed some of the fundamental features of and ideas behind the Stack Exchange platform, which sets it apart from other interactive community platforms such as phpBB or vBulletin.

Websites built on Stack Exchange (SE) are Q&A sites. And while some of the other community platforms (e.g., see above) are often used for this kind of interaction – people asking questions and receiving answers -, there are some features that do set SE apart from forum/message board (MB) type platforms. In the following, I will sum up some of those features. While the (incomprehensive) list is inspired by the podcast, it does reflect my own opinions only … one of the latter being that SE is great technology.

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…

EclipseCon Europe 2012 – lessons learned

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-2e.

Last week I went to my first ever developer conference (apart from a local Eclipse Demo Camp for the Juno release): EclipseCon Europe 2012. It could be summed up in one word: GREAT!

In the course of the conference, I’ve learned a great deal about Eclipse, its projects, Java, OSGi (EclipseCon was co-locating with the OSGi Community Event 2012), and programming in general, but also about open source communities, more precisely the Eclipse community.

In this post I’d like to share some of the stuff I’ve learned as well as some more general thoughts about my experiences at EclipseCon.

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…

How to refresh model source/target connection “children” of GEF NodeEditParts

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-1t.

I am currently developing a GEF-based editor for an EMF-based model with the help of the GEF Book, and vainolo’s incredibly helpful blog posts.

I had implemented connection creation, following vainolo’s post about connections, but in my editor, the added connection figures never showed up, although the respective model objects had been instantiated (I’ve checked!). It was only after I had saved the graph, and re-opened the editor that the connection figures became visible. The respective code bits looked like this:

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…

Getting started with the Eclipse RCP

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”. Link to this post on the new site: http://wp.me/p3klLL-p.

Everybody has to start somewhere, and as a complete beginner in software development with Java and the Eclipse RCP, I have been, and still am, constantly on the lookout for sources of information.

The following books and websites – in my opinion – provide good starting points for people who are in the same position.

Ordered by usefulness (IMHO).

The Eclipse Book

Jeff McAffer, Jean-Michel Lemieux, Chris Aniszczyk: Eclipse Rich Client Platform, Second Edition. Boston (Addison-Wesley): May 2010. 552 pp. In English. ISBN-13: 978-0321603784.

For people who like to read books rather than websites. It is as up-to-date as can be, and is a very good and comprehensive introduction to the Eclipse RCP. Can be read back-to-back, or used as a reference. I have used this almost exclusively in my “early days” of programming with the Eclipse RCP.

Read more (opens the full post at the new blog location http://blog.sdruskat.net)…

Hello world!

My blog has moved to a new home. Please go to http://blog.sdruskat.net for the Brand New Code on the Block! And – like they said in the nineties – “don’t forget to update your bookmarks”.
/**
* @author New Code on the Block
*
*/

public class HelloWorld {

    /**
    * @param args
    */
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}