Twitter github

Mylar-tastic

That crazy Mik Kersten has provided two (1,2) nice articles about Mylar. If you haven’t used Mylar before, I would look over these articles to see if they can entice you to give Mylar a try. For me, Mylar is like a dirty mistress I hide from co-workers via two Eclipse instances and ALT+TAB. If you work with a lot of Eclipse projects and suffer from memory loss, Mylar is great 😉

By the way, Mylar will have a webinar in two weeks.

Platform UI has been busy…

There is a proposal / some prototyping going on for something called Platform UI Error Handling. The concept here is to be able to provide a way for the end-users to a) see what the error is b) understand what it means within their domain knowledge and c) how they can act on the error (if possible). I think this is a pretty nifty concept… An example would be say an RCP product vendor now has the ability to notify the user of an error in a polite way and possibly have a webpage launch to their support webpage with some details automatically filled in regarding the error.

Eclipse and permission.properties

You learn something new everyday it seems (I’m a dolt). If you have a permission.properties file in a plug-in like detailed in this bug report, Eclipse’s update facilities will take care of changing permission to the proper value. Much better than writing a crazy custom installhandler framework to do this type of stuff 😉 However, it would be nice if there was an extension point that could run commands based on feature lifecycle…


...
<extension point="org.eclipse.update.installhandler.commands">
<configureCommand class="org.eclipse.MyCommand1" />
<installCommand class="org.eclipse.MyCommand2" />
</extension>
...

Commands would probably be really simple with an execute() and undo() type methods (ie., these would be called during the respective install/uninstall or configure/unconfigure stages). I don’t know, what are people’s thoughts? Is this something useful or should we just shelf it as a requirement of the new update story in Eclipse?

On a side note, PDE build also supports setting crazy permissions if you ever come across this issue in your Eclipse endeavours. I’m blogging about this so hopefully search engines pick it up easily in the future so others don’t get called a dolt by fellow colleagues 😉

PDE and Problem Types

I closed 157889 today which dealt with adding support to PDE for fancy categorized problem types (marker support). So now, when you have a zillion errors, it’ll be easier to pinpoint where the pain is coming from 😉

What Eclipse can learn from Firefox…

So, I was bored of doing homage to Michael Porter in terms of his wonderful 5 forces (only 6 more months left of b-school!)… I decided to download some sweet firefox extensions.

Holy, I’m shitening in me shorts! The extension download and installed itself in one click. No update sites, no confusion, no 7 clicks to download something.

I thought, how can we try to replicate some of Firefox’s extension story (probably part of the reason it’s been so successful) in Eclipse? So, what better way to think of ideas than to hack out a quick and dirty prototype.

Our first stop is the cool RCP Browser Example Check it out and add two new dependencies (org.eclipse.update.core and org.eclipse.update.ui).

The next stop is to learn about the cool SWT Browser widget. It has a method that rocks: addLocationListener. Let’s prototype something easy, how about simplifying how we reach update sites?


