Eclipse Mylyn 有什么用处?
在我的 Eclipse Preferences -> Java->编辑->内容辅助 ->高级
设置,我看到以下内容:
- Java 非类型提案
- Java 提案
- Java 提案(以任务为中心)
- Java 类型提案
- JPA 提案 (对我来说始终为空)
- PDE API 工具提案 < em>(在“内容辅助循环”设置中选中时会被跳过)
- SWT 模板提案 (始终为空)
- 模板提案 (始终为空)
- Word 提案 >(在内容辅助循环设置中检查时被跳过)
我尝试(单独)谷歌搜索“Java Non-Type Proposals”和“Java Proposals(Task-Focused)”,但没有找到任何描述他们。
匹配 /Java ((Non-)?Type)? 的条目Proposals/
对我来说有意义,但其他的则没有。
那么,其他人做什么呢?
- 我从未见过 PDE、SWT、模板或 Word 提案的结果。它们什么时候有用?
- 我也从未真正开始使用 Mylyn,我想它提供了“Java 建议(以任务为中心)”。如果我不使用 Mylyn 理解的错误跟踪器,这会给我带来什么?
In my Eclipse Preferences -> Java -> Editor -> Content Assist -> Advanced
settings, I see the following:
- Java Non-Type Proposals
- Java Proposals
- Java Proposals (Task-focused)
- Java Type Proposals
- JPA Proposals (is always empty for me)
- PDE API Tools Proposals (gets skipped when checked in the Content-Assist Cycling settings)
- SWT Template Proposals (always empty)
- Template Proposals (always empty)
- Word Proposals (gets skipped when checked in the Content-Assist Cycling settings)
I tried googling (separately) for "Java Non-Type Proposals" and "Java Proposals (Task-Focused)", but didn't find anything describing them.
The entries matching /Java ((Non-)?Type)? Proposals/
make sense to me, but the others don't.
So, what do the others do?
- I've never seen a result for the PDE, SWT, Template or Word proposals. When are they useful?
- I've also never really started using Mylyn, which I imagine is what provides "Java Proposals (Task-focused)". What would that buy me, if I'm not using a bug-tracker that Mylyn understands?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
即使没有集成的错误跟踪器(用 Mylyn 的说法,即“任务存储库”),您也可以使用 Mylyn 在“本地”存储库中创建任务,并使用它们来维护不同开发任务的上下文。
Mylyn 中的上下文支持非常独特,尽管当您第一次为新任务激活它时会感到不安,因为 Mylyn 所做的是过滤窗口的内容(如包资源管理器),以便只有那些您在任务期间访问过的工件可见被激活了,现在,由于您刚刚第一次激活任务,所以没有访问任何内容,Package Explorer 是空白的!
假设您的任务描述类似于“在 your.code.AbstractMappingParameter 中查找 NPE 的原因”,您可能想要做的是使用 Ctrl-shift-T (打开类型...)并导航到该类。 (节省一些打字时间,并在“打开任务”对话框中使用驼峰式大小写支持:只需键入“AMP”。)您的包资源管理器现在显示该类及其上方的层次结构(它所在的文件、包和项目) 。如果您已将编辑器配置为自动折叠代码,则编辑器将显示折叠的每个注释和方法,以便您可以看到更多通常可能看到的类。
访问更多类似的文件,然后您开始构建上下文,Mylyn 会自动将其与任务一起保存。您后续的“开放类型...”搜索现在首先显示上下文中的类,并且您提到的内容辅助建议也有效。注意:不要关闭文件,除非您认为它们与任务无关。当您关闭编辑器时,类/文件/等。已从上下文中删除,并且不再出现在您的 Package Explorer 中。平均开发任务不需要十几个左右的文件,足够少量的文件和编辑器窗口可以在您处理它时保持打开状态。
如果您现在创建了另一个任务(在本地或在存储库中),然后激活它,您将再次从清除的包资源管理器开始,并在工作时构建上下文。
然后,如果您重新激活第一个任务,您会看到一个有趣的事情:您打开的窗口将关闭,包资源管理器将被清除,然后您上次处理该任务时资源管理器的内容将出现,并且您当时打开的所有窗口现在将再次打开!你回来继续工作了。这非常方便。
这里简要总结了在没有集成存储库的情况下可以使用 Mylyn 执行哪些操作。如果您想了解更多信息,可以访问 http://www.eclipse.org/mylyn/< /a> 并阅读其中的内容。
What you can do with Mylyn, even without an integrated bug tracker (in the Mylyn parlance, a "task repository"), is create tasks in your "local" repository, and use them to maintain the context of your different development tasks.
The context support in Mylyn is quite unique, although disconcerting when you first activate it for a new task, because what Mylyn does is filter the contents of windows like the Package Explorer so that only those artifacts are visible which you've visited while the task was activated, and now, since you have just activated a task for the first time, nothing has been visited, and the Package Explorer is blank!
What you'd probably want to do, assuming your task description was something like "Find the cause of the NPE in your.code.AbstractMappingParameter", is use Ctrl-shift-T (Open Type...) and navigate to that class. (Save yourself some typing and use the camel case support in the Open Task dialog: just type "AMP".) Your Package Explorer now shows that class, and the hierarchy above it (the file it's in, the package, and the project). The editor, if you've configured it to fold code automatically, will display each comment and method folded, so you can see more of the class that you usually might.
Visit a couple more files like that, and you start to build up your context, which Mylyn automatically saves along with the task. Your subsequent "Open Type..." searches now present in-context classes first, and the content-assist proposals you mentioned work also. NOTE: don't close files unless you think they're not relevant to the task. When you close an editor, the class/file/etc. is deleted from the context, and no longer appears in your Package Explorer. The average development task doesn't take more than a dozen or so files, a small-enough number of files and editor windows to keep open while you're working on it.
If you now created another task (locally, or in a repository), and then activated it, you would again start with a cleared Package Explorer, and would build up context as you worked.
Then, if you reactivated the first task, you'd see an interesting thing: the windows you have open will close, and the package explorer will clear, and then the contents of the explorer from the last time you worked on that task will appear, and all the windows you had opened at that time will now be opened again! You're back to work on it. It's very handy.
There's a brief summary of what you can do with Mylyn without an integrated repository. If you're curious to hear more, you might go to http://www.eclipse.org/mylyn/ and read what's there.
对于您看到的始终为空的模板建议和 SWT 模板建议,您需要在调用内容辅助之前输入一些内容。
试试这个看看:
main
,然后按 Ctrl-Space您也可以对 SWT 模板进行相同的操作,使用额外的 Ctrl-Space 切换到 SWT 模板。一个很好的例子是输入
table
,因为这将显示Table
、TableColumn
和TableItem
的模板。请注意,您需要在项目中拥有 SWT 才能正常工作。
For the Template Proposals and SWT Template Proposals that you see as always empty, you need to be typing something before invoking the content assist.
Try this to see:
main
then press Ctrl-SpaceYou can try the same for the SWT Templates too, with an extra Ctrl-Space to switch to the SWT Templates. A good example is typing
table
as this will show templates forTable
,TableColumn
andTableItem
.Note you need to have SWT in the project for this to work.
可能如果您正在从事 PDE 或 SWT 项目。
同样,这可能适用于不属于您的用例(使用 Mylyn 的人)。
Probably if you are working on a PDE or SWT project.
Again this is probably for uses cases (people using Mylyn) that aren't yours.
根据实验,模板建议允许您输入 sysout 等快捷方式,并且 ctrl 空格扩展到 System.out.printnl();我不确定还有哪些其他可用的快捷方式 - 毫无疑问它们已在文档中的某处列出
from experimentation, Template proposals are the ones that allow you to type shortcuts like sysout, and ctrl space expands out to System.out.printnl(); I'm not sure what other shortcuts are available - no doubt they are listed somewhere in documentation