简体   繁体   English

在NetBeans中组织导入

[英]Organising Imports in NetBeans

Netbeans is able to organise imports in a similar fashion to eclipse, but: Netbeans能够以类似于Eclipse的方式组织进口,但是:

  • it seems unable to remove unused imports for classes that can't be resolved (and are no longer used) 似乎无法删除无法解决的类(并且不再使用)的未使用导入。
  • I can only organise one class at a time - eclipse allows import organisation on packages and projects etc. 我一次只能组织一堂课-蚀允许导入有关包和项目等的组织。

Is there some way that I can fix these problems? 有什么办法可以解决这些问题?

I recently upgraded to Netbeans 6.7 and "fix imports" works the same as it did in 6.5. 我最近升级到了Netbeans 6.7,“修复导入”的工作方式与6.5中的相同。 I'm not sure why this does not remove unresolved imports. 我不确定为什么这不能删除未解决的导入。 I have been unable to find a bug case about this. 我无法找到有关此的错误案例。

As far a getting "Fix Imports" to work for multiple classes, that is planned for Netbeans 6.8. 到目前为止,Netbeans 6.8计划将“固定导入”用于多个类。

Planning for NetBeans 6.8 under the Java section. 在Java部分下规划NetBeans 6.8

(E) Format code and fix imports on multiple files (code beautifier) (Max 10) (E)格式化代码并修复多个文件上的导入(代码美化器)(最多10个)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM