Time for action – updating to e4view

The e4view extension point allows a view to be loaded into an Eclipse 4.x application without the need of a specific superclass. This allows existing Eclipse 3.x views to be upgraded to an Eclipse 4.x view as follows.

  1. Open the SampleView class and remove the extends ViewPart superclass definition. This will introduce some errors in the code, which will be fixed shortly.
  2. Add a @PostConstruct annotation to the createPartControl method. Use Cmd + Shift + O on macOS or Ctrl + Shift + O on other platforms to automatically add the import javax.annotation.PostConstruct statement.
  3. Add a @Focus annotation to the setFocus method. This time, the automatic import won't work, but a quick fix will suggest adding the dependency. ...

Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.