Thursday, July 12, 2007

Node goes up... Node goes down...

Throughout the past week I have been focusing pretty steadily on my Summer of Code project. Last week I reported that container support had been added to Zest. Since then, I have been updating and fixing up many of the issues containers presented. There were a number of small changes that needed fixing (like the fact that my labels were all truncated), but I also managed to add a number of new features. In particular I added open close animations, and container layout and scaling. Now each container can have its own layout and scale depending on the number of nodes. I also reversed the direction of my gradient, although I really should work with the UI team and use the Kelvin Colours.


The most exciting feature I added was a new open / close algorithm. Now, when a container is opened, it moves the nodes below it out of the way. I attempt to put the nodes back when the container closes again. Moving nodes out of the way (without really altering the graph) is considered a pretty hard problem in graph drawing, but since I knew my nodes always grow downward, it made it somewhat easier for me.


Finally I added a fisheye feature. Now, if enabled, when you mouse over a small node you can have it zoom into focus. Using this technique, I chose only to show the icons on the small nodes, but on hover you get the full text. (In this screenshot I moved my mouse over the centre node in top container).



The snippet used to create these screenshots is less than 70 LoC (and if I was a more clever programmer I could probably do it in less than 40).

It was a pretty busy week with a lot of late nights and I haven't seen my wife and daughter much, so I think I will head home and enjoy the nice west coast weather we have been receiving.

Tuesday, July 03, 2007

Europa, My Top 10 List

I have had the pleasure of using Europa for the past 8-10 months. Of course it was not called Europa the entire time (Eclipse 3.3 Milestones with several milestone plug-ins attached). I have now come to depend on several of these new features and here is a list of my Top 10 Europa Features that I Cannot Live Without!!!

I should point out that I do a lot of Model Driven Software Development and Java Development, so if this list seems a little biased, it is :) There seems to be really good stuff going on in CDT, Birt, etc... but I have not used these tools enough to give them a fair review. I guess that's why this is My Top 10 List :)

Without further ado, my top 10:

10: Mylyn! A lot has been said about this, and yes it really does live up to all the hype!

9: GMF / MDT: Both of these are really cool technologies, but out of the box they also provide graphical editors for model development. One of the biggest criticisms of the modeling project was “I cannot see my model graphically”, well now you can!

8: New Look / Min-Max behaviour: Eclipse got a bit of a face lift with some new Editor Min / Max behaviour. This makes much better use of the screen real estate, while maintaining easy access to your favorite views through “Quick Views”. Press CTRL+M when coding, you'll enjoy the space.

7: The Eclipse Packaging Project: I still use Eclipse the “Old Fashion Way”, that is get the SDK, install the features I want, adjust the Eclipse startup parameters (memory use, file handles, etc..), but judging from some early download numbers, people have really enjoyed the pre-packaged Eclipse distributions. It is contributions like the EPP that answers the critics who said Open Source projects are cumbersome to setup and lack polish. I am definitely jumping on this bandwagon!

6: Plug-in XML and Manifest improvements: Several new features were added to the PDE to make plug-in development easier. This includes Content Assist, Hyperlink support, Code folding, and Code Formating. Also, the PDE now allows you run multiple version of the same plug-in in the workspace or target environment. These features echo Wassim's comments that PDE Does tooling, but our business is people!!

5: Printing on GTK+:This is just a great bug fix / feature addition. I should also point out that GTK+ support for Eclipse is amazing. I personally think it looks nicer than Windows and Eclipse runs as fast, if not faster on my Linux box than it does on my Windows one.

4: New PDE Forms: They really Brought Sexy Back with this one. As well as a form face lift (with new gradients, icons, section headers, etc...) field assist and field validation were added. If you don't know, these forms are not just for PDE, you can use them in your favorite SWT app too.

3: Save Actions: Every now and then you get a feature that you really hate, and this is one of them! Why? Because I can no longer sit at someone else's machine and use their version of Eclipse. I am entirely dependent on my save actions: to organize my imports, format my code, and update my brackets. In my opinion, this feature ranks up there with Automatic Builds!

