O'Reilly logo

Eclipse 4 Plug-in Development by Example Beginner's Guide by Dr. Alex Blewitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating a part

Having created a sample application, the next step is to create a view, known as a part in E4. Parts are the generic name for views, editors, and other grouping components in an E4 application. Unlike views in Eclipse 3, the view class doesn't have to have any references to the Eclipse APIs. This makes it particularly easy to build and test in isolation.

  1. Open the plugin.xml file of the com.packtpub.e4.application project, and go to the Dependencies tab. Add a dependency to the org.eclipse.ui.di bundle, if it's not already added.
  2. Create a new class called Hello in the com.packtpub.e4.application.parts package.
  3. Add a field called label of type Label.
  4. Add a create() method, annotated with @PostConstruct that instantiates ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required