自定义 Eclipse 项目类型不保存(插件开发)
我一直在关注 本教程 创建我自己的自定义项目类型,并且在大多数情况下它都有效。不幸的是,当逐步执行我的新项目向导时,它不会在“完成”时创建新项目。
我的第一个想法是我错过了这一步:
- 让performFinish()返回true。
但我确实做到了。
public class NewProjectWizard extends Wizard implements INewWizard {
@Override
public boolean performFinish() {
return true;
}
}
没有什么其他事可做。测试环境可以很好地创建其他项目类型 - 例如“Java” - 它们的文件夹正确地在 runtime-EclipseApplication
主文件夹中创建。我尝试使用 Alt+Shift+F1 技巧来查看其他插件的源代码,但看不到关键的步骤是什么。
缺什么?还有其他好的资源涵盖这一点吗?错误日志视图中没有显示任何内容,是否还有其他日志?
I've been following this tutorial to create my own custom project type and for the most part it works. Unfortunately when stepping through the my new project wizard it doesn't create a new project on "Finish".
My first thought was that I had missed this step:
- Have performFinish() return true.
But I definitely have that done.
public class NewProjectWizard extends Wizard implements INewWizard {
@Override
public boolean performFinish() {
return true;
}
}
There isn't much else to do. The test environment can create other project types just fine - like "Java" - their folders are created in runtime-EclipseApplication
home folder correctly. I tried the Alt+Shift+F1 trick to look at other plugins' source and cannot see what the crucial step is.
What is missing? Are there other good resources which cover this? Nothing shows in the Error Log view, is there another log somewhere?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在performFinish() 实现中完成创建项目的实际工作。如果您只想创建一个新项目,也许您想扩展 org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard 而不是普通的“向导”?
You have to do the actual work of creating the project in the performFinish() implementation. If you only seek to create a new Project, maybe you'd like to extend
org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard
instead of the plain "Wizard"?