2: CTRL+Awesome: CTRL+3 is the new CTRL+1, that is, the new hot key I cannot live without. I no longer have to remember where I saw that action, or even what actions are available. Every view, perspective, menu item and editor are instantly available with a push of a button (CTRL+3).

1: EMF Generics: The EMF Team really out did themselves with this one. Not only did EMF lead the way with Java 5.0 support, they managed to do this without breaking binary compatibility. And like everything else in Eclipse, if you don't like the feature, turn it off. Using this feature, EMF will generate fully templatized lists. Now when you get lists of Books from a Library, you actually get Elist<book> not just an arbitrary list. Ed and Marcello gave an excellent talk at EclipseCon about their experience adding this feature.

Saturday, June 02, 2007

Swt Callback Java Library

I just saw this post on dzone and thought someone on the planet may find it useful. It is a simple call back library to help deal with all those anonymous inner classes / listeners you get when you develop an SWT application.

http://www.playingwithwire.com/2007/05/wireload-releases-swtcallback-java-library/

I have no idea how well it performs.

cheers,
ian

Monday, February 12, 2007

TagSEA 0.5

As Chris mentioned, there are a few projects associated with tagging in Eclipse. We have just released version 0.5 of our project, TagSEA.

Website:http://tagsea.sourceforge.net
Update Site: http://tagsea.sourceforge.net/update

Like many other Eclipse projects, TagSEA is both an extensible framework as well as a set of exemplary tools. It provides basic tagging infrastructure for Eclipse, as well as concrete implementations for Java Tagging and Resource Tagging. TagSEA uses a concept from wayfinding known as waypoints. A waypoint is a particular location you wish to mark. TagSEA allows you to add tags, metadata and a comment to this waypoint.



Why did we do this? Good question :) We hypothesized that through the use of marking locations in code (or XML, or PDE Forms, or Workbench layout, etc...) , and providing mechanisms to return to these locations, developers could more easily navigate to “common” hot-spots or share interesting places with others. What do you think? Of course this is very new and we are just starting out, but we have all sorts of ideas of where tags could be useful:

  • EMF generated code that users are likely to customize
  • Places in the GEF framework that “should” be extended for normal operation
  • Plugin and manifest files
  • Mylar tasks
  • Images and other resources for future retrieval
  • SWT Snippets or other sample code
  • JUnit test cases

TagSEA currently supports hierarchical tags, a tag view, waypoint view and tag refactoring. As I mentioned, we have concrete implementations for Java and Resource files (Web URL and breakpoints are on the way). Where should we go next?

We have a long talk planned at EclipseCon (here) and we are currently throwing around the idea of holding a BoF on IDE's and tagging.

Monday, February 05, 2007

Eclipse Modeling Project and OCL

Anyone who believes that modeling at Eclipse is limited to EMF and possibly GMF, really should checkout the Eclipse (Top Level) Modeling Project (EMP). Ed Merks and Rich Gronback have done an excellent job of bringing together all of the Eclipse modeling work under one umbrella. A quick count reveals over 25 components to this project (including EMF and GMF).

Why should you use this technology? Of course if you are focusing on SWT extensions or device drivers this may not be the technology for you. But if you are writing an application (rich client or otherwise) that uses a data model, leveraging the EMP may save you a ton of time.

Recently (for part of my PhD) I needed a data model with a lot of data. I created a model (using EMF) for National Hockey League statistics. I created a class for Player, Team, PlayerYearlyStats, etc... The stats had attributes such as goals, assists, PIM (penalty minutes), etc... Using EMF I hit “Generate” and I had a fully working Java application that allowed me to create players, edit statistics and save all the data to an XML file (not bad for 10 minutes work). From here I populated the data with all the NHL stats from 1917 (no, I did not do this by hand!).

Next I decided to checkout a few other modeling components. In particular, I looked at the Object Constraint Language. OCL allows you to specify constraints on your Object Model in a platform (language) independent way. For example, I can say that if a player earned 200 points in a season, then the player must be Wayne Gretzky (self.points > 200 implies self.name = 'Wayne Gretzky'). While this record may never be broken, I would probably use OCL to specify more “predictable” constraints such as 2 players on the same team can't have the same jersey number, etc...
OCL can also be used to query your data. Christian Damus (the author of OCL for Eclipse) has provided great examples to help you get up and running. Once installed, the OCL examples will generate a simple interpreter plugin that extends the Eclipse Console. Using the OCL interpreter plugin you can write OCL queries. For example, I can write:

