wiki:E4_Migration_Tutorial

Migration to Eclipse 4

Setting Up Eclipse

  • Download Eclipse Mars 4.5
  • Install svn in eclipse
  • Install other required plugins as required (previously documented here)
    • Atleast install Nebula CDateTime Widget from this update site (detailed documentation can be found here)
    • Additionally, you can install GEF + Draw2D + Zest SDK from here

Setting up svn

  • Import all the working projects from the svn

E4 plugins

Some Important plugins

Plugins that you might need need while writing e4 code

  • org.eclipse.e4.core.commands
  • org.eclipse.e4.core.contexts
  • org.eclipse.e4.core.di
  • org.eclipse.e4.core.services
  • org.eclipse.e4.ui.workbench
  • org.eclipse.e4.ui.di
  • org.eclipse.e4.ui.model.workbench
  • org.eclipse.e4.ui.services

E4 Live editor

  • Install Model Spy from this update site
    • this contains some of the commonly required plugins including the live editor plugin
      • "org.eclipse.e4.tools.emf.liveeditor"
  • Add e4 tools plugin to product
    • "org.eclipse.e4.tools"
    • and its dependencies (Add Required Plug-ins)
  • Add live editor plugin to the product file
    • "org.eclipse.e4.tools.emf.liveeditor"
    • and its dependencies (Add Required Plug-ins)
      • "org.eclipse.e4.tools.emf.ui"
      • "org.eclipse.e4.tools.services"
      • "org.eclipse.e4.tools.spy"
      • "org.eclipse.emf.databinding"
      • "org.eclipse.emf.databinding.edit"
      • "org.eclipse.emf.edit"

e4xmi File

An e4xmi file in your plugin (fragment.e4xmi, since Application.e4xmi file has already been created in the core plugin) contributes/defines all ui elements for the application. You can add parts (counterpart of views and editors in eclipse 3.x) and define perspectives comprising of various parts. You define, commands, handlers, menus and other ui components in this file. In short, all the gui handling should be designed using this file. Before proceeding with migration here is a brief overview of some of the common ui elements that are frequently used in the e4xmi file.

Parts and Perspectives

Parts are the ui components that are used to display or edit information in the application. They are analogous to views and editors. Perspective consists of a particular set of parts in a particular arrangement.

Commands and Handlers

Handlers and Commands are defined to perform some actions which are then used in various menu, popup and other events (like double-clicking or a selection event).

Menu and Popup Menu are same as 3.x menu and popup. One can add Handled Menu Item, Direct Menu Item and other such items to these and add a command to it. A command can be used in multiple menu and menu items.

Placeholder and Shared Elements

For adding a Part (Partstack or Area) that is used in multiple perspectives, one can define a part in Shared Element. In each of the perspective, it can then add a Placeholder and add the id of the shared part to it.

Migrating 3.x ui components from plugin.xml to e4

Some of the basic steps to migrate ui components from 3.x plugin.xml to e4 have been explained in this documentation page.

Migrating Eclipse 3.x View(s) to e4 Part

Migrate Views to eclipse e4 Part. Follow this documentation for migrating Eclipse 3.x View to e4 Part.

Migrating Entry Editor to Eclipse 4

Migrate Entry Editors to part descriptors. Follow this documentation for creating part descriptors that are the counterpart of Entry Editor.

Communication between E4 Parts

After migrating editors and views to parts, if you need to communicate between two e4 parts, follow this tutorial page.

Helpful Links for E4 Migration

Read this page

Notes for Future E4 Migration

Read this note

Last modified 3 years ago Last modified on 10/14/2016 09:36:06 PM