如何在 netbeans 中自动完成包括变量和方法? [英] How can I make auto completion in netbeans include both variables as well as methods?

查看:25
本文介绍了如何在 netbeans 中自动完成包括变量和方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇是否有人知道一种方法(通过使用设置或插件或其他东西),这将允许我在 netbeans 中动态选择变量名称,就像 Visual Studio 2008 使用自动弹出窗口所做的那样窗户?目前我可以通过按 Ctrl + Space 来访问它们,但我想知道是否有办法避免这种情况,并在我输入时让它们自动出现,并且这些方法会出现."运营商正常吗?

I was curious if anyone knows a way (by using a setting or a plugin or something), that would allow me to select variable names on the fly in netbeans, in the same way that Visual Studio 2008 does using an automatic popup window? At the moment I can access them by pressing Ctrl + Space, but I wondered if there is a way that I could avoid this and just have them come up automatically as I type, and the methods would come up with the '.' operator as normal?

工具->选项->编辑器->代码完成"中的设置似乎没有我正在寻找的 Ctrl + Space 设置,只有一个用于切换普通."的复选框.打开或关闭方法名称的代码完成..

The settings in 'Tools->Options->Editor->Code Completion' doesn't seem to have the Ctrl + Space setting I'm looking for, only a tickbox for toggling the normal '.' code completion of method names on or off..

(如果有帮助,Netbeans 的版本是 6.9.1,我正在为 Glassfish 用 Ja​​va 编写)

(if it helps, the version of Netbeans is 6.9.1, and I'm writing in Java for Glassfish)

推荐答案

我尝试通过将字母表添加到完成选择器来获得所需的功能.有点效果,你可以随时尝试.

I tried to get the desired feature by adding the alphabet to the completion selectors. It worked somewhat, you can always try it.

转到:

工具 -> 选项 -> 编辑器 -> 代码补全

Tools -> Options -> Editor -> Code Completion

选择

语言:[Java]

检查:

[X] Auto Popup on Typing Any Java Identifier Part

Java 的完成选择器:

Completion Selectors for Java:

[.,;:([+-=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ]

祝你好运!

这篇关于如何在 netbeans 中自动完成包括变量和方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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