Player.allInstances()->select( p | p.yearlyStats.goals->sum() > 800)

To select all the players who goals each year sum up to a total greater than 800. If I change this to 700 goals I get 6 players. I will leave that result as an exercise for the reader

Wednesday, December 20, 2006

I Blog Because I Care

My dad used to have a sweater that read: “I yell because I care”. For anyone with kids I'm sure you understand. As the year comes to and end, we often start putting things in perspective. We start thinking about what is important to us and what we take for granted.

With all the talk recently on Planet Eclipse about what is Eclipse and who makes it up, one thing became obvious, we all write about it because we care. Of course some people get paid to work on Eclipse, and some may even get paid to blog about it, but everyone who has written recently puts more than their 40 hours in.

If Eclipse is Steve, Wayne, Alex, Mike M., David, Eugene, etc... then Eclipse really deserves a big thank-you. A thank-you to Wassim who was online at 3am answering my questions, A thank-you to Ed Merks, who gets to work around 6 to continue. Thank-you to Randy who actually took time to look and comment on ideas I had. Thank-you Eclipse!

With an open system that spans the globe, people's words can often be misinterpreted. What one person sees as an example of something that can be improved, someone else sees as a criticism of their work. While there are things we can improve about Eclipse, there is a lot we have done right. I think this gets overlooked sometimes. So next time you are reading a blog about everything wrong with your favorite feature or the criticizing the bug you worked so tirelessly on, remember, people are only writing about it because they care. And if anyone feels I offended them on bug report or blog post, we'll get together (hopefully at EclipseCon), I'll buy you a drink and we can share a few eclipse stories :)


Monday, December 18, 2006

Eclipse is you, but some of you are more important

Bjorn and Doug both talked about how Eclipse is us! Us, not as committers, not as paid employees, not even us as bloggers on planeteclipse.org, but as members of the Eclipse Community. Bjorn, Doug, I agree!

However, I think this line of thought works a little bit better in theory than it does in practice. Without drawing attention to any one component or bug report, I doubt *just anyone* could start using Eclipse and fix bug #X or completely understand the design behind feature #Y. This is not because we are incapable or lazy, but rather we cannot do it the Eclipse Way, the way the *owner* of the component wants it done. That is akin to saying anyone can just change the linux kernel and Linus would be happy to apply the patch. While patches come from contributors, committers are the ones who have to maintain them. I have seen features come to Eclipse as part of a patch, only to have them rejected because they were not something that has perceived value for enough of the community. And this is a judgment call that a single committer can make.

And this only scratches the surface when it comes to frustration. There are bug reports that have been open for years. Some with little or no feedback. Some with patches than can be applied (or at least they could have when the patch was submitted), still waiting in the queue. In this case, someone took the time to report the problem, they spent their energy fixing it instead of complaining about it, and in the end, nothing changed.

I don't want people to get the wrong impression here. I have missed bug reports, I have forgotten to commit patches and I have decided not to fix a bug because it doesn't fit in the overall design of a component. Nobody's perfect and sometimes we need a little reminder, but for some of the more mature projects at eclipse.org, you have to be well respected even to get a response.

Monday, December 11, 2006

Java 6.0!

Sun has officially released Java 6.0! There are still several organizations that are reluctant to move to Java 5. I wonder if they will move there now that Java 5 is officially *old technology* :).

Wednesday, November 29, 2006

EMF Newsgroup, WOW!

I have been working with several Eclipse projects throughout my PhD. I spend most days working with GEF, EMF, Mylar and SWT, but I have also spend a considerable amount of time working with RCP, GMT, GMF, EMFT and of course JDT and the PDE. Each of these communities have some remarkable people, able and willing to answer all my stupid questions.

