User Tools

Site Tools


Dave Orme muses about agile and functional programming.

My current work emphasizes SOA applications using Scala, Kubernetes, and AWS with a React-based SPA front-end. I'm also interested in progressive web applications and developer tools.


Scala, Clojure, and FP


The Cloud

Data-First Development

Older work

Coconut Palm Software home

Donate Bitcoin:



Kubernetes, Docker, Streaming Data, Spark, Scala, Clojure, OSGi, Karaf, GCP, AWS, SQL


Everything I say here is my own opinion and not necessarily that of my employer.


Eclipse Editors for Arbitrary Types

Sometimes you can't use an Eclipse view to edit something in an RCP application; there are just times you need to be able to open multiple instances of your editor. Or maybe you need your editable thing to be able to interoperate with Eclipse's resources framework. For example, suppose you're implementing a web browser plug-in for Eclipse. You definitely would like the user to be able to open multiple web browser tabs. But how would you actually code this up?

On EclipsePowered, Paul Moore offers the following suggestion::

    Setting it up

       1. Define an IEditorInput class
          This is used to pass information to the editor about what its supposed
          to be //editing// (a file name, a web page,…)
       2. Define an EditorPart class. This is like a view but the main
          difference is that it has an init method that takes as its second
          param an IEditorInput, this is your #1 object and it tells you what
          you are suppsoed to be editing
       3. Put the editor in the plugin manifest in the
          org.eclipse.ui.editors extension point

    Now to use it

       1. Create an instance of your IEditorInput
       2. Call IWorkBenchPage.openEditor

          Pass in the editor input object you just made and the full id of the

    Your EditorPart will get created and its init method will be
    called. Then the createPartControl will be run (just like a view).


blog/eclipse_editors_for_arbitrary_types.txt · Last modified: 2014/10/17 22:08 (external edit)