如何将任务标签限制为 Eclipse 中的当前项目?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/831807/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I limit task tags to current project in Eclipse?
提问by Tilman
Eclipse currently shows the task tags (// TODO
) from all open projects. I would be grateful if anyone could point out the preference, where I could restrict the scope of tasks displayed (e.g. only tasks from current project).
Eclipse 当前显示// TODO
来自所有打开项目的任务标签 ( )。如果有人可以指出偏好,我将不胜感激,我可以在其中限制显示的任务范围(例如,仅来自当前项目的任务)。
回答by Tilman
In Eclipse Helios (3.6) you can configure the scope.
在 Eclipse Helios (3.6) 中,您可以配置范围。
Down arrow at the top right -> Configure Contents:
右上角的向下箭头 -> 配置内容:
Select a configuration on the left (or create a new one) and on the right in the Scope section select "On any element in same project".
在左侧选择一个配置(或创建一个新配置),并在右侧的“范围”部分中选择“在同一项目中的任何元素上”。
回答by RayOK
There should be a down arrow in the top-right with several options in it. For the old Eclipse the option you want is Filters... And for the newer Eclipse the option is now Configure Contents. At the top of the Configure Contents dialog is a scope selection with options you want, I think.. If not check preferences and search for tasks, or scope. It should be in there somewhere.
右上角应该有一个向下箭头,其中包含多个选项。对于旧的 Eclipse,您想要的选项是 Filters... 而对于较新的 Eclipse,该选项现在是 Configure Contents。在“配置内容”对话框的顶部是一个范围选择,其中包含您想要的选项,我想……如果没有,请检查首选项并搜索任务或范围。它应该在那里的某个地方。
回答by Karl
Close projects that you aren't working on. Tasks show for any part of the workspace, so remove projects that you arent working on by doing a close operation. (right click on the project in the project explorer and then "close project")
关闭您不从事的项目。工作区的任何部分都会显示任务,因此通过执行关闭操作来删除您不工作的项目。(在项目资源管理器中右键单击项目,然后“关闭项目”)
回答by JesperE
Configure Contents...can be used to filter to things like working sets (if you're not already using working sets, you should), but yet another way is to use Mylynto filter out any UI elements not relevant for what you're currently working on.
配置内容...可用于过滤工作集之类的内容(如果您还没有使用工作集,则应该使用),但另一种方法是使用Mylyn过滤掉与您不相关的任何 UI 元素重新目前正在努力。
回答by sjas
Simply close the projects you are not working on.
You can leave them in the workspace, too.
只需关闭您不工作的项目。
您也可以将它们留在工作区中。
回答by hakovala
In Eclipse Juno 4.2.1, I found that it's possible to disable specific projects TODO
tasks.
在 Eclipse Juno 4.2.1 中,我发现可以禁用特定的项目TODO
任务。
In the projects properties open: Java Compiler > Task Tags
在项目属性中打开: Java Compiler > Task Tags
From that page check the option "Enable project specific settings" and remove the TODO
entry from the list below, after that the TODO
comments from that project won't be shown in Tasks.
You could also remove other tags from the list.
从该页面检查选项“启用项目特定设置”并TODO
从下面的列表中删除条目,之后TODO
该项目的评论将不会显示在任务中。您还可以从列表中删除其他标签。
回答by Rodrigo Vaamonde
In Eclipse 2019-06:
在 Eclipse 2019-06 中:
1-Open the Taskswindow.
2-Click on the arrow pointing down ▽
.
3-Click on Filters...
1-打开任务窗口。
2-单击向下的箭头▽
。
3-点击Filters...
4-In the Configurations
panel on the left select TODOs(or any configuration that you have saved).
5-Under Scope
select On elements in selected projects
6-Click on Apply and Close
Now the task view will only show the tasks of the project where you are at the moment.
4-在Configurations
左侧面板中选择TODO(或您保存的任何配置)。
5-在Scope
选择下6-单击Apply and CloseNow 任务视图将仅显示您当前所在项目的任务。On elements in selected projects
回答by Rodrigo Vaamonde
Filtering by working sets works fine, but I had to put the packages into a working set, rather than the whole project.
按工作集过滤工作正常,但我必须将包放入工作集,而不是整个项目。
回答by Uri
AFAIK the Eclipse task list is workspace-based and cannot really be filtered by default.
AFAIK Eclipse 任务列表是基于工作区的,默认情况下无法真正过滤。