更新时间:2023-11-30 14:34:16
您创建一个项目,例如:
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject project = workspace.getRoot()。getProject(name);
IProjectDescription projectDesc = workspace.newProjectDescription(name);
projectDesc.setLocation(null); //使用默认位置
// TODO添加任何性质,构建者,...需要项目描述
project.create(projectDesc,progress monitor);
project.open(progress monitor);
// TODO创建任何您想要的文件夹和文件
I want to create a Project-Creating wizard in Eclipse.And the created project contains nothing except several folders.The question is how to write function "doFinish()" and function "performFinish()".
You create a project with something like:
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