How to use eclipse plugin to create a new wizard for creating a project?

前端 未结 1 760
一整个雨季
一整个雨季 2021-01-03 15:48

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()\" a

相关标签:
1条回答
  • 2021-01-03 16:34

    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
    
    0 讨论(0)
提交回复
热议问题