Twitter github

Posts Tagged with “eclipse”

New PDE Members

Now that feature freeze is in full gear for the platform, I can catch up on some administrative duties. First and foremost, we have some new PDE proper members to talk about.

Curtis Windatt from the Debug team has become a PDE committer recently:

Everyone should give Curtis a warm welcome, he has contributed a lot to the 3.4 release mainly in the areas of source bundles and p2/pde integration. Furthermore, Curtis is a second dan black belt in Hoshinkido Hapkido and is rumored to be a stunt double for McLovin 🙂

Rafael Oliveira joins the PDE team as a contributor from the Google Summer of Code 2008 program. Rafael is doing excellent work in bringing my dream of a OSGi Declarative Services editor to reality.

We’re making a lot of progress on the editor. I have been fighting with icons and polish work for the editor and that’s taking longer than I want. Rafael and I also need to start adding fancy validation to the editor. Expect a “beta” towards the end of this month / early next month. This will hopefully allow people to provide feedback and shape the editor.

Bartosz Michalik also hails from the GSOC program this year and will be working on some Equinox Transforms related tooling.


Jacek Pospychala
has also joined the PDE Incubator team recently and is going to work on some cool PDE skunkworks projects 🙂

Expect to see good things from these guys in the future 🙂

SWT / Qt?

I just noticed this post on the newsgroup. It seems EPL 1.0 is now included as an exception for Qt. IANAL, but does that mean it’s possible to do some SWT / Qt love without fearing the wrath of lawyers?

Eclipse Bloggers at JavaOne?

Are there any Eclipse bloggers attending JavaOne? If so, can you please blog about what’s going on? I can only hear rumors like “anything JavaFX touches breaks.” It’s kind of like the midas touch, but instead of turning things into gold, JavaFX breaks demos! I want to hear the inside scoop instead of rumors through the grapevine 🙂

Also, for those there in San Francisco, here’s a tip. My favorite pizza/brewery joint is located in San Francisco and its called Pizza Orgasmica. They are awesome, plus, who can say no to a restaurant whose motto is “we never fake it.”

Tic-Tac-Toe Everywhere

Wayne blogged about something really important this morning. The new Eclipse Runtime project is going to be cool because I see it bringing down traditional walls around development:

What do I mean by this? As an example, if you look at three types of developers: web, desktop and embedded… these were three completely different types of jobs that required completely different skills. So if your company was working on a project in any of these fields, you had to hire in these particular fields of expertise. These walls are starting to come down with the spread of Java, Eclipse and OSGi. Let me give you a picture of what I mean through a silly example I wrote awhile ago:

Tic-Tac-Toe on the Desktop (RCP):

Tic-Tac-Toe on the Web (RAP):

Tic-Tac-Toe on the Embedded Device (eRCP) via Emulator:

What are you looking at here? Basically the same application (~90% shared code) running on three different environments:

  • The Desktop via RCP
  • The Web Browser via the RAP project
  • The Embedded Device via the eRCP project

Since people reading my blog are mostly interested in code, here are the 5 plug-ins that comprise this work:

  • Core Model Code (i.e., can run everywhere)
    • org.eclipse.examples.ttt.core (~300 LOC)
    • org.eclipse.examples.ttt.core.tests (~100 LOC)
  • Core UI Code
    • org.eclipse.examples.ttt.common.ui (~150 LOC)
  • Embedded Specific Code
    • org.eclipse.examples.ttt.ercp.ui (~20 LOC)
  • Browser Specific Code
    • org.eclipse.examples.ttt.rap.ui (~20 LOC)

As you can see, the majority of the core logic is contained in the core plug-in that drives the TTT board. This core logic is used by all the other plug-ins. The common.ui plug-in defines the basic view, buttons and other reusable UI pieces. The ercp.ui and rap.ui plug-ins define the specific extensions needed to get the client working within the respective environments. These are usually really simple things like defining a simple extension point so eRCP or RAP is aware of your existence. In this extension you would simply build your UI reusing the components in the common.ui plug-in. Cool huh? The possibilities of saving time on development especially if your project targets multiple environments are awesome. This has been the main pitch of the RAP project for awhile… to “single-source” your RCP / RAP applications from a common source.

I plan on contributing this code to the Eclipse examples project once Wayne gets things moving.

How about we work together to bring down some of these “walls” and enable more symmetry amongst the different types of development we do.

Why paint the workbench?

I had a colleague of mine ping me this morning and ask me why I was making the Eclipse workbench look like a pride parade march? Let’s analyze this picture (thanks Simon) for issues:

  1. labels for padding? Is that really the best solution here
  2. there’s some pixel waste here
  3. some extra whitespace lying around
  4. not sure what that is exactly
  5. 21 pixels for spacing is excessive, how about 5?