The other day I posted a question to the EMF newsgroup, and to kill some time I started browsing previous posts. I quickly noticed something: Almost every post on the newsgroup had a response. Of course the responses may be "This is an inappropriate place to ask that question", or "That question has been answered several times before", but someone (mostly Ed Merks) took the time to answer each an every question (baring a few exceptions < 20). I mean no disrespect to any of the other projects. I understand how hard it is to answer everyones request (especially when people show little respect in their post). Also, many new users tend to ask the same question repeatedly. But for the EMF team to take the time to address every user, some recognition should be thrown their way.

A while back, I listened to an EclipseZone podcast; an interview with EMF's Ed Merks. The interview kept returning to the same point, the lack of understanding people have of EMF. I don't think very many people understand the true power of this great technology. For anyone developing data centric applications (that is any application with a data model), you really should consider EMF. Between EMF's documentation, tutorials, and of course their newsgroup, anyone should be able to come up to speed rather quickly.

Thursday, August 24, 2006

Swing, A Native Widget?

I like SWT. I really like SWT!!! I am completely bought into the entire "Native look and feel". I like my Java applications to look like all my other GTK+ applications. I like my themes, I like my fonts, I like my colours.

I have been advocating this for a few years now, but every now and then I stumble upon a non-believer. Some people think that Java applications should look different. Since Java is running on its own VM, I have heard arguments that SWT does not look native! Native means that it should look like Java because the Java VM is the system it is running on.

Ok, maybe there is some validity here. Maybe we want the napkin look and feel for a fun looking Image Browser. SWTSwing gives us this by considering Swing A native widget that SWT wraps. In the same way SWT wraps GTK+, Motif, Win32, etc... so everyone who uses these platforms are happy. Now SWTSwing wraps Swing.

Now I can continue advocating SWT, but if I really want it to look like a Java App, it can!

Tuesday, August 15, 2006

SWT-- In podcast form

