STS - Grails 透视图被破坏。看不到服务
我正在使用 STS 进行 grails 开发,但我不知道我做了什么(很可能错误地将文件夹拖到了某个地方),但现在我无法从角度看到我的服务。它们确实存在于 grails-app/services 下,但我想有些东西不再指向那里了?
是的,我尝试重新启动 STS,将项目重新加载到 STS。
知道如何解决这个问题吗?
编辑:
您现在看到的是透视图,没有显示任何服务。
非常感谢, 比尔赛
I am using STS for grails development and i don't know what I did, (most probably dragged a folder somewhere by mistake) but now I can't see my services in the perspective. They do exists under grails-app/services but I guess something is not pointing there anymore?
and yes I tried restarting STS, reloading the project to STS.
Any idea on how I can fix this?
EDIT:
You are right here is the perspective view with no services shown.
Thanks a lot,
Bilsay
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以通过添加以下两行来修改文件 .classpath:
you can modify your file .classpath by adding these two lines :
我以前没见过这个问题。如果上面的答案没有帮助,我会推荐以下内容;
编辑
我能够重现与您的问题类似的问题。我认为发生的情况是您的服务文件夹以某种方式从 Eclipse 类路径中删除了。您可以转到包资源管理器。找到 grails-app/services 文件夹。右键->构建路径->添加到构建路径。然后,它应该出现在项目资源管理器中。
I have not seen this problem before. If the answer above does not help, I would recommend the following;
EDIT
I was able to reproduce something similar to your problem. I think what happened is that your service folder was somehow removed from the Eclipse classpath. You can go to the package explorer. Find the grails-app/services folder. Right-click -> Build path -> Add to build path. Then, it should appear in the project explorer.
尝试找到窗口->显示视图->从菜单栏中选择 Project Explorer,然后单击 Project Explorer。如果不亲眼所见,很难判断问题出在哪里,但这也许会有所帮助。祝你好运!
用新想法编辑:
另一种可能性:通过搜索或在 Windows 上使用“打开资源”(或 CTRL+SHIFT+R)在编辑器中打开服务文件之一。然后,如果您单击项目资源管理器顶部的“与编辑器链接”双向箭头图标,则活动服务文件及其位置应自动在项目资源管理器中突出显示。也许这会给你的 STS 带来一些启发。
Try to find Window -> Show View -> Project Explorer from the menu bar and click on Project Explorer. It's hard to tell what the problem is without seeing it, but maybe that will help. Good luck!
Edited with new idea:
One more possibility: Open one of your service files in the editor, via searching or using "Open Resource" (or CTRL+SHIFT+R) on windows. Then if you click on the "Link with Editor" bidirectional arrow icon at the top of your Project Explorer, the active services file and its location should automatically be highlighted in the Project Explorer. Maybe this will knock some sense into your STS.
从头开始,删除所有eclipse文件
(@参见https://github.com/github/gitignore/blob/ master/Global/Eclipse.gitignore)
运行 grailsintegrate-with--eclipse
并再次导入项目
start again from scratch, delete all the eclipse files
(@see https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore)
run grails integrate-with --eclipse
and import the project in again
一周前我创建的一个新项目也发生了类似的事情。我看不到控制器。我通过转到包资源管理器修复了它。右键单击控制器 ->构建路径->用作源文件夹。安德鲁的上述回答有帮助。
Similar thing had happened to me on a new project I created a week ago. I was not able to see Controllers. I fixed it by going to the package explorer. Right-clicked on controllers -> Build path -> Use as Source Folder. Andrew's answer above helped.