Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Newbie Eclipse PlugIn Development  RSS feed

Lee Miller
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am just starting out creating my own plug-in for Eclipse. The plug-in I want to develop will allow a user to create a new project from the Eclipse wizard (File->New->Custom Project). The project will be an EJB project, with some additional customization.

So far I have been able to develop the plug-in so that it appears in the wizard, I can enter configuration information and select finish. On finish the plugin generates a Java Project. I can also add my custom package and files to the project, as well as .classpath and .project file.

The bit I can't figure out how to do is add a ".settings" directory and all of the required files. Without this the project is not recognised as an EJB project (ie. missing the facet information). When I create an EJB project using the standard EJB wizard it creates a .settings directory and populates it with four files, "org.eclipse.jdt.core.prefs", "org.eclipse.jst.common.project.facet.core.prefs", "org.eclipse.wst.common.component" and "org.eclipse.wst.common.project.facet.core.xml". I can manually create a ".settings" folder using standard folder creation methods, but as this is an Eclipse specific directory I am assuming there is an API based standard to manage this.

Is there API functionality which will manage this directory and files and populate the contents with defaults, or at least provide me with methods to configure values? Or is it simply a case of creating each file manually? It doesn't feel right to create each file manually, as the files seem quite tightly bound to Eclipse and I am worried how much would need to be re-written when upgrading.

I'd appreciate any help with this. I'm not terribly bright, so some code snippets would be ideal ;o)

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!