dongyong6045 2013-10-30 18:51
浏览 60
已采纳

如何使netbeans IDE了解其他项目中的类和方法以完成代码

I am working on a website in php which is comprised of 2 SVN repositories. One repo has classes in it while the other has scripts in it, so scripts in the script repository will make use of classes in the other repository. I am using Netbeans 7.3.1 to maintain the website, and as such each repository is its own Netbeans project.

This all works out just fine on the server, but a problem is that when working in netbeans, I can only get class name suggestions, method name suggestions, phpdoc, etc., for classes and methods in the same project, so like:

Class repo: class myStaticClass has some static methods in it, when I am editing another class class someOtherClass in the same project, I can type in myStaticClass:: and netbeans will have a list populated with the static methods of that class.

However, when I am in the script repo, I will type myStaticClass:: and netbeans has nothing to say about it.

When I reference a class in the scripts repository, netbeans does not suggest method names or display phpdoc for methods. Is there anyway to make netbeans "look" at all projects when it is trying to gather the live data it presents as you type, rather than just the project you are currently modifying?

Restructuring, moving, or in anyway modifying the repos themselves is NOT an option!

Thanks

  • 写回答

1条回答 默认 最新

  • duanmo5724 2013-11-01 01:08
    关注

    I think you'd have to add your project with classes in the PHP Include Path of the project with scripts.

    Look for this in the Project Properties and add the corresponding folder as shown in the documentation pages of the NB site.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 目标计数模型训练过程中的问题
  • ¥100 Acess连接SQL 数据库后 不能用中文筛选
  • ¥15 用友U9Cloud的webapi
  • ¥20 电脑拓展屏桌面被莫名遮挡
  • ¥20 ensp,用局域网解决
  • ¥15 Python语言实验
  • ¥15 我每周要在投影仪优酷上自动连续播放112场电影,我每一周遥控操作一次投影仪,并使得电影永远不重复播放,请问怎样操作好呢?有那么多电影看吗?
  • ¥20 电脑重启停留在grub界面,引导出错需修复
  • ¥15 matlab透明图叠加
  • ¥50 基于stm32l4系列 使用blunrg-ms的ble gatt 创建 hid 服务失败