Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Efxclipse/Tutorials/Tutorial2

< Efxclipse‎ | Tutorials
Revision as of 08:05, 26 July 2013 by Tom.schindl.bestsolution.at (Talk | contribs) (Create an Eclipse ViewPart)

Create an Eclipse ViewPart

JavaFX allows you to embed JavaFX scenes into SWT UIs using the FXCanvas class. The following tutorial will guide you through the creation of a JavaFX-enabled ViewPart.

  1. File > New > Project ...
  2. Select "Plug-in Project" and click the "Next" button.
  3. Enter a project name and click the "Next" button.
  4. Make sure that "This plug-in will make contributions to the UI" is checked and deselect the RCP creation. Click "Next".
  5. Select the "JavaFX Eclipse 3.x ViewPart" template and click "Next".
  6. Keep the default settings and click "Finish".
  7. The result of the wizard is a new OSGi bundle with your ViewPart class.
  8. Implement your view by adding some JavaFX code to your ViewPart class.
  9. Launch an "inner Eclipse" by bringing up the context menu on your project and select Run As > Eclipse Application
  10. In the running application, bring up Quick Access (Ctrl+3) and enter "My Fx View". Select the presented choice to open your view.
  11. A view with your JavaFX content will be shown at the bottom.

Back to the top