...
browser.addLocationListener(new LocationAdapter() {
public void changing(LocationEvent event) {
if (event.location.endsWith("site.xml")) {
try {
IUpdateSearchCategory category =
UpdateSearchRequest.createDefaultSiteSearchCategory();
UpdateSearchScope scope = new UpdateSearchScope();
scope.addSearchSite(
event.location, new URL(event.location), new String[] {});
UpdateSearchRequest request =
new UpdateSearchRequest(category, scope);

UpdateJob job = new UpdateJob("My Update Job", request);
InstallWizardOperation operation =
new InstallWizardOperation();
operation.run(Display.getDefault().getActiveShell(), job);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
};
...

This code will popup the update site ui when we reach a site.xml file. See the simplicity and power in this approach?

Now imagine if we can do this for other more important cases…


...
browser.addLocationListener(new LocationAdapter() {
public void changing(LocationEvent event) {
if (event.location.endsWith(".eclipse")) {
// maybe we have downloadable sites or features?
// this should be like firefoxes .xpi extensions
}
if (event.location.startsWith("eclipse://")) {
// our own protocol handler, wooo!
// we can do anything here...
}
};
...

If Eclipse had its own extension (file) like firefox does, we could effectively
pack anything into it. This would take a bit of work though to define what exactly
belongs in the file and the metadata associated with it. I’m sure we could use OSGi’s bundle repository format for this. Or we could have our own protocol handler and do cool things (similar to irc:// or skype://).

In the end, Eclipse is great for developers (including the current update manager). We can do a lot of things with it. It was designed with the developer in mind. However, RCP changed everything. The developer is no longer the only person using Eclipse. Now we have report designers, poor college students leeching things, traders, scientists, etc… If Eclipse expects greater adoption in the RCP space, our users will demand a better update story.

What are people’s thoughts on this situation?

Is Eclipse good enough for you?

In reference to Ian’s post about…

…was the fact that the majority of the audience claimed they looked at the open source code and 30-40% actually modified it…

I would be more curious to learn what percentage of companies out there that ship on top of Eclipse and modify core Eclipse code. What I mean by core Eclipse code, is code that is included in an Eclipse plug-in that you need to modify in order for it to ship for your product. An example would be say you had a dependency on the wonderful CVS plug-in and were waiting for a fix (or enhancement) but it wouldn’t make your ship date so you had to roll your own fixes in. I think this could be used as an interesting metric to see how well Eclipse is responding to community needs.

JET Tip

I had a couple of buddies ask for help recently around JET (I have an article if you need an intro). JET has the ability to load EMF-based models as input, not only XML models. To work with an EMF-based model, you simply need to set the modelLoader in the org.eclipse.jet.transform extension point to org.eclipse.jet.emf and when you’re given an EMF model for input, you can use normal XPath expressions in JET to evaluate the model (‘/’ will evaluate to your resource’s getContents() method).

JET is pretty cool stuff if you’re in the EMF crowd. 🙂

Silly PDE Tricks

Eclipse is a beast to learn. There are so many new things (in so many projects!) that come up with each integration build that it’s hard to keep up with. Here’s my contribution for the week regarding silly Eclipse tricks. Some of you may not know, but if you have a bundle (plug-in) with a version of 1.0.0.qualifier, PDE will automatically replace the qualifier with today’s date on export. This is fairly useful if you are working on something Eclipse-based and like to export your plug-ins and quickly test them on an environment. Well, recently, PDE added the ability to modify this qualifier to anything you want on export (can be useful if you’re working against something that is using something other than the current date as the version):

Silly Students, Programming 1.0 and Ooooooo… jUploader

I had to speak at the University of Texas at Austin recently about Eclipse and gave some Tips & Tricks around the JDT for students who are just starting Java. It’s amazing to see how far ctrl+click, content assist and templates go with students just starting Java. I even had one student come up to me saying he used Notepad exclusively… I thought… sweet, how useless, maybe Microsoft should hire him as an intern. I decided to coin one of those cheezy buzzwords (only way to become famous these days ;p) to refer to his practice, Programming 1.0. I told him to come to the world of Programming 2.0, which is the IDE/Eclipse space. If he really had some cojones, he come to the world of Programming 3.0, which Mylar is a part of (I’ll expand on these concepts in a later posting).

What’s fun about presenting to college students is that conveying the idea that Eclipse isn’t just an IDE is getting easier. It turns out, that college students are a big fan of BitTorrent for various reasons. Well, one of the best “RCP” applications is a BitTorrent client called Azureus that is used widely.

After the presentation was done, I was informed of a new “RCP” application called jUploader. jUploader allows you to work with Flickr (and other similar services) to upload photos. Check out the screenshots!

New SWT Article

I see a new article on Eclipse Corner about some SWT tricks: Custom Drawing Table and Tree Items by Grant Gayed. Looks pretty snazzy, seems as of 3.2 you can custom draw items on Table and Tree widgets.