Karsten's Blog

September 2, 2010

Minimal Run Configuration for GMF Diagram Testing

Filed under: GMF — Tags: , , — kthoms @ 9:05 AM

I’m currently on developing a GMF editor again and so I have to restart a runtime Eclipse instance very often. To reduce the rountrip times I have set up a rather minimal Run Configuration. These are the steps to create it:

  1. Create a new Run Configuration Run -> Run Configurations… -> Eclipse Application
  2. On the Main tab select Program to Run -> Run an application -> org.eclipse.ui.ide.workbench
  3. Switch to tab Plug-ins and select Launch with -> plug-ins selected below only
  4. Press the button Deselect All
  5. Open the Workspace tree node and select the plugins that should be tested. In my case these are 3 plugins (models, diagram, edit plugin)
  6. Deselect the checkbox “Include optional dependencies when computing required plug-ins”
  7. Press the button Add Required Plug-ins
  8. Select the plugin org.eclipse.ui.ide.application and press Add Required Plug-ins again

After this I have just 129 plugins selected (my target platform contains 1396, my Eclipse IDE even far more), so I could reduce the amount of plugins for testing my diagram plugin to less than 10%!

The configuration could even be more minimal. Unfortunately the plugins org.eclipse.team.core and org.eclipse.team.ui are in this configuration and could not be removed, since they are required plug-ins for org.eclipse.ltk.ui.refactoring. If the team dependencies were optional for this plugin this would be resolved. There is Bug#281223 open dealing this issue.

I experienced problems starting the org.eclipse.ui.forms plugin, resulting in this stack trace:

The activator org.eclipse.ui.internal.forms.FormsPlugin for bundle org.eclipse.ui.forms is invalid
caused by: java.lang.NoClassDefFoundError: org/eclipse/ui/plugin/AbstractUIPlugin

Fortunately I found this posting. I removed the o.e.u.forms plugin, started the run configuration (failing of course), added the plugin again to the run config and then my problem was gone.

The Silver is the New Black Theme Blog at WordPress.com.


Get every new post delivered to your Inbox.

Join 375 other followers