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 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