我想在Eclipse中创建一个Project-Creating向导。创建的项目什么都不包含 除了几个文件夹。问题是如何编写函数“doFinish()”和函数“performFinish()”。
答案 0 :(得分:1)
您可以使用以下内容创建项目:
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject project = workspace.getRoot().getProject(name);
IProjectDescription projectDesc = workspace.newProjectDescription(name);
projectDesc.setLocation(null); // Use default location
// TODO add any natures, builders, ... required to the project description
project.create(projectDesc, progress monitor);
project.open(progress monitor);
// TODO create any folders and files you want