See, colors can help. Also, I didn’t meant to pick on the JDT team here, this is just one example of many you can find in the workbench. Furthermore, each UI can have its own style, so the choices of the developers aren’t necessarily wrong.

Painting the Workbench

If you’re a UI developer in Eclipse, you probably come across one of these issues:

  • fighting layouts
  • fidgeting with margins
  • pushing pixels
  • etc…

You probably also came up with some hack to add borders to composites to help with these issues. Well, at least I did.

Why am I bringing this up? Well a few days ago, Simon Archer and I were discussing how new GridLayout() can be bad since it sets default margins and how it can be difficult for people to realize this amongst other layout issues. To ease some of these issues and stop the madness of duplicating debugging utilities, Simon and I decided to start a new work area in PDE called Picasso. The purpose of the Picasso work area is to provide a utility to help UI debugging. Picasso does this by painting the workbench in funny ways to aid debugging 🙂

The screenshot above shows Picasso painting the preferences page’s composites. Picasso also allows you to hover over widgets and provide some raw debug information.

How do I use Picasso? Simply grab the code from the PDE Incubator and launch some runtime workbenches. Or you can build yourself a version of the Picasso plug-in and drop it in your application to see what’s going on.

Note, Simon and I are just providing Picasso as a utility for people to use, we don’t have crazy plans on maintaining it unless the community steps forward with patches and ideas. It’s just a work area that maybe useful to some.

Enjoy.

Feature Complete!

Eclipse 3.4M7 is out the door making 3.4 pretty much feature complete!

Check out the new and noteworthy.

A lot of thanks is owed to the work done by the Platform Releng team to make this happen. I hear they like chocolate 🙂

A special thank you should also be sent to the Equinox p2 team who spent countless hours above their normal work hours to make sure we have a new update story for 3.4!

Thanks to everyone!

Open Screen

It looks like Adobe is getting more “open” with the new Open Screen project… it looks like everyone wants to be THE application platform.

Oh well, I expect to see SWF end up in stranger places… which means more access to Tower Defense games from any device or desktop 🙂

Funny T-Shirts

At Eclipse Forum Europe, there was a company exhibiting called SpreadShirt and they had some funny shirts. I almost forgot about this until I was reviewing pictures from my crappy 1.3 megapixel blackberry camera today and came across this gem:

I had to get one! It’s good to have that geeky sense of humor sometimes 🙂

An Eclipse-based Facebook Application (Part 2)

Since we have a plug-in available to exercise the Facebook API (see Part 1), the next step is to create a ‘org.eclipse.facebook.ui’ plug-in that will exercise that API. What I generally do when testing some new code in Eclipse is to create a simple view. In this case, I’ll create a stub view with a hyperlink to launch some Facebook login wizard (along with some other test hyperlinks):

Now that I have the basic code infrastructure in place, let’s get our Web 2.0 on by using that Facebook API! In Eclipse land, to take advantage of another plug-ins’ classes, you need to express a dependency on it. So in order for me to use the Facebook API plug-in I created in Part 1, we need to depend on it. We can do this in the plug-in manifest editor by going to the dependencies page and adding a dependency for the ‘com.facebook.api’ plug-in:

After reading the Facebook API in detail… it seems the API for logging in is straightforward albeit a bit tricky for a deskop-based application. In essence, you have to point to a special URL given to you by Facebook to login… once a user logs in, you need to capture a token that you use to create a REST client for Facebook API access. Ok, translating this into Eclipse terms, I figure all I need is a popup dialog and an SWT Browser widget with a clever listener. So here it is:

All this code does is create an embedded browser within a popup dialog and fishes for a particular authentication token from Facebook. If it finds the particular token, it will create a session with Facebook, if not, it will keep the dialog open until the user properly authenticates.

I was initially having trouble logging in to the service because I was stupid in how I was parsing the authentication token. I didn’t solve the problem until I enabled some tracing information. One interesting way to allow tracing for your Eclipse-based applications is to use the Platform debug facilities.

The basic gist is to create a .options file in the root of your plug-in. Here is how the ‘org.eclipse.osgi’ plug-in .options file looks like:

Pretty simple right…? Now, when you go to launch Eclipse applications, there is a tracing tab that allows you to tweak this options on and off to see what type of tracing information you would like:

I basically enabled this tracing ability within the facebook plug-in:

I then peaked at the console after I logged into see some tracing output:

So there, now I have a simple little framework to enable configurable tracing within my Eclipse-based applications.

That’s it for Part 2. In Part 3, we will cover things like separating core code from user interface code, Eclipse Forms and amongst whatever else pops up in my head.

Lessons Learned

  • Start simple and iterate as you make progress
  • A simple view provides a good way to test code
  • Trace early, trace often
  • Platform debug tracing provides a simple way to enable configurable development time debugging

Thanks for listening.