The latest Java Posse Podcast (http://javaposse.com) (episode #75) is an interview with Steve Northover (http://inside-swt.blogspot.com/) of the SWT team. This is a very worthwhile interview to listen too. There in nothing new or groundbreaking about SWT announced, but Steve gives some very practical advice about software development and GUI toolkits.

As well, anyone who thinks there is an SWT vs. Swing war going on should really hear what Steve has to say.

Saturday, July 22, 2006

Can we learn anything new from Swing?

I have done something that all developers should be cautious of; I found one technology I really liked and settled without tracking the competition. The technology I am referring to is SWT! A few years ago I stumbled upon SWT and I haven't looked back since. SWT was faster than Swing, felt better than Swing and of course, my Java apps finally stopped looking like "Java Apps". For years I was happy, I told everyone how much better SWT was than Swing, and I wondered why the whole world hadn't switched over.

Recently I started listening to a few of the Java Posse's Podcasts. The Podcast consists of 4 guys talking about New and Noteworthy things regarding Java. They don't seem to have much experience with Eclipse, although their general Java knowledge seems pretty good. N.B: They are definitely Swing Guys! After listening to their Podcast about Swing Labs I thought I should check it out. It looks like Swing has come a long way in the past 4 years, and the Swing developers credit some of the success to the arrival of SWT. They have claimed that SWT gave them a kick in the rear. They even claim in the SWT vs. Swing battle, Swing has won... I wouldn't go that far!

I don't understand why anyone would want something that almost looks like "Real Widgets!". That is like saying I like my floor because it "Almost looks like Hardwood!" The quote I enjoy most is, "On Windows, Swing looks like windows, and on Linux it looks like Linux..." Looks like Linux!!! What on earth does that mean? Including myself, we have 4 heavy Linux users in our lab, and we all have different Themes, Colours, and Fonts... What does a Linux Button look like?

But when it comes to Emulated (Non-Native) Widgets, Swing may have stumbled upon something. Swing Labs are a group of developers who are writing "Sexy" Swing apps to show the power of Swing. As they develop these applications, new widgets are componentized and they eventually make their way back into the SDK. I was wondering if something like this would be useful for SWT. I am aware of the Nebula project; however, the widgets here still seem to have a business focus. Also, this project is focused on the creation of widgets, not demonstrating their uses through new “toys”. I am primarily talking about applications and widgets for the average home user.

Don't get me wrong, I think native widgets are very important and most applications should be using these. However, for the next Funky I.M. application, Map Viewer, Media Player, Image Browser, Video Game, etc... Fancy looking, Drop Shadowy, Web 2.0ish User Interfaces can have a huge impact. If you don't believe me, just look at the number of skins people have created for WinAMP / XMMS. I personally don't like the look of iTunes, but many people do. It is this type of customization which is very difficult in SWT and it may be something to consider as we move forward.

Does anyone have any thoughts (without getting into the age old SWT vs. Swing battle).

Wednesday, July 05, 2006

96 Votes and Closing!

Finding technology advice using google can sometimes be a real pain. For example, try using google to search for GTK Performance related links (performance tweaks, performance improvements, etc...). Most of the hits are pre 2004, and it is hard to tell if the advice given (or roadmaps drawn out) are valid anymore.

The same thing holds true for Eclipse Bug#37683 (Address platform-specific UI performance problems). Most of the advice here is out-of-date, and many of the problems reported have been fixed. While the SWT team has done a remarkable job over the past few years fixing performance problems, there are still several "Platform Specific Performance Problems" with SWT (Bug #134760, Bug#51693, among others). Steve Northover has proposed closing this bug, and I completely agree with him! This bug report provides very little value to the SWT user and developer communities. It is too general to use for SWT planning and too out dated for the average user. However, the bug does have 1 very valuable contribution, it is one of the most voted for bugs and it indicates that platform specific performance problems are important to the Eclipse community. If you are interested in SWT performance, please voice your opinions about this bug report in bugzilla!

I think comment #211 is an excellent idea. Each release the SWT team could create a bug report that we could use to track performance related issues for that release. Concrete bugs that are currently being investigated could be linked to this report. This would not only give the user community a chance to pitch in on current development efforts, but it would also give us a chance to share up-to-date information regarding performance tips with one anther. For example, I just recently discovered how much Xinerama hurts performance when it is enabled for dual monitor support. Now this may be common knowledge to most people out there, but I bet there is at least 1 other Linux user who did not know this, and it would be great to have an updated performance forum to share this information.

It might even be a good idea to distill the most relevant performance advice and post it to a page on the Eclipse Wiki.

Friday, May 26, 2006

Why I Love Eclipse

Let me tell you a story:

A few months ago I was concerned about a performance problem in my GEF application running under Linux. I spend most of my time using Linux, and it wasn't until I tried the application under windows that I noticed just how slow it was. I began to try and track down the problem and after a while I had dropped GEF and was simply drawing shapes to a canvas. I wrote a small profile tool for drawing filled shapes. Now all I had to do was measure the difference between Windows and Linux.

I booted a Windows box and went to download Eclipse. Internet explorer crashed. I swore! Just then nice little dialog box appeared asking me for some information. I filled it out and sent it off. After a little more fiddling around I finally got Eclipse installed and I ran my profiler. What did I find? This particular example ran about 10x faster on a much older Windows box! I Swore! No little dialog box appeared so I posted a note to the SWT newsgroup outlining what I did, just to make sure it made sense. Then I went home. (This was late on a Friday).

By Sunday night I was angry. No answer from Eclipse, No answer from Microsoft. I sent them the form on the same day! (Maybe I should have listened to my wife and not worked on the weekend. :))

By the time I awoke Monday morning (PST Time, late for all you EST people) there was a respond to my post on the SWT newsgroup. I followed up with a few more notes and by noon a bug was opened, I was cc'’d on it, my profiler was attached, and some suggestion of what to do was proposed. Hum… I should check my e-mail, maybe Microsoft, who has a lot more money than this, has followed up… nope!

Now, less than 1 business day after I posted a problem, my concern had been acknowledged and some suggestions proposed. Neither the Eclipse problem nor the Windows problem has been fixed, but guess which organization I am much happier with? I understand that we are in the endgame and exactly what this means and I understand how I can help contribute to fixing this problem. It is this community support, a high level of respect, and the openness by which Eclipse operates that has convinced me that this is the right model for software development.

Almost every question I ask on the Eclipse newsgroups has been answered (and *yes* I have asked some pretty stupid questions). I just wanted to use this post to say thank-you to all the contributors, not just for building Eclipse, but for supporting and helping out all the users!

