7 comments

Are they really 2 different files? What IDE version are you on? 

0

There are two payments_popup.js files in two different repos, in two different languages... there are times when Ctrl+clicking one of the calls of updatePayTotal() pops up this "Choose Declaration" choice, but sometimes it goes directly to the correct function definition.

The problem is not only that it can't figure out which definition to go to (meaning in the same repo), but if the choice pops up, it doesn't tell me the file path or repo or top-level folder of each file...

My Project is set up as having multiple repos in one "Sites" folder (for various reasons like VM references and not having to open a PHPStorm instance for each one), but configuring root/source/whatever folders is not fixing the editor's engine to be able to understand to trace the Ctrl+click to the right file in the right repo (and not try to check other repos).

0

My Project is set up as having multiple repos in one "Sites" folder (for various reasons like VM references and not having to open a PHPStorm instance for each one)

Not really sure I got your setup right. Please clarify how exactly you added multiple repos into one project. There seem to be two ways:

  • Content roots (Preferences | Directories | Add Content Root
  • An attached project (File | Open | Open in current window | Add to currently opened projects)

Or maybe it's a PHP Include, e.g. an External Library?

0

Each repo is in its own folder; each of those folders are in a parent folder called Sites. That folder is the Project. There's about a dozen repos.

None of these repos reference each other on execution, so there's no reason PHPStorm should be checking repos outside of the repo with the function call I'm Ctrl+clicking to locate its definition...

On top of that, the "Choose Declaration" drop-down shows identical files in two separate repos where the function name is the same but it doesn't specify the pathname of each file!

Does that make sense? Two issues here... at least PHPStorm should specify the file path names of the identical function/file names in the drop-down, but I don't want it even searching repos outside of the repo I'm Ctrl+clicking the function call in...

0

In Preferences > Directories, all of my repos' top-level folders are already marked as "Sources"... so that's not the solution (I'm not sure what that's even effecting).

If I click File > Open, I just get the normal Mac "Open folder" pop-down to open a folder... I'm not seeing an Open in current window option.

0

1) Please run File > Invalidate Caches/Restart > Invalidate and Restart and check the issue after that.

2) Please try disabling all custom plugins at Preferences | Plugins > Show: Custom, restart IDE and check the issue after that.

 

It really looks like you have duplicated entries in a Go to popup, similar to https://youtrack.jetbrains.com/issue/WEB-14532

If none of the 2 methods above help - we would appreciate if you could record a screencast of the issue + send us (or upload somewhere) PhpStorm logs (Help > Show log in ...)

0

OK so invalidating caches kept the issue, and I haven't installed any plugins. Cmd+clicking the updatePayTotal() call in the PHP file showed the drop-down for the function definition file in both the PHP repo and the other repo (which is in a different language). Clicking the first declaration takes me to the PHP file, clicking the second takes me the other language's repo... and neither one in the drop-down specifies which repo each file is for. 

I can't screencast this because it contains proprietary business code. I'd think my description and screenshots would be enough for a developer who understands how this works, would I be incorrect in assuming that here if I were to file a bug or add to an existing one?

 

0

Please sign in to leave a comment.