搜索使用eclipse IDE为Android的文献中提到的Andr​​oid code布局xml文件布局、文献、文件、IDE

2023-09-07 09:15:38 作者:那年那些事

我使用的Eclipse IDE中。如果我有一个变量或一个类的实例。如果我选择它,做按Ctrl + Shift + G,我能得到所有引用该变量或在工作区中的类的实例。同样,我可以使用任何捷径引用到XML文件在Android code? 可以说,我的布局xml文件app_view.xml。我要寻找的地方该XML被引用了Android code。

I am using eclipse IDE. If I have a variable or an instance of a class. If I select it and do Ctrl+Shift+G, I can get all the references to that variable or the class instance in that workspace. Similarly, can I get references to an xml file in the android code using any short cut? Lets say, I have layout xml file app_view.xml. I need to search the android code where this xml is being referenced.

推荐答案

我不知道任何捷径,但你可以只使用搜索菜单中的项目是否出现的搜索

I don't know of any shortcut, but you could just use the search menu to search in your project for occurrences of

R.layout.your_layout_name

如果您复制( Ctrl + C )在Java文件中的文本 R.layout.your_layout_name ,你可以直接使用搜索=>文字=>项目

If you copy (ctrl + c) in a java file the text R.layout.your_layout_name, you can directly use Search => Text => Project.

或从项目一少优雅的解决方案,暂时删除XML,所以你可以看看你的Java源代码编译错误。

Or a less 'elegant' solution, temporary remove the xml from the project, so that you can look for compile errors in your java sources.