By the way, I still haven'’t heard back from Microsoft!

Friday, April 14, 2006

3.2 Endgame

I'm not sure how everyone else in the community tracks these things! There is probably a announce list that I should subscribe to; but for those of you like me, who are not on Eclipse Announcement lists, the 3.2 endgame has begun. (See Here)

What does this mean? It means summer must be almost here because Eclipse 3.2 is almost ready for release. Eclipse 3.2 is into its final stages and you can check-out the latest and greatest features by downloading the Release Candidates. I won't link to any here because you should go through and select a proper mirror :)

Along with the Eclipse 3.2 release, the Eclipse community is planning on releasing 10 Major Eclipse projects simultaneously. For anyone moving forward with Eclipse based applications this year, and plan on staying up-to-date with the forthcoming stable release, you should be well aware of the Callisto Project!

Monday, April 10, 2006

Young Users ~= First User

Two blogs on the 8th of April complement each other nicely. Andre blogged about the importance of first impressions, and how perspectives can often confuse users (First Impressions). Right before this, Wassim talked about how we should be looking to attract a younger audience (Younger Audience).

I am currently spending part of my time teaching first year computer science at the University of Victoria, and some of my students are using Eclipse. I use it during lecture to show code examples, step through code, etc... I even supply the assignments as projects that can be directly imported into the workbench. Students are not required to use Eclipse, and sadly, most of them don't. We are currently running some studies to see what IDEs they use and why, but confusion is one reason that drives students away from Eclipse. Changing perspectives, an overly complicated debugger (for first year students) and *millions* of menu items are some of the reasons students were weary of our favorite development environment.

Because of this, some researchers I work with started to develop a simplified IDE built on Eclipse targeted directly at First Year Students (Gild). Features include, No Auto Complete (yes, I said No Auto Complete, would you give a calculator to a grade 1 when trying to teach them how to add?), a single perspective for everything (debugging, coding, etc...), a clear separation between Build and Run, simplified menus, and many more... The tool is still a research prototype, but hopefully it helps slowly introduce students to the wonderful world of Eclipse, without over complicating things.

Wednesday, March 22, 2006

Hello, World

I guess that title is not that original, but I would like to introduce myself.

I am a PhD student in B.C. Canada studying Information Visualization and Program Understanding. I am also interested in Model Driven Development and I am using these techniques to design and generate visualization for complex information spaces. I did a Master's and an Undergrad at the University of Waterloo in Ontario. I have also studied Reverse Engineering and I have an interest in language design and compiler construction.

I work with Eclipse pretty heavily. I run the GTK version of Eclipse on Debian and usually keep up with the latest milestone releases I hope to apply many of ideas to Eclipse. I currently have hacked or worked with the following Eclipse Technologies.
GEF/Draw2D, EMF, SWT, Workbench, Mylar, ATL, JDT, RCP, BIRT,
I have also used (but not extended or modified any code for)
VE, TPTP, WTP, GMF

I am also working on my own project called Zest. Zest is a set of information visualization components for Eclipse. Zest follows the same architecture as JFace and allows developers to quickly create graphical visualizations without any graphical code. Developers need only provide their content providers and we handle the rendering. This project is still very very beta, but we are getting there.

Other than that, I am really enjoying the West Coast! I enjoying camping, hiking, biking, running, and canoeing. I am teaching first year CS which is a treat. I really enjoy helping students understand complicated problems. While we may think that many of these things (trees, recursion, polymorphism, etc..) are easy, these students remind me of how so many people struggled with these concepts!

- Ian

Planet Eclipse Gone Crazy!!!

Boy have things changed on planet eclipse in a hurry. There is usually action (6 posts a day or so), but right now it seems we are getting 6 posts an hour! As one poster put it, planet eclipse on steriods. All the fuss is because of EclipseCon, the annual conference on Eclipse and Eclipse Technologies. I attended EclipseCon last year, and it was one of the best conferences I have ever been too. Due to teaching requirements and funding (I am a grad student teach my first course ever) I was not able to make it this year. I want to say *thanks* to all the planet eclipse bloggers who have kept me informed about the commings and goings at EclipseCon!