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.

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

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效