Writing POV-Ray Support for NetBeans X—Conclusion

This is a continuation of the tutorial for building POV-Ray support for NetBeans. If you have not read the first, second, third, fourth, fifth, sixth, seventh, eighth, and ninth parts of this tutorial, you may want to start there.

At this stage, you have completed the application, which should look like this:

Additional steps to take to improve and enhance the application:

  • Test your application. (See the Test Infrastructure Tutorial.)
  • Hide the menus and toolbar buttons that you don't need in your application.
  • Add a Plugin Manager so that users can install new features at runtime.
  • Localize the application.
  • Customize the display text in the title bar.
  • Customize the splash screen, icons, and NetBeans Platform display texts.
  • Create an installer.

Key Points

We now have our POV-Ray rendering application working exactly as we want. During the course of this tutorial, many NetBeans Platform topics have been covered. Here they are listed, per part:

  • Part 1: Application Structure & File Support—Here you learn how to set up a NetBeans Platform application, how to create modules, and how the NetBeans Platform distinguishes between different types of files.
  • Part 2: Project Type Design—Before beginning to code, you spend some time examining the requirements of the application and how you will implement those requirements.
  • Part 3: Implementing a Project Type—Here you learn how the NetBeans Platform is able to recognize a set of folders and files on disk as being POV-Ray projects. By the end of this section, you're able to open POV-Ray projects into your application.
  • Part 4: Providing Project Templates—You install your POV-Ray Project module into NetBeans IDE, so that the IDE is able to recognize POV-Ray projects. You then create some POV-Ray projects and create project template wizards, registering them in the module so that they're available to your users via the New Project dialog.
  • Part 5: Creating an API—Here you create a provider of main files, a rendering service, and a viewing service. You are shown how to encapsulate these interfaces in a separate module, how to load that module on demand, and how to share it with the other two modules in the application. A first usage of one of the APIs is described—the Node of a POV-Ray file will be bold-faced if the main file provider indicates that the Node represents the main file of the project.
  • Part 6: Implementing the API—In this section, you learn how implement the APIs created in the previous part, you add Actions to the Node for setting the main file and for rendering POV-Ray files, and you add some plumbing code for locating the POV-Ray executable.
  • Part 7: Support For Running POV-Ray—For the first time, you actually begin working directly with the POV-Ray executable. By the end of this section, you're able to actually render POV-Ray files and display the rendered images.
  • Part 8: Implementing ViewService and its Actions—An Action for opening images, and rendering them if they don't already exist, is added. You're also introduced to the topic of icon badging, which you use to distinguish between Nodes representing files that have been rendered and those that represent files that haven't been rendered.
  • Part 9: Build Support—You now move away from working with the Node representing POV-Ray files. Instead, you work on the project node and add new project actions, for rendering the main file of the POV-Ray project, for setting the main file if it has not been set, and for closing the project.

Next Steps

Now that you have completed the POV-Ray tutorial, what should you do next?

Appendix: Setting Up POV-Ray

Mac users may find DarwinPorts the easiest way—simply install DarwinPorts and then run sudo port install povray.

Linux and other Unix users should be fine with the downloads available from povray.org. Everything should work out of the box for these users, without any tweaks or post-install configurations. Make sure, however, that the POV-Ray launcher has the correct permissions, otherwise it will not execute. Run it from the command line to check that it executes.

Under Windows, life is slightly more complicated. Take the following steps to set up POV-Ray:

  1. Download the newest stable version of POV-Ray for Windows: http://povray.org/download
  2. Run the downloaded file and install into "C:\POVRay" or some other directory, while making sure that the path has no spaces, even though the installer will prompt you to install in a directory with spaces. For example, change the suggested destination directory to "C:\POVRay", as shown here:

    Note: Do not let the installer install the application into the destination directory "C:\Program Files" or into any of that directory's subfolders.

    Note: Read the above note again.

  3. Open the POV-Ray application. Do the following:
    • Disable I/O restrictions to avoid input and output warnings on each render: Options | Script I/O Restrictions | No Restrictions.

    • To facilitate smooth interoperability with the plugin that you will create, ensure that POV-Ray will exit when rendering completes: Render | On Completion | Exit POV-Ray for Windows.

Note: POV-Ray for Windows cannot process paths with spaces. When you use the application that you will create to create POV-Ray projects, make sure that you create them in directories without spaces in their paths. The name of the project must not have any spaces either.

Project Features

Project Links

About this Project

Platform was started in November 2009, is owned by Antonin Nebuzelsky, and has 149 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close