Reputation: 8183
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 ?
Upvotes: 4
Views: 721
Reputation: 14769
org.eclipse.ui.newWizards
to create the wizardorg.eclipse.swt.widgets.DirectoryDialog
to let the user select a directory${name}
java.io.*
to copy the files to the specified directory (or use org.eclipse.core.resources
if you want to copy to the workspace)org.eclipse.ui.perspectiveExtensions
with newWizardShortcut
to add the new wizard to the perspective you want to extendUpvotes: 3