I want to create an eclipse plugin which appears in the “new” menu like “new class” (for example “new MyStructure”).
The goal of this plugin is to ask a name and a folder where to place the generated content.
The generated content is created by copying an existing standard directory like the following (${dir} represents the selected directory in the wizard and ${name} the name asked in the wizard) :
$dir
- ${name}.java
- css
- Default${name}Style.css
- ${name}Editor.java
- ${name}.config
each of this file is based on an existing file content, something like eclipse code template where I can specify dynamic ${name} and package.
How can I easily done this eclipse plugin ?
org.eclipse.ui.newWizardsto create the wizardorg.eclipse.swt.widgets.DirectoryDialogto let the user select a directory${name}java.io.*to copy the files to the specified directory (or useorg.eclipse.core.resourcesif you want to copy to the workspace)org.eclipse.ui.perspectiveExtensionswithnewWizardShortcutto add the new wizard to the perspective you want to extend