不同类型的Eclipse Content-assist做什么? [英] What do the different kinds of Eclipse Content-assist do?

查看:206
本文介绍了不同类型的Eclipse Content-assist做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Eclipse 首选项 - > Java - >编辑 - >内容辅助 - >高级设置,我看到以下内容:




  • Java非类型提案

  • Java提案
  • Java提案(以任务为中心)

  • Java类型提案

  • JPA提案(对我来说总是空的)

  • PDE API工具提案(在内容助理循环设置中检入时被跳过) / li>
  • SWT模板提案(始终为空)

  • 模板提案(始终为空) li>
  • Word提案(在内容助理循环设置中检入时被跳过)


$ b $我尝试谷歌(单独)为Java非类型提案和Java建议(任务聚焦),但没有找到任何描述他们。



匹配 / Java((Non - )?Type)的条目)提案/ 对我有意义,但其他人则没有。



那么其他人做什么?




  • 我从未看到PDE,SWT,Template或Word提案的结果。什么时候有用?

  • 我还没有真正开始使用Mylyn,我想象的是提供Java建议(以任务为中心)。如果我没有使用Mylyn所理解的错误跟踪器,那么会买什么?


解决方案

我还没有真正开始使用Mylyn,我认为这是
提供的Java提案
(以任务为中心))。如果我没有使用Mylyn所理解的缺陷跟踪器
,那么我会买什么


您可以使用Mylyn做什么,即使没有集成的错误跟踪器(在Mylyn说法中是任务存储库),也是在本地存储库中创建任务,并使用它们来维护不同开发任务的上下文。



Mylyn中的上下文支持是非常独特的,虽然当您首次激活新任务时,令人不安,因为Mylyn所做的是过滤窗口的内容,如Package Explorer所以只有这些工件在任务被激活时才被看到,现在,由于你刚刚刚刚启动了一个任务,所以没有任何东西被访问过,而且Package Explorer是空的!



你可能想要做什么,假设你的任务描述是像查找你的代码.AbstractMappingParameter中的NPE的原因,是使用Ctrl-shift-T(打开类型... )并导航到该类。 (在打开任务对话框中保存一些打字并使用骆驼案例支持)只需键入AMP即可。)您的包资源管理器现在显示该类及其上方的层次结构(包含在其中的文件,以及项目) 。编辑器,如果你已经配置它自动折叠代码,将显示每个评论和方法折叠,所以你可以看到更多的通常可能的类。



再访问​​一些这样的文件,并且您开始构建您的上下文,Mylyn自动保存该任务。您以后的开放类型搜索首先在上下文中进行搜索,您提到的内容协助提案也是如此。注意:不要关闭文件,除非您认为它们与任务无关。关闭编辑器时,该类/文件/ etc。从上下文中删除,不再出现在您的包资源管理器中。平均开发任务不需要十几个文件,足够数量的文件和编辑器窗口在开始工作时保持打开状态。



如果您现在创建了另一个任务(本地或存储库),然后激活它,您将再次从一个已清除的Package Explorer开始,并在您工作时建立上下文。



然后,如果您重新启动了第一个任务,您会看到一个有趣的事情:您打开的窗口将关闭,程序包资源管理器将清除,然后从最后一次您的资源管理器的内容那个工作就会出现,你当时打开的所有窗口现在都会被打开了!你回来工作了。这非常方便。



有一个简短的总结,您可以在没有集成存储库的情况下使用Mylyn。如果您有兴趣了解更多信息,可以访问 http://www.eclipse.org/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?

解决方案

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?

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.

这篇关于不同类型的Eclipse Content-assist做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