Module-wide code completion and inspections

Hi,

Is it possible to configure code completion and inspection to be module-wide (or even define more specific scopes)? I looked through various options in settings, but haven't found such an option. I have multi-module project. Each of modules shares some common code base that makes IDE report multiple definitions of classes. Moreover I don't wan't classes from module A to appear in hints while editing files form module B. Those modules are unrelated on code level, but interoperate with SOAP after deployment. As I tend to develop those modules simultaneously it is convenient to me to have them in a single project.
As for multiple definitions warnings I know I can disable this inspection, but don't relly want to. I'm also unfortunatelly constrained to the current project structure and can't refactor it and externalize common code base to separate module.

1 comment

Hi there,

I'm also unfortunatelly constrained to the current project structure and can't refactor it and externalize common code base to separate module.

If you cannot do this .. then there is no much of what can be done here, unfortunately.

In any case:
1) Code completion for PHP is global and cannot be configured on per scope basis. Maybe one day it will be implemented (maybe something like they have done for JavaScript libraries .. or for Java in IntelliJ IDEA) .. but does not look like it will happen for PHP in near future.
2) But ... you can mark some duplicate folders as excluded (Settings | Directories), so you may end up having only one version of the same files/classes... (really depends on what you do have there).
3) Inspections can be turned on/off for specific scope -- just right click on particular inspection (Settings | Inspections) and choose "Add Scope" -- it's not ideal / convenient to manage them this way (if you need to alter many inspections), but it is how it is now.

There are quite a few tickets in this regard, but I do not expect to see any of them implemented in v6. Maybe v7 will have improvements -- I really hope so.

0

Please sign in to leave a comment.