Twitter github

Posts Tagged with “rcp”

Eclipse RCP Book 2.0

I thought I’d never see the day but as Jeff McAffer mentioned earlier today, the latest edition of the RCP book is done and headed to the presses. Sorry for the delay, it should be on the shelves in the next couple weeks.

The book covers the Eclipse Galileo release (3.5.2 in particular). A lot has changed since the Eclipse 3.1 release so we did our best to cover new topics such as p2 and Databinding. An important focus of the book was to update the code and make sure we did a good job covering p2 as that was one of the major changes to RCP over the years. In the end, we hope everyone appreciates the update, it’s hard to please everyone but I think the community will benefit on the whole from some fresh content. One of the challenges in open source projects is quality documentation and books definitely help.

On a side note, it took us awhile to choose a cover image.

What do you think the cover symbolizes :)?

Eclipse and Content Type Definitions

I came across a bug in PDE recently regarding content types.

For example, let’s pretend you had a xml file like this:

<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" 
    name="Command Provider for Dictionary Service">
   <implementation class="org.eclipse.example.ds.ServiceComponent"/>
   <service>
      <provide interface="org.eclipse.osgi.framework.console.CommandProvider"/>
   </service>
   <reference 
      bind="setDictionary" 
      cardinality="1..1" 
      interface="org.eclipse.example.ds.DictionaryService" 
      name="Dictionary" 
      policy="static" 
      unbind="unsetDictionary"/>
</scr:component>

And this content type extension definition:

<extension
         point="org.eclipse.core.contenttype.contentTypes">
      <content-type
            base-type="org.eclipse.core.runtime.xml"
            file-extensions="xml"
            id="org.eclipse.pde.ds.core.content-type"
            name="%content-type.name"
            priority="high">
         <describer
               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
            <parameter
                  name="element"
                  value="component">
            </parameter>
         </describer>
      </content-type>
</extension>

Looks ok, right? The content type should be associated with files that start with the component tag. Cool! Well, the problem is since Eclipse is open for contribution, someone else can come along and define a “component” format and than you have the problem of your editor associations being messed up. Many bad things can happen.

<?xml version="1.0" encoding="UTF-8"?>
<component name="stuff">
    <...>
</component>

The fix is to have my content type definition scoped by namespace. This is trivial since XMLRootElementContentDescriber2 supports namespaces.

<describer
     class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
     <parameter
             name="element"
             value="{http://www.osgi.org/xmlns/scr/v1.1.0}component">
     </parameter>
 </describer>

You learn something new everyday.

Full Screen your RCP Applications

I like discovering things I didn’t know existed. I feel like that ape from space odyssey today:

I had a colleague ping me today and ask how he could full-screen his RCP-based application. I recall there being a Eclipse Google SOC project on this topic so I pointed him there. To my delight, the project was a success (good job Benny!) and has already found its way into the SDK for the 3.4 version of Eclipse. For an example, I patched my favorite RCP Browser Example to allow full-screen goodness:

The only issue left with the fullscreen functionality is proper workbench integration and that is being tracked with this bug. I’m sure the Platform UI team would love help with the bug if you have some cycles to spare for the upcoming Eclipse BugDay.

MyTourbook Facelift

For those RCP and cyclist enthusiasts out there, the MyTourbook application I blogged about a few months ago got some updates. There’s an option for imperial measurements (for us poor Americans), support for new devices like my Garmin ForeRunner and mapping capabilities. The mapping capabilities are very cool. I didn’t know of a project called Geoclipse that allows you to add mapping capabilities to your RCP applications:

The story about how the primary author of MyTourbook added the mapping capabilities is neat and shows an aspect I like about the Eclipse ecosystem. To quote him,

…After researching the Internet I found the geoclipse project https://geoclipse.svn.sourceforge.net/svnroot/geoclipse which does exacly what I wanted. With a few clicks by adding the geoclipse plugins to my configuration and starting the application, the map was displayed, after additional 2 hours of work the tours are also displayed in the map. I think this shows how powerful the Eclipse platform is to plug components together

MyTourbook

Before leaving for my brief peacock-filled Cancun vacation, I really wanted to try out an RCP application. I didn’t have the chance, but now that I’m back, let’s give it a try.

What application was it?

MyTourbook is a small RCP application that allows you to work with various exercise computers like the Garmin Forerunner series. The software currently out there for these types of devices is generally lacking major functionality (like running on multiple platforms) and feels like it was written by a team of crafty monkies banging keyboards to produce code.

To my initial dismay, the website was all in German but that didn’t stop me from trying the application out. I gave it a test-spin using some data from the recent LiveStrong Challenge I completed:

I guess everything looks good besides me having a 0bpm heart rate for the whole ride 🙂

I hope we see more of these niche applications in the future based on RCP and companies like Garmin take notice that one guy in Germany can pretty much outdo their software development shop. Maybe instead of spending most of their time coming up with a Mac port for their current release, Garmin could spend more time innovating on cool features 🙂

Lotus Symphony

Today, Lotus announced that it is giving away its productivity tools for free, branded as Lotus Symphony (currently out in beta form).

What’s neat about this from an Eclipse perspective? Well first off, Lotus Symphony is an RCP application (technically based on Lotus Expeditor). Another interesting tidbit is the possibility of extending the editors using well-known Eclipse semantics like extensions and extension points.

In the end, it’s an interesting use of Eclipse in my opinion.

Simple GEF Example

I just noticed Anthony Hunter from the GEF/GMF team posted a simple GEF 3.3 example. This should be helpful for people looking at an updated example (it also demonstrates how to use the same code in an RCP application).